diff --git a/cuebot/build.gradle b/cuebot/build.gradle
index ce6d2a3b7..815a09695 100644
--- a/cuebot/build.gradle
+++ b/cuebot/build.gradle
@@ -7,6 +7,7 @@ plugins {
id('com.google.protobuf') version "0.9.1"
id('jacoco')
id('org.sonarqube') version "2.8"
+ id('com.diffplug.spotless') version "5.16.0"
}
sourceCompatibility = 11
@@ -171,3 +172,12 @@ test {
}
}
}
+
+spotless {
+ java {
+ targetExclude 'src/compiled_protobuf/**'
+ toggleOffOn()
+ eclipse().configFile('jdtls.xml')
+ indentWithSpaces(4)
+ }
+}
diff --git a/cuebot/code_style_ij.xml b/cuebot/code_style_ij.xml
deleted file mode 100644
index caa706a34..000000000
--- a/cuebot/code_style_ij.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cuebot/jdtls.xml b/cuebot/jdtls.xml
new file mode 100644
index 000000000..7bb6804eb
--- /dev/null
+++ b/cuebot/jdtls.xml
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cuebot/src/main/java/com/imageworks/common/spring/remoting/CueServerInterceptor.java b/cuebot/src/main/java/com/imageworks/common/spring/remoting/CueServerInterceptor.java
index 31ebeb12e..9939785b5 100644
--- a/cuebot/src/main/java/com/imageworks/common/spring/remoting/CueServerInterceptor.java
+++ b/cuebot/src/main/java/com/imageworks/common/spring/remoting/CueServerInterceptor.java
@@ -7,43 +7,39 @@
import io.grpc.ServerCallHandler;
import io.grpc.ServerInterceptor;
import io.grpc.Status;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
-
+import org.apache.logging.log4j.Logger;
public class CueServerInterceptor implements ServerInterceptor {
- private static final Logger logger = LogManager.getLogger(CueServerInterceptor.class);
- private static final Logger accessLogger = LogManager.getLogger("API");
+ private static final Logger logger = LogManager.getLogger(CueServerInterceptor.class);
+ private static final Logger accessLogger = LogManager.getLogger("API");
- @Override
- public ServerCall.Listener interceptCall(
- ServerCall serverCall, Metadata metadata,
- ServerCallHandler serverCallHandler) {
- accessLogger.info("gRPC [" +
- serverCall.getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR) +
- "]: " + serverCall.getMethodDescriptor().getFullMethodName());
+ @Override
+ public ServerCall.Listener interceptCall(ServerCall serverCall,
+ Metadata metadata, ServerCallHandler serverCallHandler) {
+ accessLogger.info("gRPC [" + serverCall.getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR)
+ + "]: " + serverCall.getMethodDescriptor().getFullMethodName());
- ServerCall.Listener delegate = serverCallHandler.startCall(serverCall, metadata);
- return new SimpleForwardingServerCallListener(delegate) {
- @Override
- public void onHalfClose() {
- try {
- super.onHalfClose();
- } catch (Exception e) {
- logger.error("Caught an unexpected error.", e);
- serverCall.close(Status.INTERNAL
- .withCause(e)
- .withDescription(e.toString() + "\n" + e.getMessage()),
- new Metadata());
- }
- }
+ ServerCall.Listener delegate = serverCallHandler.startCall(serverCall, metadata);
+ return new SimpleForwardingServerCallListener(delegate) {
+ @Override
+ public void onHalfClose() {
+ try {
+ super.onHalfClose();
+ } catch (Exception e) {
+ logger.error("Caught an unexpected error.", e);
+ serverCall.close(
+ Status.INTERNAL.withCause(e).withDescription(e.toString() + "\n" + e.getMessage()),
+ new Metadata());
+ }
+ }
- @Override
- public void onMessage(ReqT request) {
- accessLogger.info("Request Data: " + request);
- super.onMessage(request);
- }
- };
- }
+ @Override
+ public void onMessage(ReqT request) {
+ accessLogger.info("Request Data: " + request);
+ super.onMessage(request);
+ }
+ };
+ }
}
diff --git a/cuebot/src/main/java/com/imageworks/common/spring/remoting/GrpcServer.java b/cuebot/src/main/java/com/imageworks/common/spring/remoting/GrpcServer.java
index a5038f82c..66c49de47 100644
--- a/cuebot/src/main/java/com/imageworks/common/spring/remoting/GrpcServer.java
+++ b/cuebot/src/main/java/com/imageworks/common/spring/remoting/GrpcServer.java
@@ -38,76 +38,74 @@
import com.imageworks.spcue.servant.ManageTask;
import com.imageworks.spcue.servant.RqdReportStatic;
-
public class GrpcServer implements ApplicationContextAware {
- private static final Logger logger = LogManager.getLogger(GrpcServer.class);
+ private static final Logger logger = LogManager.getLogger(GrpcServer.class);
- private static final String DEFAULT_NAME = "CueGrpcServer";
- private static final String DEFAULT_PORT = "8443";
- private static final int DEFAULT_MAX_MESSAGE_BYTES = 104857600;
+ private static final String DEFAULT_NAME = "CueGrpcServer";
+ private static final String DEFAULT_PORT = "8443";
+ private static final int DEFAULT_MAX_MESSAGE_BYTES = 104857600;
- private String name;
- private int port;
- private int maxMessageBytes;
- private Server server;
- private ApplicationContext applicationContext;
+ private String name;
+ private int port;
+ private int maxMessageBytes;
+ private Server server;
+ private ApplicationContext applicationContext;
- public GrpcServer() {
- this(DEFAULT_NAME, DEFAULT_PORT, new Properties(), DEFAULT_MAX_MESSAGE_BYTES);
- }
+ public GrpcServer() {
+ this(DEFAULT_NAME, DEFAULT_PORT, new Properties(), DEFAULT_MAX_MESSAGE_BYTES);
+ }
- public GrpcServer(String name, String port, Properties props, Integer maxMessageBytes) {
- logger.info("Setting up gRPC server...");
- this.name = name;
- this.port = Integer.parseInt(port);
- this.maxMessageBytes = maxMessageBytes;
- }
+ public GrpcServer(String name, String port, Properties props, Integer maxMessageBytes) {
+ logger.info("Setting up gRPC server...");
+ this.name = name;
+ this.port = Integer.parseInt(port);
+ this.maxMessageBytes = maxMessageBytes;
+ }
- public void shutdown() {
- if (!server.isShutdown()) {
- logger.info("gRPC server shutting down on " + this.name + " at port " + this.port);
- server.shutdown();
- }
+ public void shutdown() {
+ if (!server.isShutdown()) {
+ logger.info("gRPC server shutting down on " + this.name + " at port " + this.port);
+ server.shutdown();
}
+ }
- public void start() throws IOException {
- server = ServerBuilder
- .forPort(this.port)
- .addService(applicationContext.getBean("rqdReportStatic", RqdReportStatic.class))
- .addService(applicationContext.getBean("cueStaticServant", CueStatic.class))
- .addService(applicationContext.getBean("manageAction", ManageAction.class))
- .addService(applicationContext.getBean("manageAllocation", ManageAllocation.class))
- .addService(applicationContext.getBean("manageComment", ManageComment.class))
- .addService(applicationContext.getBean("manageDeed", ManageDeed.class))
- .addService(applicationContext.getBean("manageDepartment", ManageDepartment.class))
- .addService(applicationContext.getBean("manageDepend", ManageDepend.class))
- .addService(applicationContext.getBean("manageFacility", ManageFacility.class))
- .addService(applicationContext.getBean("manageFilter", ManageFilter.class))
- .addService(applicationContext.getBean("manageFrame", ManageFrame.class))
- .addService(applicationContext.getBean("manageGroup", ManageGroup.class))
- .addService(applicationContext.getBean("manageHost", ManageHost.class))
- .addService(applicationContext.getBean("manageJob", ManageJob.class))
- .addService(applicationContext.getBean("manageLayer", ManageLayer.class))
- .addService(applicationContext.getBean("manageLimit", ManageLimit.class))
- .addService(applicationContext.getBean("manageMatcher", ManageMatcher.class))
- .addService(applicationContext.getBean("manageOwner", ManageOwner.class))
- .addService(applicationContext.getBean("manageProc", ManageProc.class))
- .addService(applicationContext.getBean("manageRenderPartition", ManageRenderPartition.class))
- .addService(applicationContext.getBean("manageService", ManageService.class))
- .addService(applicationContext.getBean("manageServiceOverride", ManageServiceOverride.class))
- .addService(applicationContext.getBean("manageShow", ManageShow.class))
- .addService(applicationContext.getBean("manageSubscription", ManageSubscription.class))
- .addService(applicationContext.getBean("manageTask", ManageTask.class))
- .maxInboundMessageSize(maxMessageBytes)
- .intercept(new CueServerInterceptor())
- .build();
- server.start();
- logger.info("gRPC server started on " + this.name + " at port " + this.port + " !");
- }
+ public void start() throws IOException {
+ server = ServerBuilder.forPort(this.port)
+ .addService(applicationContext.getBean("rqdReportStatic", RqdReportStatic.class))
+ .addService(applicationContext.getBean("cueStaticServant", CueStatic.class))
+ .addService(applicationContext.getBean("manageAction", ManageAction.class))
+ .addService(applicationContext.getBean("manageAllocation", ManageAllocation.class))
+ .addService(applicationContext.getBean("manageComment", ManageComment.class))
+ .addService(applicationContext.getBean("manageDeed", ManageDeed.class))
+ .addService(applicationContext.getBean("manageDepartment", ManageDepartment.class))
+ .addService(applicationContext.getBean("manageDepend", ManageDepend.class))
+ .addService(applicationContext.getBean("manageFacility", ManageFacility.class))
+ .addService(applicationContext.getBean("manageFilter", ManageFilter.class))
+ .addService(applicationContext.getBean("manageFrame", ManageFrame.class))
+ .addService(applicationContext.getBean("manageGroup", ManageGroup.class))
+ .addService(applicationContext.getBean("manageHost", ManageHost.class))
+ .addService(applicationContext.getBean("manageJob", ManageJob.class))
+ .addService(applicationContext.getBean("manageLayer", ManageLayer.class))
+ .addService(applicationContext.getBean("manageLimit", ManageLimit.class))
+ .addService(applicationContext.getBean("manageMatcher", ManageMatcher.class))
+ .addService(applicationContext.getBean("manageOwner", ManageOwner.class))
+ .addService(applicationContext.getBean("manageProc", ManageProc.class))
+ .addService(
+ applicationContext.getBean("manageRenderPartition", ManageRenderPartition.class))
+ .addService(applicationContext.getBean("manageService", ManageService.class))
+ .addService(
+ applicationContext.getBean("manageServiceOverride", ManageServiceOverride.class))
+ .addService(applicationContext.getBean("manageShow", ManageShow.class))
+ .addService(applicationContext.getBean("manageSubscription", ManageSubscription.class))
+ .addService(applicationContext.getBean("manageTask", ManageTask.class))
+ .maxInboundMessageSize(maxMessageBytes).intercept(new CueServerInterceptor()).build();
+ server.start();
+ logger.info("gRPC server started on " + this.name + " at port " + this.port + " !");
+ }
- @Override
- public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
- this.applicationContext = applicationContext;
- }
+ @Override
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ActionEntity.java b/cuebot/src/main/java/com/imageworks/spcue/ActionEntity.java
index 95aff5d34..b04fb5fa5 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ActionEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ActionEntity.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.filter.Action;
@@ -25,76 +21,75 @@
public class ActionEntity extends Entity implements ActionInterface {
- public String filterId;
- public String showId;
-
- public ActionType type;
- public ActionValueType valueType;
- public String stringValue;
- public long intValue;
- public boolean booleanValue;
- public String groupValue;
- public float floatValue;
-
- public ActionEntity() {
- this.name = null;
+ public String filterId;
+ public String showId;
+
+ public ActionType type;
+ public ActionValueType valueType;
+ public String stringValue;
+ public long intValue;
+ public boolean booleanValue;
+ public String groupValue;
+ public float floatValue;
+
+ public ActionEntity() {
+ this.name = null;
+ }
+
+ public static ActionEntity build(Action data) {
+ ActionEntity entity = new ActionEntity();
+ if (data.getGroupValue() != null) {
+ entity.groupValue = data.getGroupValue();
}
-
- public static ActionEntity build(Action data) {
- ActionEntity entity = new ActionEntity();
- if (data.getGroupValue() != null) {
- entity.groupValue = data.getGroupValue();
- }
- entity.stringValue = data.getStringValue();
- entity.booleanValue = data.getBooleanValue();
- entity.intValue = data.getIntegerValue();
- entity.floatValue = data.getFloatValue();
- entity.name = "";
- entity.type = data.getType();
- entity.valueType = data.getValueType();
- return entity;
- }
-
- public static ActionEntity build(FilterInterface filter, Action data) {
- ActionEntity entity = build(data);
- entity.filterId = filter.getFilterId();
- entity.showId = filter.getShowId();
- return entity;
+ entity.stringValue = data.getStringValue();
+ entity.booleanValue = data.getBooleanValue();
+ entity.intValue = data.getIntegerValue();
+ entity.floatValue = data.getFloatValue();
+ entity.name = "";
+ entity.type = data.getType();
+ entity.valueType = data.getValueType();
+ return entity;
+ }
+
+ public static ActionEntity build(FilterInterface filter, Action data) {
+ ActionEntity entity = build(data);
+ entity.filterId = filter.getFilterId();
+ entity.showId = filter.getShowId();
+ return entity;
+ }
+
+ public static ActionEntity build(FilterInterface filter, Action data, String id) {
+ ActionEntity action = build(filter, data);
+ action.id = id;
+ if (action.isNew()) {
+ throw new SpcueRuntimeException("the action has not been created yet");
}
+ return action;
- public static ActionEntity build(FilterInterface filter, Action data, String id) {
- ActionEntity action = build(filter, data);
- action.id = id;
- if (action.isNew()) {
- throw new SpcueRuntimeException("the action has not been created yet");
- }
- return action;
+ }
- }
+ public String getId() {
+ return id;
+ }
- public String getId() {
- return id;
- }
+ public String getName() {
+ return null;
+ }
- public String getName() {
- return null;
- }
+ public String getActionId() {
+ return id;
+ }
- public String getActionId() {
- return id;
+ public String getFilterId() {
+ if (filterId == null) {
+ throw new SpcueRuntimeException(
+ "Trying to get a filterId from a ActityEntity created without a filter");
}
+ return filterId;
+ }
- public String getFilterId() {
- if (filterId == null){
- throw new SpcueRuntimeException(
- "Trying to get a filterId from a ActityEntity created without a filter");
- }
- return filterId;
- }
-
- public String getShowId() {
- return showId;
- }
+ public String getShowId() {
+ return showId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ActionInterface.java b/cuebot/src/main/java/com/imageworks/spcue/ActionInterface.java
index 06dacf924..4f28e2c54 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ActionInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ActionInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface ActionInterface extends FilterInterface {
- public String getActionId();
+ public String getActionId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/AllocationEntity.java b/cuebot/src/main/java/com/imageworks/spcue/AllocationEntity.java
index 6b358612e..27b492ac1 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/AllocationEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/AllocationEntity.java
@@ -2,36 +2,31 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class AllocationEntity extends Entity implements AllocationInterface {
- public String tag;
- public String facilityId;
+ public String tag;
+ public String facilityId;
- public String getAllocationId() {
- return id;
- }
+ public String getAllocationId() {
+ return id;
+ }
- @Override
- public String getFacilityId() {
- return facilityId;
- }
+ @Override
+ public String getFacilityId() {
+ return facilityId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/AllocationInterface.java b/cuebot/src/main/java/com/imageworks/spcue/AllocationInterface.java
index d21121242..9e2669d15 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/AllocationInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/AllocationInterface.java
@@ -2,25 +2,20 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface AllocationInterface extends EntityInterface, FacilityInterface {
- public String getAllocationId();
+ public String getAllocationId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/BuildableDependency.java b/cuebot/src/main/java/com/imageworks/spcue/BuildableDependency.java
index 22ecd73a9..d3eb94b07 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/BuildableDependency.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/BuildableDependency.java
@@ -2,122 +2,117 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.depend.DependType;
public class BuildableDependency {
- public DependType type;
- public boolean anyFrame = false;
- public boolean launchDepend = false;
-
- public String dependErJobName;
- public String dependErLayerName;
- public String dependErFrameName;
-
- public String dependOnJobName;
- public String dependOnLayerName;
- public String dependOnFrameName;
-
- public boolean isAnyFrame() {
- return anyFrame;
- }
-
- public void setAnyFrame(boolean anyFrame) {
- this.anyFrame = anyFrame;
- }
-
- public String getDependErFrameName() {
- return dependErFrameName;
- }
-
- public void setDependErFrameName(String dependErFrameName) {
- this.dependErFrameName = dependErFrameName;
- }
-
- public String getDependErJobName() {
- return dependErJobName;
- }
-
- public void setDependErJobName(String dependErJobName) {
- this.dependErJobName = dependErJobName;
- }
-
- public String getDependErLayerName() {
- return dependErLayerName;
- }
-
- public void setDependErLayerName(String dependErLayerName) {
- this.dependErLayerName = dependErLayerName;
- }
-
- public String getDependOnFrameName() {
- return dependOnFrameName;
- }
-
- public void setDependOnFrameName(String dependOnFrameName) {
- this.dependOnFrameName = dependOnFrameName;
- }
-
- public String getDependOnJobName() {
- return dependOnJobName;
- }
-
- public void setDependOnJobName(String dependOnJobName) {
- this.dependOnJobName = dependOnJobName;
- }
-
- public String getDependOnLayerName() {
- return dependOnLayerName;
- }
-
- public void setDependOnLayerName(String dependOnLayerName) {
- this.dependOnLayerName = dependOnLayerName;
- }
-
- public DependType getType() {
- return type;
- }
-
- public void setType(DependType type) {
- this.type = type;
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder(1024);
- sb.append("Depend Type: " + type.toString() + "\n");
- sb.append("Depend on job: " + dependErJobName + "\n");
- sb.append("Depend on layer: " + dependOnLayerName + "\n");
- sb.append("Depend on frame: " + dependOnFrameName + "\n");
- sb.append("Depend er job: " + dependOnJobName + "\n");
- sb.append("Depend er layer: " + dependErLayerName + "\n");
- sb.append("Depend er frame: " + dependErFrameName + "\n");
- return sb.toString();
- }
-
- public boolean isLaunchDepend() {
- return launchDepend;
- }
-
- public void setLaunchDepend(boolean launchDepend) {
- this.launchDepend = launchDepend;
- }
+ public DependType type;
+ public boolean anyFrame = false;
+ public boolean launchDepend = false;
+
+ public String dependErJobName;
+ public String dependErLayerName;
+ public String dependErFrameName;
+
+ public String dependOnJobName;
+ public String dependOnLayerName;
+ public String dependOnFrameName;
+
+ public boolean isAnyFrame() {
+ return anyFrame;
+ }
+
+ public void setAnyFrame(boolean anyFrame) {
+ this.anyFrame = anyFrame;
+ }
+
+ public String getDependErFrameName() {
+ return dependErFrameName;
+ }
+
+ public void setDependErFrameName(String dependErFrameName) {
+ this.dependErFrameName = dependErFrameName;
+ }
+
+ public String getDependErJobName() {
+ return dependErJobName;
+ }
+
+ public void setDependErJobName(String dependErJobName) {
+ this.dependErJobName = dependErJobName;
+ }
+
+ public String getDependErLayerName() {
+ return dependErLayerName;
+ }
+
+ public void setDependErLayerName(String dependErLayerName) {
+ this.dependErLayerName = dependErLayerName;
+ }
+
+ public String getDependOnFrameName() {
+ return dependOnFrameName;
+ }
+
+ public void setDependOnFrameName(String dependOnFrameName) {
+ this.dependOnFrameName = dependOnFrameName;
+ }
+
+ public String getDependOnJobName() {
+ return dependOnJobName;
+ }
+
+ public void setDependOnJobName(String dependOnJobName) {
+ this.dependOnJobName = dependOnJobName;
+ }
+
+ public String getDependOnLayerName() {
+ return dependOnLayerName;
+ }
+
+ public void setDependOnLayerName(String dependOnLayerName) {
+ this.dependOnLayerName = dependOnLayerName;
+ }
+
+ public DependType getType() {
+ return type;
+ }
+
+ public void setType(DependType type) {
+ this.type = type;
+ }
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder(1024);
+ sb.append("Depend Type: " + type.toString() + "\n");
+ sb.append("Depend on job: " + dependErJobName + "\n");
+ sb.append("Depend on layer: " + dependOnLayerName + "\n");
+ sb.append("Depend on frame: " + dependOnFrameName + "\n");
+ sb.append("Depend er job: " + dependOnJobName + "\n");
+ sb.append("Depend er layer: " + dependErLayerName + "\n");
+ sb.append("Depend er frame: " + dependErFrameName + "\n");
+ return sb.toString();
+ }
+
+ public boolean isLaunchDepend() {
+ return launchDepend;
+ }
+
+ public void setLaunchDepend(boolean launchDepend) {
+ this.launchDepend = launchDepend;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/BuildableJob.java b/cuebot/src/main/java/com/imageworks/spcue/BuildableJob.java
index 2c9d213a9..e71ec29c9 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/BuildableJob.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/BuildableJob.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.ArrayList;
@@ -25,84 +21,82 @@
import java.util.Map;
/**
- * A buildable job represents a job stored
- * in the job spec XML file.
+ * A buildable job represents a job stored in the job spec XML file.
*
* @category Job Launching
*/
public class BuildableJob {
- /**
- * Struct for the job detail, used for adding job to DB.
- */
- public JobDetail detail;
-
- /**
- * Maximum CPU cores and GPU units overrides.
- */
- public Integer maxCoresOverride = null;
- public Integer maxGpusOverride = null;
-
- /**
- * List of layers
- */
- private List layers = new ArrayList();
-
- private BuildableJob postJob = null;
-
- /**
- * Stores the local core assignment if one was launched with the job.
- */
- private LocalHostAssignment runLocalConf = null;
-
- /**
- * Job specific environment variables
- */
- public Map env = new HashMap();
-
- public BuildableJob() { }
-
- public BuildableJob(JobDetail detail) {
- this.detail = detail;
- }
-
- /**
- * Add a layer to the job
- *
- * @param layer
- */
- public void addBuildableLayer(BuildableLayer layer) {
- layers.add(layer);
- }
-
- /**
- * Add a key/value pair environment var to job
- *
- * @param key
- * @param value
- */
- public void addEnvironmentVariable(String key, String value) {
- env.put(key, value);
- }
-
- public List getBuildableLayers() {
- return layers;
- }
-
- public void setPostJob(BuildableJob job) {
- this.postJob = job;
- }
-
- public BuildableJob getPostJob() {
- return this.postJob;
- }
-
- public void setRunLocalConf(LocalHostAssignment runLocalConf) {
- this.runLocalConf = runLocalConf;
- }
-
- public LocalHostAssignment getRunLocalConf() {
- return this.runLocalConf;
- }
+ /**
+ * Struct for the job detail, used for adding job to DB.
+ */
+ public JobDetail detail;
+
+ /**
+ * Maximum CPU cores and GPU units overrides.
+ */
+ public Integer maxCoresOverride = null;
+ public Integer maxGpusOverride = null;
+
+ /**
+ * List of layers
+ */
+ private List layers = new ArrayList();
+
+ private BuildableJob postJob = null;
+
+ /**
+ * Stores the local core assignment if one was launched with the job.
+ */
+ private LocalHostAssignment runLocalConf = null;
+
+ /**
+ * Job specific environment variables
+ */
+ public Map env = new HashMap();
+
+ public BuildableJob() {}
+
+ public BuildableJob(JobDetail detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * Add a layer to the job
+ *
+ * @param layer
+ */
+ public void addBuildableLayer(BuildableLayer layer) {
+ layers.add(layer);
+ }
+
+ /**
+ * Add a key/value pair environment var to job
+ *
+ * @param key
+ * @param value
+ */
+ public void addEnvironmentVariable(String key, String value) {
+ env.put(key, value);
+ }
+
+ public List getBuildableLayers() {
+ return layers;
+ }
+
+ public void setPostJob(BuildableJob job) {
+ this.postJob = job;
+ }
+
+ public BuildableJob getPostJob() {
+ return this.postJob;
+ }
+
+ public void setRunLocalConf(LocalHostAssignment runLocalConf) {
+ this.runLocalConf = runLocalConf;
+ }
+
+ public LocalHostAssignment getRunLocalConf() {
+ return this.runLocalConf;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/BuildableLayer.java b/cuebot/src/main/java/com/imageworks/spcue/BuildableLayer.java
index d23f28d06..0fbb0a2a4 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/BuildableLayer.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/BuildableLayer.java
@@ -2,54 +2,46 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.HashMap;
import java.util.Map;
/**
- * A buildable layer represents a layer stored
- * in the job spec XML file.
+ * A buildable layer represents a layer stored in the job spec XML file.
*
* @category Job Launching
*/
public class BuildableLayer {
- /**
- * If the user manually set memory, this is
- * updated to true.
- */
- public boolean isMemoryOverride = false;
-
- /**
- * Stores the layer detail. LayerDetail is needed to
- * actually insert the layer into the DB.
- */
- public LayerDetail layerDetail = new LayerDetail();
-
- /**
- * Map for storing environment vars
- */
- public Map env = new HashMap();
-
- public BuildableLayer() { }
-
- public BuildableLayer(LayerDetail detail) {
- this.layerDetail = detail;
- }
+ /**
+ * If the user manually set memory, this is updated to true.
+ */
+ public boolean isMemoryOverride = false;
+
+ /**
+ * Stores the layer detail. LayerDetail is needed to actually insert the layer into the DB.
+ */
+ public LayerDetail layerDetail = new LayerDetail();
+
+ /**
+ * Map for storing environment vars
+ */
+ public Map env = new HashMap();
+
+ public BuildableLayer() {}
+
+ public BuildableLayer(LayerDetail detail) {
+ this.layerDetail = detail;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/CommentDetail.java b/cuebot/src/main/java/com/imageworks/spcue/CommentDetail.java
index 213c28bc3..b8ac3e3ec 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/CommentDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/CommentDetail.java
@@ -2,29 +2,24 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.sql.Timestamp;
public class CommentDetail extends Entity {
- public Timestamp timestamp;
- public String subject;
- public String message;
- public String user;
+ public Timestamp timestamp;
+ public String subject;
+ public String message;
+ public String user;
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/CueGrpcException.java b/cuebot/src/main/java/com/imageworks/spcue/CueGrpcException.java
index 237b69dae..a9ddfe41d 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/CueGrpcException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/CueGrpcException.java
@@ -1,36 +1,31 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
package com.imageworks.spcue;
-
import org.springframework.core.NestedRuntimeException;
-
public class CueGrpcException extends NestedRuntimeException {
- private static final long serialVersionUID = -3215497096936812369L;
+ private static final long serialVersionUID = -3215497096936812369L;
+
+ public CueGrpcException(String message) {
+ super(message);
+ }
- public CueGrpcException(String message) {
- super(message);
- }
+ public CueGrpcException(String message, Throwable cause) {
+ super(message, cause);
+ }
- public CueGrpcException(String message, Throwable cause) {
- super(message, cause);
- }
-
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/CuebotApplication.java b/cuebot/src/main/java/com/imageworks/spcue/CuebotApplication.java
index 6ef64080c..c50c308f2 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/CuebotApplication.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/CuebotApplication.java
@@ -2,20 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
package com.imageworks.spcue;
import java.util.Arrays;
@@ -30,35 +27,34 @@
@SpringBootApplication
public class CuebotApplication extends SpringApplication {
- private static String[] checkArgs(String[] args) {
- Optional deprecatedFlag = Arrays.stream(args)
- .filter(arg -> arg.startsWith("--log.frame-log-root=")).findFirst();
- if (deprecatedFlag.isPresent()) {
- // Log a deprecation warning.
- Logger warning_logger = LogManager.getLogger(CuebotApplication.class);
- warning_logger.warn("`--log.frame-log-root` is deprecated and will be removed in an " +
- "upcoming release. It has been replaced with `--log.frame-log-root.default_os`. " +
- "See opencue.properties for details on OpenCue's new OS-dependent root directories.");
- // If new flags are not present, swap in the value provided using the new flag.
- // If the new flags are already present, don't do anything.
- Optional newFlags = Arrays.stream(args)
- .filter(arg -> arg.startsWith("--log.frame-log-root.")).findAny();
- if (!newFlags.isPresent()) {
- String fixedFlag = "--log.frame-log-root.default_os="
- + StringUtils.substringAfter(deprecatedFlag.get(), "=");
- args = Stream.concat(
- Arrays.stream(args).filter(arg -> !arg.startsWith("--log.frame-log-root=")),
- Stream.of(fixedFlag))
- .toArray(String[]::new);
- }
- }
- return args;
- }
-
- public static void main(String[] args) {
- // Cuebot startup
- String[] filteredArgs = checkArgs(args);
- SpringApplication.run(CuebotApplication.class, filteredArgs);
+ private static String[] checkArgs(String[] args) {
+ Optional deprecatedFlag =
+ Arrays.stream(args).filter(arg -> arg.startsWith("--log.frame-log-root=")).findFirst();
+ if (deprecatedFlag.isPresent()) {
+ // Log a deprecation warning.
+ Logger warning_logger = LogManager.getLogger(CuebotApplication.class);
+ warning_logger.warn("`--log.frame-log-root` is deprecated and will be removed in an "
+ + "upcoming release. It has been replaced with `--log.frame-log-root.default_os`. "
+ + "See opencue.properties for details on OpenCue's new OS-dependent root directories.");
+ // If new flags are not present, swap in the value provided using the new flag.
+ // If the new flags are already present, don't do anything.
+ Optional newFlags =
+ Arrays.stream(args).filter(arg -> arg.startsWith("--log.frame-log-root.")).findAny();
+ if (!newFlags.isPresent()) {
+ String fixedFlag = "--log.frame-log-root.default_os="
+ + StringUtils.substringAfter(deprecatedFlag.get(), "=");
+ args = Stream
+ .concat(Arrays.stream(args).filter(arg -> !arg.startsWith("--log.frame-log-root=")),
+ Stream.of(fixedFlag))
+ .toArray(String[]::new);
+ }
}
+ return args;
+ }
+
+ public static void main(String[] args) {
+ // Cuebot startup
+ String[] filteredArgs = checkArgs(args);
+ SpringApplication.run(CuebotApplication.class, filteredArgs);
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DeedEntity.java b/cuebot/src/main/java/com/imageworks/spcue/DeedEntity.java
index fe518ef20..a0d79622a 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DeedEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DeedEntity.java
@@ -2,31 +2,26 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class DeedEntity extends Entity {
- public String owner;
- public String host;
- public String show;
+ public String owner;
+ public String host;
+ public String show;
- public String getName() {
- return String.format("%s.%s", owner, host);
- }
+ public String getName() {
+ return String.format("%s.%s", owner, host);
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DepartmentEntity.java b/cuebot/src/main/java/com/imageworks/spcue/DepartmentEntity.java
index fbe8bfad4..ed077e3bd 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DepartmentEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DepartmentEntity.java
@@ -2,28 +2,23 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class DepartmentEntity extends Entity implements DepartmentInterface {
- public String getDepartmentId() {
- return id;
- }
+ public String getDepartmentId() {
+ return id;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DepartmentInterface.java b/cuebot/src/main/java/com/imageworks/spcue/DepartmentInterface.java
index a1fa79ab4..03e5ffab7 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DepartmentInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DepartmentInterface.java
@@ -2,25 +2,20 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface DepartmentInterface extends EntityInterface {
- public String getDepartmentId();
+ public String getDepartmentId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DependInterface.java b/cuebot/src/main/java/com/imageworks/spcue/DependInterface.java
index a6895d137..e631bc200 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DependInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DependInterface.java
@@ -2,24 +2,19 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface DependInterface extends EntityInterface {
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DependencyManagerException.java b/cuebot/src/main/java/com/imageworks/spcue/DependencyManagerException.java
index 59bc959f8..2f750c14e 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DependencyManagerException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DependencyManagerException.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import org.springframework.core.NestedRuntimeException;
@@ -24,15 +20,14 @@
@SuppressWarnings("serial")
public class DependencyManagerException extends NestedRuntimeException {
- public DependencyManagerException(String arg0) {
- super(arg0);
- // TODO Auto-generated constructor stub
- }
+ public DependencyManagerException(String arg0) {
+ super(arg0);
+ // TODO Auto-generated constructor stub
+ }
- public DependencyManagerException(String arg0, Throwable arg1) {
- super(arg0, arg1);
- // TODO Auto-generated constructor stub
- }
+ public DependencyManagerException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DispatchFrame.java b/cuebot/src/main/java/com/imageworks/spcue/DispatchFrame.java
index 1bd3806a9..9e5c856b6 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DispatchFrame.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DispatchFrame.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.Optional;
@@ -26,51 +22,50 @@
public class DispatchFrame extends FrameEntity implements FrameInterface {
- public int retries;
- public FrameState state;
+ public int retries;
+ public FrameState state;
- public String show;
- public String shot;
- public String owner;
- public Optional uid;
- public String logDir;
- public String command;
- public String range;
- public int chunkSize;
+ public String show;
+ public String shot;
+ public String owner;
+ public Optional uid;
+ public String logDir;
+ public String command;
+ public String range;
+ public int chunkSize;
- public String layerName;
- public String jobName;
+ public String layerName;
+ public String jobName;
- public int minCores;
- public int maxCores;
- public boolean threadable;
- public int minGpus;
- public int maxGpus;
- public long minGpuMemory;
+ public int minCores;
+ public int maxCores;
+ public boolean threadable;
+ public int minGpus;
+ public int maxGpus;
+ public long minGpuMemory;
- // A comma separated list of services
- public String services;
+ // A comma separated list of services
+ public String services;
- // The Operational System this frame is expected to run in
- public String os;
+ // The Operational System this frame is expected to run in
+ public String os;
- // Memory requirement for this frame in bytes
- private long minMemory;
+ // Memory requirement for this frame in bytes
+ private long minMemory;
- // Soft limit to be enforced for this frame in bytes
- public long softMemoryLimit;
+ // Soft limit to be enforced for this frame in bytes
+ public long softMemoryLimit;
- // Hard limit to be enforced for this frame in bytes
- public long hardMemoryLimit;
+ // Hard limit to be enforced for this frame in bytes
+ public long hardMemoryLimit;
- public void setMinMemory(long minMemory) {
- this.minMemory = minMemory;
- this.softMemoryLimit = (long)(((double)minMemory) * Dispatcher.SOFT_MEMORY_MULTIPLIER);
- this.hardMemoryLimit = (long)(((double)minMemory) * Dispatcher.HARD_MEMORY_MULTIPLIER);
- }
+ public void setMinMemory(long minMemory) {
+ this.minMemory = minMemory;
+ this.softMemoryLimit = (long) (((double) minMemory) * Dispatcher.SOFT_MEMORY_MULTIPLIER);
+ this.hardMemoryLimit = (long) (((double) minMemory) * Dispatcher.HARD_MEMORY_MULTIPLIER);
+ }
- public long getMinMemory() {
- return this.minMemory;
- }
+ public long getMinMemory() {
+ return this.minMemory;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DispatchHost.java b/cuebot/src/main/java/com/imageworks/spcue/DispatchHost.java
index 40a3e6bbc..37060a244 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DispatchHost.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DispatchHost.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.dispatcher.ResourceContainer;
@@ -30,167 +26,164 @@
public class DispatchHost extends Entity
implements HostInterface, FacilityInterface, ResourceContainer {
- private static final Logger logger = LogManager.getLogger(DispatchHost.class);
-
- public String facilityId;
- public String allocationId;
- public LockState lockState;
- public HardwareState hardwareState;
-
- public int cores;
- public int idleCores;
-
- public int gpus;
- public int idleGpus;
-
- // Basically an 0 = auto, 1 = all.
- public int threadMode;
-
- public long memory;
- public long idleMemory;
- public long gpuMemory;
- public long idleGpuMemory;
- public String tags;
- private String os;
-
- public boolean isNimby;
- public boolean isLocalDispatch = false;
-
- /**
- * Number of cores that will be added to the first proc
- * booked to this host.
- */
- public int strandedCores = 0;
- public int strandedGpus = 0;
-
- // To reserve resources for future gpu job
- long idleMemoryOrig = 0;
- int idleCoresOrig = 0;
- long idleGpuMemoryOrig = 0;
- int idleGpusOrig = 0;
-
- public String getHostId() {
- return id;
- }
-
- public String getAllocationId() {
- return allocationId;
- }
-
- public String getFacilityId() {
- return facilityId;
+ private static final Logger logger = LogManager.getLogger(DispatchHost.class);
+
+ public String facilityId;
+ public String allocationId;
+ public LockState lockState;
+ public HardwareState hardwareState;
+
+ public int cores;
+ public int idleCores;
+
+ public int gpus;
+ public int idleGpus;
+
+ // Basically an 0 = auto, 1 = all.
+ public int threadMode;
+
+ public long memory;
+ public long idleMemory;
+ public long gpuMemory;
+ public long idleGpuMemory;
+ public String tags;
+ private String os;
+
+ public boolean isNimby;
+ public boolean isLocalDispatch = false;
+
+ /**
+ * Number of cores that will be added to the first proc booked to this host.
+ */
+ public int strandedCores = 0;
+ public int strandedGpus = 0;
+
+ // To reserve resources for future gpu job
+ long idleMemoryOrig = 0;
+ int idleCoresOrig = 0;
+ long idleGpuMemoryOrig = 0;
+ int idleGpusOrig = 0;
+
+ public String getHostId() {
+ return id;
+ }
+
+ public String getAllocationId() {
+ return allocationId;
+ }
+
+ public String getFacilityId() {
+ return facilityId;
+ }
+
+ public String[] getOs() {
+ return this.os.split(",");
+ }
+
+ public void setOs(String os) {
+ this.os = os;
+ }
+
+ public boolean canHandleNegativeCoresRequest(int requestedCores) {
+ // Request is positive, no need to test further.
+ if (requestedCores > 0) {
+ logger.debug(getName() + " can handle the job with " + requestedCores + " cores.");
+ return true;
}
-
- public String[] getOs() {
- return this.os.split(",");
- }
-
- public void setOs(String os) {
- this.os = os;
+ // All cores are available, validate the request.
+ if (cores == idleCores) {
+ logger.debug(getName() + " can handle the job with " + requestedCores + " cores.");
+ return true;
}
-
- public boolean canHandleNegativeCoresRequest(int requestedCores) {
- // Request is positive, no need to test further.
- if (requestedCores > 0) {
- logger.debug(getName() + " can handle the job with " + requestedCores + " cores.");
- return true;
- }
- // All cores are available, validate the request.
- if (cores == idleCores) {
- logger.debug(getName() + " can handle the job with " + requestedCores + " cores.");
- return true;
- }
- // Some or all cores are busy, avoid booking again.
- logger.debug(getName() + " cannot handle the job with " + requestedCores + " cores.");
- return false;
+ // Some or all cores are busy, avoid booking again.
+ logger.debug(getName() + " cannot handle the job with " + requestedCores + " cores.");
+ return false;
+ }
+
+ public int handleNegativeCoresRequirement(int requestedCores) {
+ // If we request a <=0 amount of cores, return positive core count.
+ // Request -2 on a 24 core machine will return 22.
+
+ if (requestedCores > 0) {
+ // Do not process positive core requests.
+ logger.debug("Requested " + requestedCores + " cores.");
+ return requestedCores;
}
-
- public int handleNegativeCoresRequirement(int requestedCores) {
- // If we request a <=0 amount of cores, return positive core count.
- // Request -2 on a 24 core machine will return 22.
-
- if (requestedCores > 0) {
- // Do not process positive core requests.
- logger.debug("Requested " + requestedCores + " cores.");
- return requestedCores;
- }
- if (requestedCores <=0 && idleCores < cores) {
- // If request is negative but cores are already used, return 0.
- // We don't want to overbook the host.
- logger.debug("Requested " + requestedCores + " cores, but the host is busy and cannot book more jobs.");
- return 0;
- }
- // Book all cores minus the request
- int totalCores = idleCores + requestedCores;
- logger.debug("Requested " + requestedCores + " cores <= 0, " +
- idleCores + " cores are free, booking " + totalCores + " cores");
- return totalCores;
+ if (requestedCores <= 0 && idleCores < cores) {
+ // If request is negative but cores are already used, return 0.
+ // We don't want to overbook the host.
+ logger.debug("Requested " + requestedCores
+ + " cores, but the host is busy and cannot book more jobs.");
+ return 0;
}
-
- @Override
- public boolean hasAdditionalResources(int minCores, long minMemory, int minGpus, long minGpuMemory) {
- minCores = handleNegativeCoresRequirement(minCores);
- if (idleCores < minCores) {
- return false;
- }
- if (minCores <= 0) {
- return false;
- }
- else if (idleMemory < minMemory) {
- return false;
- }
- else if (idleGpus < minGpus) {
- return false;
- }
- else if (idleGpuMemory < minGpuMemory) {
- return false;
- }
-
- return true;
+ // Book all cores minus the request
+ int totalCores = idleCores + requestedCores;
+ logger.debug("Requested " + requestedCores + " cores <= 0, " + idleCores
+ + " cores are free, booking " + totalCores + " cores");
+ return totalCores;
+ }
+
+ @Override
+ public boolean hasAdditionalResources(int minCores, long minMemory, int minGpus,
+ long minGpuMemory) {
+ minCores = handleNegativeCoresRequirement(minCores);
+ if (idleCores < minCores) {
+ return false;
}
-
- @Override
- public void useResources(int coreUnits, long memory, int gpuUnits, long gpuMemory) {
- idleCores = idleCores - coreUnits;
- idleMemory = idleMemory - memory;
- idleGpus = idleGpus - gpuUnits;
- idleGpuMemory = idleGpuMemory - gpuMemory;
+ if (minCores <= 0) {
+ return false;
+ } else if (idleMemory < minMemory) {
+ return false;
+ } else if (idleGpus < minGpus) {
+ return false;
+ } else if (idleGpuMemory < minGpuMemory) {
+ return false;
}
- /**
- * If host has idle gpu, remove enough resources to book a gpu frame later.
- *
- */
- public void removeGpu() {
- if (idleGpuMemory > 0 && idleGpuMemoryOrig == 0) {
- idleMemoryOrig = idleMemory;
- idleCoresOrig = idleCores;
- idleGpuMemoryOrig = idleGpuMemory;
- idleGpusOrig = idleGpus;
-
- idleMemory = idleMemory - Math.min(CueUtil.GB4, idleMemory);
- idleCores = idleCores - Math.min(100, idleCores);
- idleGpuMemory = idleGpuMemory - Math.min(CueUtil.GB4, idleGpuMemory);
- idleGpus = idleGpus - Math.min(1, idleGpus);
- }
+ return true;
+ }
+
+ @Override
+ public void useResources(int coreUnits, long memory, int gpuUnits, long gpuMemory) {
+ idleCores = idleCores - coreUnits;
+ idleMemory = idleMemory - memory;
+ idleGpus = idleGpus - gpuUnits;
+ idleGpuMemory = idleGpuMemory - gpuMemory;
+ }
+
+ /**
+ * If host has idle gpu, remove enough resources to book a gpu frame later.
+ *
+ */
+ public void removeGpu() {
+ if (idleGpuMemory > 0 && idleGpuMemoryOrig == 0) {
+ idleMemoryOrig = idleMemory;
+ idleCoresOrig = idleCores;
+ idleGpuMemoryOrig = idleGpuMemory;
+ idleGpusOrig = idleGpus;
+
+ idleMemory = idleMemory - Math.min(CueUtil.GB4, idleMemory);
+ idleCores = idleCores - Math.min(100, idleCores);
+ idleGpuMemory = idleGpuMemory - Math.min(CueUtil.GB4, idleGpuMemory);
+ idleGpus = idleGpus - Math.min(1, idleGpus);
}
-
- /**
- * If host had idle gpu removed, restore the host to the origional state.
- *
- */
- public void restoreGpu() {
- if (idleGpuMemoryOrig > 0) {
- idleMemory = idleMemoryOrig;
- idleCores = idleCoresOrig;
- idleGpuMemory = idleGpuMemoryOrig;
- idleGpus = idleGpusOrig;
-
- idleMemoryOrig = 0;
- idleCoresOrig = 0;
- idleGpuMemoryOrig = 0;
- idleGpusOrig = 0;
- }
+ }
+
+ /**
+ * If host had idle gpu removed, restore the host to the origional state.
+ *
+ */
+ public void restoreGpu() {
+ if (idleGpuMemoryOrig > 0) {
+ idleMemory = idleMemoryOrig;
+ idleCores = idleCoresOrig;
+ idleGpuMemory = idleGpuMemoryOrig;
+ idleGpus = idleGpusOrig;
+
+ idleMemoryOrig = 0;
+ idleCoresOrig = 0;
+ idleGpuMemoryOrig = 0;
+ idleGpusOrig = 0;
}
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/DispatchJob.java b/cuebot/src/main/java/com/imageworks/spcue/DispatchJob.java
index 5684cbfab..347565b10 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/DispatchJob.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/DispatchJob.java
@@ -2,31 +2,26 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.job.JobState;
public class DispatchJob extends JobEntity implements JobInterface {
- public int maxRetries;
- public boolean paused;
- public boolean autoEat;
- public boolean autoBook;
- public boolean autoUnbook;
- public JobState state;
+ public int maxRetries;
+ public boolean paused;
+ public boolean autoEat;
+ public boolean autoBook;
+ public boolean autoUnbook;
+ public JobState state;
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/Entity.java b/cuebot/src/main/java/com/imageworks/spcue/Entity.java
index d45b37ab2..b216893f6 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/Entity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/Entity.java
@@ -2,71 +2,66 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class Entity implements EntityInterface {
- public String id = null;
- public String name = "unknown";
+ public String id = null;
+ public String name = "unknown";
- public Entity() { }
+ public Entity() {}
- public Entity(String id) {
- this.id = id;
- }
+ public Entity(String id) {
+ this.id = id;
+ }
- public Entity(String id, String name) {
- this.id = id;
- this.name = name;
- }
+ public Entity(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
- public String getId() {
- return id;
- }
- public String getName() {
- return name;
- }
+ public String getId() {
+ return id;
+ }
- public boolean isNew() {
- return id == null;
- }
+ public String getName() {
+ return name;
+ }
- @Override
- public String toString() {
- return String.format("%s/%s", getName(), getId());
- }
+ public boolean isNew() {
+ return id == null;
+ }
- @Override
- public int hashCode() {
- if (id != null) {
- return id.hashCode();
- }
- else {
- return super.hashCode();
- }
+ @Override
+ public String toString() {
+ return String.format("%s/%s", getName(), getId());
+ }
+
+ @Override
+ public int hashCode() {
+ if (id != null) {
+ return id.hashCode();
+ } else {
+ return super.hashCode();
}
+ }
- @Override
- public boolean equals(Object other) {
- if (other == null) {
- return false;
- }
- return this.toString().equals(other.toString());
+ @Override
+ public boolean equals(Object other) {
+ if (other == null) {
+ return false;
}
+ return this.toString().equals(other.toString());
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityCreationError.java b/cuebot/src/main/java/com/imageworks/spcue/EntityCreationError.java
index bbe51cf18..6c1a243f8 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityCreationError.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityCreationError.java
@@ -2,49 +2,44 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class EntityCreationError extends EntityException {
- public EntityCreationError() {
- // TODO Auto-generated constructor stub
- }
+ public EntityCreationError() {
+ // TODO Auto-generated constructor stub
+ }
- public EntityCreationError(String message, EntityInterface entity) {
- super("failed to create entity of type: " + entity.getClass()
- + " with name: " + entity.getName() + " ," + message, entity);
- }
+ public EntityCreationError(String message, EntityInterface entity) {
+ super("failed to create entity of type: " + entity.getClass() + " with name: "
+ + entity.getName() + " ," + message, entity);
+ }
- public EntityCreationError(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityCreationError(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public EntityCreationError(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public EntityCreationError(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public EntityCreationError(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityCreationError(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityException.java b/cuebot/src/main/java/com/imageworks/spcue/EntityException.java
index 802d6c219..463ec588c 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityException.java
@@ -2,52 +2,47 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class EntityException extends SpcueRuntimeException {
- @SuppressWarnings("unused")
- private EntityInterface entity;
+ @SuppressWarnings("unused")
+ private EntityInterface entity;
- public EntityException() {
- // TODO Auto-generated constructor stub
- }
+ public EntityException() {
+ // TODO Auto-generated constructor stub
+ }
- public EntityException(String message, EntityInterface e) {
- super(message);
- entity = e;
- }
+ public EntityException(String message, EntityInterface e) {
+ super(message);
+ entity = e;
+ }
- public EntityException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public EntityException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public EntityException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public EntityException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityInterface.java b/cuebot/src/main/java/com/imageworks/spcue/EntityInterface.java
index 47660eb8c..a9fbd0765 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityInterface.java
@@ -2,26 +2,22 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface EntityInterface {
- public String getName();
- public String getId();
-}
+ public String getName();
+ public String getId();
+}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityModificationError.java b/cuebot/src/main/java/com/imageworks/spcue/EntityModificationError.java
index 87bbb8ff5..fb347f3d6 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityModificationError.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityModificationError.java
@@ -2,49 +2,44 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class EntityModificationError extends EntityException {
- public EntityModificationError() {
- // TODO Auto-generated constructor stub
- }
+ public EntityModificationError() {
+ // TODO Auto-generated constructor stub
+ }
- public EntityModificationError(String message, EntityInterface e) {
- super(message, e);
- // TODO Auto-generated constructor stub
- }
+ public EntityModificationError(String message, EntityInterface e) {
+ super(message, e);
+ // TODO Auto-generated constructor stub
+ }
- public EntityModificationError(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityModificationError(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public EntityModificationError(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public EntityModificationError(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public EntityModificationError(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityModificationError(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityNotFoundException.java b/cuebot/src/main/java/com/imageworks/spcue/EntityNotFoundException.java
index 8ec27a5ae..f463904c4 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityNotFoundException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityNotFoundException.java
@@ -1,36 +1,31 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
package com.imageworks.spcue;
-
import org.springframework.core.NestedRuntimeException;
-
public class EntityNotFoundException extends NestedRuntimeException {
- private static final long serialVersionUID = -5612998213656259822L;
+ private static final long serialVersionUID = -5612998213656259822L;
- public EntityNotFoundException(String message) {
- super(message);
- }
+ public EntityNotFoundException(String message) {
+ super(message);
+ }
- public EntityNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
+ public EntityNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityRemovalError.java b/cuebot/src/main/java/com/imageworks/spcue/EntityRemovalError.java
index a7dfc48d3..31379fbaf 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityRemovalError.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityRemovalError.java
@@ -2,49 +2,44 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class EntityRemovalError extends EntityException {
- public EntityRemovalError() {
- // TODO Auto-generated constructor stub
- }
+ public EntityRemovalError() {
+ // TODO Auto-generated constructor stub
+ }
- public EntityRemovalError(String message, EntityInterface entity) {
- super("failed to create entity of type: " + entity.getClass()
- + " with name: " + entity.getName() + " ," + message, entity);
- }
+ public EntityRemovalError(String message, EntityInterface entity) {
+ super("failed to create entity of type: " + entity.getClass() + " with name: "
+ + entity.getName() + " ," + message, entity);
+ }
- public EntityRemovalError(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityRemovalError(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public EntityRemovalError(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public EntityRemovalError(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public EntityRemovalError(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityRemovalError(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/EntityRetrievalException.java b/cuebot/src/main/java/com/imageworks/spcue/EntityRetrievalException.java
index cd5eb5633..9ae399952 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/EntityRetrievalException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/EntityRetrievalException.java
@@ -2,44 +2,39 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class EntityRetrievalException extends RuntimeException {
- public EntityRetrievalException() {
- // TODO Auto-generated constructor stub
- }
+ public EntityRetrievalException() {
+ // TODO Auto-generated constructor stub
+ }
- public EntityRetrievalException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public EntityRetrievalException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public EntityRetrievalException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityRetrievalException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
- public EntityRetrievalException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public EntityRetrievalException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ExecutionSummary.java b/cuebot/src/main/java/com/imageworks/spcue/ExecutionSummary.java
index afe85121a..87a499060 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ExecutionSummary.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ExecutionSummary.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
/**
@@ -24,77 +20,76 @@
*/
public class ExecutionSummary {
- public double standardDeviation;
- public long coreTime;
- public long coreTimeSuccess;
- public long coreTimeFail;
- public long gpuTime;
- public long gpuTimeSuccess;
- public long gpuTimeFail;
- public long highMemoryKb;
-
- public long getHighMemoryKb() {
- return highMemoryKb;
- }
-
- public void setHighMemoryKb(long highMemoryKb) {
- this.highMemoryKb = highMemoryKb;
- }
-
- public double getStandardDeviation() {
- return standardDeviation;
- }
-
- public void setStandardDeviation(double standardDeviation) {
- this.standardDeviation = standardDeviation;
- }
-
- public long getCoreTime() {
- return coreTime;
- }
-
- public void setCoreTime(long coreTime) {
- this.coreTime = coreTime;
- }
-
- public long getCoreTimeSuccess() {
- return coreTimeSuccess;
- }
-
- public void setCoreTimeSuccess(long coreTimeSuccess) {
- this.coreTimeSuccess = coreTimeSuccess;
- }
-
- public long getCoreTimeFail() {
- return coreTimeFail;
- }
-
- public void setCoreTimeFail(long coreTimeFail) {
- this.coreTimeFail = coreTimeFail;
- }
-
- public long getGpuTime() {
- return gpuTime;
- }
-
- public void setGpuTime(long gpuTime) {
- this.gpuTime = gpuTime;
- }
-
- public long getGpuTimeSuccess() {
- return gpuTimeSuccess;
- }
-
- public void setGpuTimeSuccess(long gpuTimeSuccess) {
- this.gpuTimeSuccess = gpuTimeSuccess;
- }
-
- public long getGpuTimeFail() {
- return gpuTimeFail;
- }
-
- public void setGpuTimeFail(long gpuTimeFail) {
- this.gpuTimeFail = gpuTimeFail;
- }
+ public double standardDeviation;
+ public long coreTime;
+ public long coreTimeSuccess;
+ public long coreTimeFail;
+ public long gpuTime;
+ public long gpuTimeSuccess;
+ public long gpuTimeFail;
+ public long highMemoryKb;
+
+ public long getHighMemoryKb() {
+ return highMemoryKb;
+ }
+
+ public void setHighMemoryKb(long highMemoryKb) {
+ this.highMemoryKb = highMemoryKb;
+ }
+
+ public double getStandardDeviation() {
+ return standardDeviation;
+ }
+
+ public void setStandardDeviation(double standardDeviation) {
+ this.standardDeviation = standardDeviation;
+ }
+
+ public long getCoreTime() {
+ return coreTime;
+ }
+
+ public void setCoreTime(long coreTime) {
+ this.coreTime = coreTime;
+ }
+
+ public long getCoreTimeSuccess() {
+ return coreTimeSuccess;
+ }
+
+ public void setCoreTimeSuccess(long coreTimeSuccess) {
+ this.coreTimeSuccess = coreTimeSuccess;
+ }
+
+ public long getCoreTimeFail() {
+ return coreTimeFail;
+ }
+
+ public void setCoreTimeFail(long coreTimeFail) {
+ this.coreTimeFail = coreTimeFail;
+ }
+
+ public long getGpuTime() {
+ return gpuTime;
+ }
+
+ public void setGpuTime(long gpuTime) {
+ this.gpuTime = gpuTime;
+ }
+
+ public long getGpuTimeSuccess() {
+ return gpuTimeSuccess;
+ }
+
+ public void setGpuTimeSuccess(long gpuTimeSuccess) {
+ this.gpuTimeSuccess = gpuTimeSuccess;
+ }
+
+ public long getGpuTimeFail() {
+ return gpuTimeFail;
+ }
+
+ public void setGpuTimeFail(long gpuTimeFail) {
+ this.gpuTimeFail = gpuTimeFail;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FacilityEntity.java b/cuebot/src/main/java/com/imageworks/spcue/FacilityEntity.java
index b9d26d1f8..14d1db864 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FacilityEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FacilityEntity.java
@@ -2,33 +2,28 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class FacilityEntity extends Entity implements FacilityInterface {
- public FacilityEntity() {}
+ public FacilityEntity() {}
- public FacilityEntity(String id) {
- this.id = id;
- }
+ public FacilityEntity(String id) {
+ this.id = id;
+ }
- public String getFacilityId() {
- return id;
- }
+ public String getFacilityId() {
+ return id;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FacilityInterface.java b/cuebot/src/main/java/com/imageworks/spcue/FacilityInterface.java
index 0a83cd58b..26cd1abe0 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FacilityInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FacilityInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface FacilityInterface extends EntityInterface {
- public String getFacilityId();
+ public String getFacilityId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FilterEntity.java b/cuebot/src/main/java/com/imageworks/spcue/FilterEntity.java
index 22bea4b46..3c30f8b9c 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FilterEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FilterEntity.java
@@ -2,47 +2,42 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.filter.FilterType;
public class FilterEntity extends Entity implements FilterInterface {
- public FilterType type;
- public String showId;
- public boolean enabled;
- public float order;
+ public FilterType type;
+ public String showId;
+ public boolean enabled;
+ public float order;
- public String getId() {
- return id;
- }
+ public String getId() {
+ return id;
+ }
- public String getName() {
- return name;
- }
+ public String getName() {
+ return name;
+ }
- public String getFilterId() {
- return id;
- }
+ public String getFilterId() {
+ return id;
+ }
- public String getShowId() {
- return showId;
- }
+ public String getShowId() {
+ return showId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FilterInterface.java b/cuebot/src/main/java/com/imageworks/spcue/FilterInterface.java
index 1c6441fec..0805749ab 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FilterInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FilterInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface FilterInterface extends ShowInterface {
- public String getFilterId();
+ public String getFilterId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FrameDetail.java b/cuebot/src/main/java/com/imageworks/spcue/FrameDetail.java
index 891523805..cb95b341f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FrameDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FrameDetail.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.sql.Timestamp;
@@ -25,18 +21,17 @@
public class FrameDetail extends FrameEntity implements FrameInterface {
- public FrameState state;
- public int number;
- public int dependCount;
- public int retryCount;
- public int exitStatus;
- public long maxRss;
- public int dispatchOrder;
- public String lastResource;
-
- public Timestamp dateStarted;
- public Timestamp dateStopped;
- public Timestamp dateUpdated;
- public Timestamp dateLLU;
+ public FrameState state;
+ public int number;
+ public int dependCount;
+ public int retryCount;
+ public int exitStatus;
+ public long maxRss;
+ public int dispatchOrder;
+ public String lastResource;
+
+ public Timestamp dateStarted;
+ public Timestamp dateStopped;
+ public Timestamp dateUpdated;
+ public Timestamp dateLLU;
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FrameEntity.java b/cuebot/src/main/java/com/imageworks/spcue/FrameEntity.java
index 8ba4bee88..eb9a3d080 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FrameEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FrameEntity.java
@@ -2,44 +2,39 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class FrameEntity extends LayerEntity implements FrameInterface {
- public String layerId;
- public int version;
+ public String layerId;
+ public int version;
- public FrameEntity() {}
+ public FrameEntity() {}
- public FrameEntity(String id) {
- this.id = id;
- }
+ public FrameEntity(String id) {
+ this.id = id;
+ }
- public String getFrameId() {
- return id;
- }
+ public String getFrameId() {
+ return id;
+ }
- public String getLayerId() {
- return layerId;
- }
+ public String getLayerId() {
+ return layerId;
+ }
- public int getVersion() {
- return version;
- }
+ public int getVersion() {
+ return version;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FrameInterface.java b/cuebot/src/main/java/com/imageworks/spcue/FrameInterface.java
index 945685444..d60325a7c 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FrameInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FrameInterface.java
@@ -1,35 +1,28 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface FrameInterface extends LayerInterface {
- public String getFrameId();
+ public String getFrameId();
- /**
- * To change a frame state, you must have the same version of the frame that
- * exists in the DB. If the version changes, any operation that changes the
- * state will fail.
- *
- * @return the time stamp that represents the last time this frame was
- * updated.
- */
- public int getVersion();
+ /**
+ * To change a frame state, you must have the same version of the frame that exists in the DB. If
+ * the version changes, any operation that changes the state will fail.
+ *
+ * @return the time stamp that represents the last time this frame was updated.
+ */
+ public int getVersion();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/FrameStateTotals.java b/cuebot/src/main/java/com/imageworks/spcue/FrameStateTotals.java
index cf8c96d58..fa9e33c17 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/FrameStateTotals.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/FrameStateTotals.java
@@ -2,95 +2,90 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class FrameStateTotals {
- public int waiting = 0;
- public int running = 0;
- public int depend = 0;
- public int dead = 0;
- public int eaten = 0;
- public int succeeded = 0;
- public int total = 0;
- public int checkpoint = 0;
-
- public int getWaiting() {
- return waiting;
- }
-
- public void setWaiting(int waiting) {
- this.waiting = waiting;
- }
-
- public int getRunning() {
- return running;
- }
-
- public void setRunning(int running) {
- this.running = running;
- }
-
- public int getDepend() {
- return depend;
- }
-
- public void setDepend(int depend) {
- this.depend = depend;
- }
-
- public int getDead() {
- return dead;
- }
-
- public void setDead(int dead) {
- this.dead = dead;
- }
-
- public int getEaten() {
- return eaten;
- }
-
- public void setEaten(int eaten) {
- this.eaten = eaten;
- }
-
- public int getSucceeded() {
- return succeeded;
- }
-
- public void setSucceeded(int succeeded) {
- this.succeeded = succeeded;
- }
-
- public int getTotal() {
- return total;
- }
-
- public void setTotal(int total) {
- this.total = total;
- }
-
- public int getCheckpoint() {
- return checkpoint;
- }
-
- public void setCheckpoint(int checkpoint) {
- this.checkpoint = checkpoint;
- }
+ public int waiting = 0;
+ public int running = 0;
+ public int depend = 0;
+ public int dead = 0;
+ public int eaten = 0;
+ public int succeeded = 0;
+ public int total = 0;
+ public int checkpoint = 0;
+
+ public int getWaiting() {
+ return waiting;
+ }
+
+ public void setWaiting(int waiting) {
+ this.waiting = waiting;
+ }
+
+ public int getRunning() {
+ return running;
+ }
+
+ public void setRunning(int running) {
+ this.running = running;
+ }
+
+ public int getDepend() {
+ return depend;
+ }
+
+ public void setDepend(int depend) {
+ this.depend = depend;
+ }
+
+ public int getDead() {
+ return dead;
+ }
+
+ public void setDead(int dead) {
+ this.dead = dead;
+ }
+
+ public int getEaten() {
+ return eaten;
+ }
+
+ public void setEaten(int eaten) {
+ this.eaten = eaten;
+ }
+
+ public int getSucceeded() {
+ return succeeded;
+ }
+
+ public void setSucceeded(int succeeded) {
+ this.succeeded = succeeded;
+ }
+
+ public int getTotal() {
+ return total;
+ }
+
+ public void setTotal(int total) {
+ this.total = total;
+ }
+
+ public int getCheckpoint() {
+ return checkpoint;
+ }
+
+ public void setCheckpoint(int checkpoint) {
+ this.checkpoint = checkpoint;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/GroupDetail.java b/cuebot/src/main/java/com/imageworks/spcue/GroupDetail.java
index cd9f8a998..1d4c468d2 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/GroupDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/GroupDetail.java
@@ -2,53 +2,48 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class GroupDetail extends Entity implements GroupInterface, DepartmentInterface {
- public int jobMinCores = -1;
- public int jobMaxCores = -1;
- public int jobMinGpus = -1;
- public int jobMaxGpus = -1;
- public int jobPriority = -1;
+ public int jobMinCores = -1;
+ public int jobMaxCores = -1;
+ public int jobMinGpus = -1;
+ public int jobMaxGpus = -1;
+ public int jobPriority = -1;
- public int minCores = -1;
- public int maxCores = -1;
+ public int minCores = -1;
+ public int maxCores = -1;
- public int minGpus = -1;
- public int maxGpus = -1;
+ public int minGpus = -1;
+ public int maxGpus = -1;
- public String parentId = null;
- public String showId;
- public String deptId;
+ public String parentId = null;
+ public String showId;
+ public String deptId;
- @Override
- public String getShowId() {
- return showId;
- }
+ @Override
+ public String getShowId() {
+ return showId;
+ }
- public String getGroupId() {
- return id;
- }
+ public String getGroupId() {
+ return id;
+ }
- @Override
- public String getDepartmentId() {
- return deptId;
- }
+ @Override
+ public String getDepartmentId() {
+ return deptId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/GroupEntity.java b/cuebot/src/main/java/com/imageworks/spcue/GroupEntity.java
index ffcb2ac02..49d81e967 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/GroupEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/GroupEntity.java
@@ -2,38 +2,31 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class GroupEntity extends Entity implements GroupInterface {
- public String showId;
-
- @Override
- public String getGroupId() {
- return id;
- }
-
- @Override
- public String getShowId() {
- return showId;
- }
+ public String showId;
+ @Override
+ public String getGroupId() {
+ return id;
+ }
+ @Override
+ public String getShowId() {
+ return showId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/GroupInterface.java b/cuebot/src/main/java/com/imageworks/spcue/GroupInterface.java
index f5ae74549..a00118941 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/GroupInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/GroupInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface GroupInterface extends ShowInterface {
- public String getGroupId();
+ public String getGroupId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/HistoricalJobTransferException.java b/cuebot/src/main/java/com/imageworks/spcue/HistoricalJobTransferException.java
index bbe557a64..eafe9701f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/HistoricalJobTransferException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/HistoricalJobTransferException.java
@@ -2,44 +2,39 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class HistoricalJobTransferException extends SpcueRuntimeException {
- public HistoricalJobTransferException() {
- // TODO Auto-generated constructor stub
- }
+ public HistoricalJobTransferException() {
+ // TODO Auto-generated constructor stub
+ }
- public HistoricalJobTransferException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public HistoricalJobTransferException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public HistoricalJobTransferException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public HistoricalJobTransferException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public HistoricalJobTransferException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public HistoricalJobTransferException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/HostConfigurationErrorException.java b/cuebot/src/main/java/com/imageworks/spcue/HostConfigurationErrorException.java
index 8147659b0..a7eb2b393 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/HostConfigurationErrorException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/HostConfigurationErrorException.java
@@ -2,45 +2,40 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class HostConfigurationErrorException extends SpcueRuntimeException {
- public HostConfigurationErrorException() {
- super();
- // TODO Auto-generated constructor stub
- }
+ public HostConfigurationErrorException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
- public HostConfigurationErrorException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public HostConfigurationErrorException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public HostConfigurationErrorException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public HostConfigurationErrorException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public HostConfigurationErrorException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public HostConfigurationErrorException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/HostEntity.java b/cuebot/src/main/java/com/imageworks/spcue/HostEntity.java
index 5a019e8f1..172d5593e 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/HostEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/HostEntity.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.Date;
@@ -27,56 +23,55 @@
public class HostEntity extends Entity implements HostInterface {
- public String facilityId;
- public String allocId;
- public HardwareState state;
- public LockState lockState;
- public boolean nimbyEnabled;
-
- public int procs;
- public int cores;
- public int idleCores;
- public long memory;
- public long idleMemory;
- public int gpus;
- public int idleGpus;
- public long gpuMemory;
- public long idleGpuMemory;
-
- public boolean unlockAtBoot;
-
- public Date dateCreated;
- public Date datePinged;
- public Date dateBooted;
-
- public HostEntity() {}
-
- public HostEntity(Host grpcHost) {
- this.id = grpcHost.getId();
- this.allocId = grpcHost.getAllocName();
- this.state = grpcHost.getState();
- this.lockState = grpcHost.getLockState();
- this.nimbyEnabled = grpcHost.getNimbyEnabled();
- this.cores = (int) grpcHost.getCores();
- this.idleCores = (int) grpcHost.getIdleCores();
- this.memory = grpcHost.getMemory();
- this.idleMemory = grpcHost.getIdleMemory();
- this.gpus = (int) grpcHost.getGpus();
- this.idleGpus = (int) grpcHost.getIdleGpus();
- this.gpuMemory = grpcHost.getGpuMemory();
- this.idleGpuMemory = grpcHost.getIdleGpuMemory();
- }
-
- public String getHostId() {
- return id;
- }
-
- public String getAllocationId() {
- return allocId;
- }
-
- public String getFacilityId() {
- return facilityId;
- }
+ public String facilityId;
+ public String allocId;
+ public HardwareState state;
+ public LockState lockState;
+ public boolean nimbyEnabled;
+
+ public int procs;
+ public int cores;
+ public int idleCores;
+ public long memory;
+ public long idleMemory;
+ public int gpus;
+ public int idleGpus;
+ public long gpuMemory;
+ public long idleGpuMemory;
+
+ public boolean unlockAtBoot;
+
+ public Date dateCreated;
+ public Date datePinged;
+ public Date dateBooted;
+
+ public HostEntity() {}
+
+ public HostEntity(Host grpcHost) {
+ this.id = grpcHost.getId();
+ this.allocId = grpcHost.getAllocName();
+ this.state = grpcHost.getState();
+ this.lockState = grpcHost.getLockState();
+ this.nimbyEnabled = grpcHost.getNimbyEnabled();
+ this.cores = (int) grpcHost.getCores();
+ this.idleCores = (int) grpcHost.getIdleCores();
+ this.memory = grpcHost.getMemory();
+ this.idleMemory = grpcHost.getIdleMemory();
+ this.gpus = (int) grpcHost.getGpus();
+ this.idleGpus = (int) grpcHost.getIdleGpus();
+ this.gpuMemory = grpcHost.getGpuMemory();
+ this.idleGpuMemory = grpcHost.getIdleGpuMemory();
+ }
+
+ public String getHostId() {
+ return id;
+ }
+
+ public String getAllocationId() {
+ return allocId;
+ }
+
+ public String getFacilityId() {
+ return facilityId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/HostInterface.java b/cuebot/src/main/java/com/imageworks/spcue/HostInterface.java
index 5e875652a..f3fff15e1 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/HostInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/HostInterface.java
@@ -2,24 +2,19 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface HostInterface extends AllocationInterface {
- String getHostId();
+ String getHostId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/Inherit.java b/cuebot/src/main/java/com/imageworks/spcue/Inherit.java
index 1fdb23336..b368e2380 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/Inherit.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/Inherit.java
@@ -2,34 +2,23 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
/**
- * An enumeration of possible things a job can
- * inherit from a group.
+ * An enumeration of possible things a job can inherit from a group.
*
*/
public enum Inherit {
- Priority,
- MinCores,
- MaxCores,
- MinGpus,
- MaxGpus,
- All
+ Priority, MinCores, MaxCores, MinGpus, MaxGpus, All
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/JobDetail.java b/cuebot/src/main/java/com/imageworks/spcue/JobDetail.java
index dad6f8a6d..b5a7a3e78 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/JobDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/JobDetail.java
@@ -2,17 +2,15 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package com.imageworks.spcue;
@@ -22,42 +20,41 @@
import com.imageworks.spcue.grpc.job.JobState;
public class JobDetail extends JobEntity implements JobInterface, DepartmentInterface {
- public String groupId;
- public String deptId;
- public JobState state;
- public String shot;
- public String user;
- public String email;
- public Optional uid;
- public String logDir;
- public boolean isPaused;
- public boolean isAutoEat;
- public int totalFrames;
- public int totalLayers;
- public int startTime;
- public int stopTime;
- public int maxRetries;
-
- public String os;
- public String facilityName;
- public String deptName;
- public String showName;
-
- public int priority = 1;
- public int minCoreUnits = 100;
- public int maxCoreUnits = 200000;
- public int minGpuUnits = 0;
- public int maxGpuUnits = 1000;
- public boolean isLocal = false;
- public String localHostName;
- public int localMaxCores;
- public long localMaxMemory;
- public int localThreadNumber;
- public int localMaxGpus;
- public long localMaxGpuMemory;
-
- public String getDepartmentId() {
- return deptId;
- }
+ public String groupId;
+ public String deptId;
+ public JobState state;
+ public String shot;
+ public String user;
+ public String email;
+ public Optional uid;
+ public String logDir;
+ public boolean isPaused;
+ public boolean isAutoEat;
+ public int totalFrames;
+ public int totalLayers;
+ public int startTime;
+ public int stopTime;
+ public int maxRetries;
+
+ public String os;
+ public String facilityName;
+ public String deptName;
+ public String showName;
+
+ public int priority = 1;
+ public int minCoreUnits = 100;
+ public int maxCoreUnits = 200000;
+ public int minGpuUnits = 0;
+ public int maxGpuUnits = 1000;
+ public boolean isLocal = false;
+ public String localHostName;
+ public int localMaxCores;
+ public long localMaxMemory;
+ public int localThreadNumber;
+ public int localMaxGpus;
+ public long localMaxGpuMemory;
+
+ public String getDepartmentId() {
+ return deptId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/JobDispatchException.java b/cuebot/src/main/java/com/imageworks/spcue/JobDispatchException.java
index 2dc84cf92..d12c4b896 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/JobDispatchException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/JobDispatchException.java
@@ -2,42 +2,37 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class JobDispatchException extends SpcueRuntimeException {
- public JobDispatchException() {
- // TODO Auto-generated constructor stub
- }
+ public JobDispatchException() {
+ // TODO Auto-generated constructor stub
+ }
- public JobDispatchException(String message) {
- super(message);
- }
+ public JobDispatchException(String message) {
+ super(message);
+ }
- public JobDispatchException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public JobDispatchException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public JobDispatchException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public JobDispatchException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/JobEntity.java b/cuebot/src/main/java/com/imageworks/spcue/JobEntity.java
index eec806605..d9aec9e4b 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/JobEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/JobEntity.java
@@ -2,44 +2,39 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class JobEntity extends Entity implements JobInterface {
- public String showId;
- public String facilityId;
+ public String showId;
+ public String facilityId;
- public JobEntity() {}
+ public JobEntity() {}
- public JobEntity(String id) {
- this.id = id;
- }
+ public JobEntity(String id) {
+ this.id = id;
+ }
- public String getJobId() {
- return id;
- }
+ public String getJobId() {
+ return id;
+ }
- public String getShowId() {
- return showId;
- }
+ public String getShowId() {
+ return showId;
+ }
- public String getFacilityId() {
- return facilityId;
- }
+ public String getFacilityId() {
+ return facilityId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/JobInterface.java b/cuebot/src/main/java/com/imageworks/spcue/JobInterface.java
index e53cbccbe..631925492 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/JobInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/JobInterface.java
@@ -2,25 +2,20 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface JobInterface extends ShowInterface, FacilityInterface {
- public String getJobId();
+ public String getJobId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/JobLaunchException.java b/cuebot/src/main/java/com/imageworks/spcue/JobLaunchException.java
index 56fa14984..a10bb18c4 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/JobLaunchException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/JobLaunchException.java
@@ -2,44 +2,39 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class JobLaunchException extends SpcueRuntimeException {
- public JobLaunchException() {
- // TODO Auto-generated constructor stub
- }
+ public JobLaunchException() {
+ // TODO Auto-generated constructor stub
+ }
- public JobLaunchException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public JobLaunchException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public JobLaunchException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public JobLaunchException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public JobLaunchException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public JobLaunchException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LayerDetail.java b/cuebot/src/main/java/com/imageworks/spcue/LayerDetail.java
index 575547122..d173c63dc 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LayerDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LayerDetail.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.ArrayList;
@@ -27,144 +23,143 @@
import com.imageworks.spcue.grpc.job.LayerType;
public class LayerDetail extends LayerEntity implements LayerInterface {
- public String command;
- public String range;
- public LayerType type;
- public int minimumCores;
- public int maximumCores;
- public int minimumGpus;
- public int maximumGpus;
- public boolean isThreadable;
- public long minimumMemory;
- public long minimumGpuMemory;
- public int chunkSize;
- public int timeout;
- public int timeout_llu;
- public int dispatchOrder;
- public int totalFrameCount;
-
- public Set tags = new LinkedHashSet();
- public Set services = new LinkedHashSet();
- public Set limits = new LinkedHashSet();
- public Set outputs = new LinkedHashSet();
-
- /*
- *
- */
- public List getServices() {
- return new ArrayList(services);
- }
-
- public String getCommand() {
- return command;
- }
-
- public void setCommand(String command) {
- this.command = command;
- }
-
- public String getRange() {
- return range;
- }
-
- public void setRange(String range) {
- this.range = range;
- }
-
- public LayerType getType() {
- return type;
- }
-
- public void setType(LayerType type) {
- this.type = type;
- }
-
- public int getMinimumCores() {
- return minimumCores;
- }
-
- public void setMinimumCores(int minimumCores) {
- this.minimumCores = minimumCores;
- }
-
- public boolean isThreadable() {
- return isThreadable;
- }
-
- public void setThreadable(boolean isThreadable) {
- this.isThreadable = isThreadable;
- }
-
- public int getTimeout() {
- return timeout;
- }
-
- public void setTimeout(int timeout) {
- this.timeout = timeout;
- }
-
- public int getTimeoutLLU() {
- return timeout;
- }
-
- public void setTimeoutLLU(int timeout_llu) {
- this.timeout_llu = timeout_llu;
- }
-
- public long getMinimumMemory() {
- return minimumMemory;
- }
-
- public void setMinimumMemory(long minimumMemory) {
- this.minimumMemory = minimumMemory;
- }
-
- public int getMinimumGpus() {
- return minimumGpus;
- }
-
- public void setMinimumGpus(int minimumGpus) {
- this.minimumGpus = minimumGpus;
- }
-
- public long getMinimumGpuMemory() {
- return minimumGpuMemory;
- }
-
- public void setMinimumGpuMemory(long minimumGpuMemory) {
- this.minimumGpuMemory = minimumGpuMemory;
- }
-
- public int getChunkSize() {
- return chunkSize;
- }
-
- public void setChunkSize(int chunkSize) {
- this.chunkSize = chunkSize;
- }
-
- public int getDispatchOrder() {
- return dispatchOrder;
- }
-
- public void setDispatchOrder(int dispatchOrder) {
- this.dispatchOrder = dispatchOrder;
- }
-
- public int getTotalFrameCount() {
- return totalFrameCount;
- }
+ public String command;
+ public String range;
+ public LayerType type;
+ public int minimumCores;
+ public int maximumCores;
+ public int minimumGpus;
+ public int maximumGpus;
+ public boolean isThreadable;
+ public long minimumMemory;
+ public long minimumGpuMemory;
+ public int chunkSize;
+ public int timeout;
+ public int timeout_llu;
+ public int dispatchOrder;
+ public int totalFrameCount;
+
+ public Set tags = new LinkedHashSet();
+ public Set services = new LinkedHashSet();
+ public Set limits = new LinkedHashSet();
+ public Set outputs = new LinkedHashSet();
+
+ /*
+ *
+ */
+ public List getServices() {
+ return new ArrayList(services);
+ }
+
+ public String getCommand() {
+ return command;
+ }
+
+ public void setCommand(String command) {
+ this.command = command;
+ }
+
+ public String getRange() {
+ return range;
+ }
+
+ public void setRange(String range) {
+ this.range = range;
+ }
+
+ public LayerType getType() {
+ return type;
+ }
+
+ public void setType(LayerType type) {
+ this.type = type;
+ }
+
+ public int getMinimumCores() {
+ return minimumCores;
+ }
+
+ public void setMinimumCores(int minimumCores) {
+ this.minimumCores = minimumCores;
+ }
+
+ public boolean isThreadable() {
+ return isThreadable;
+ }
+
+ public void setThreadable(boolean isThreadable) {
+ this.isThreadable = isThreadable;
+ }
+
+ public int getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(int timeout) {
+ this.timeout = timeout;
+ }
+
+ public int getTimeoutLLU() {
+ return timeout;
+ }
+
+ public void setTimeoutLLU(int timeout_llu) {
+ this.timeout_llu = timeout_llu;
+ }
+
+ public long getMinimumMemory() {
+ return minimumMemory;
+ }
+
+ public void setMinimumMemory(long minimumMemory) {
+ this.minimumMemory = minimumMemory;
+ }
+
+ public int getMinimumGpus() {
+ return minimumGpus;
+ }
+
+ public void setMinimumGpus(int minimumGpus) {
+ this.minimumGpus = minimumGpus;
+ }
+
+ public long getMinimumGpuMemory() {
+ return minimumGpuMemory;
+ }
+
+ public void setMinimumGpuMemory(long minimumGpuMemory) {
+ this.minimumGpuMemory = minimumGpuMemory;
+ }
+
+ public int getChunkSize() {
+ return chunkSize;
+ }
+
+ public void setChunkSize(int chunkSize) {
+ this.chunkSize = chunkSize;
+ }
+
+ public int getDispatchOrder() {
+ return dispatchOrder;
+ }
+
+ public void setDispatchOrder(int dispatchOrder) {
+ this.dispatchOrder = dispatchOrder;
+ }
+
+ public int getTotalFrameCount() {
+ return totalFrameCount;
+ }
- public void setTotalFrameCount(int totalFrameCount) {
- this.totalFrameCount = totalFrameCount;
- }
+ public void setTotalFrameCount(int totalFrameCount) {
+ this.totalFrameCount = totalFrameCount;
+ }
- public Set getTags() {
- return tags;
- }
+ public Set getTags() {
+ return tags;
+ }
- public void setTags(Set tags) {
- this.tags = tags;
- }
+ public void setTags(Set tags) {
+ this.tags = tags;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LayerEntity.java b/cuebot/src/main/java/com/imageworks/spcue/LayerEntity.java
index 92e11c8cb..34f26cb5b 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LayerEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LayerEntity.java
@@ -2,51 +2,46 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class LayerEntity extends Entity implements LayerInterface {
- public String showId;
- public String facilityId;
- public String jobId;
+ public String showId;
+ public String facilityId;
+ public String jobId;
- public LayerEntity() { }
+ public LayerEntity() {}
- public LayerEntity(String id) {
- this.id = id;
- }
+ public LayerEntity(String id) {
+ this.id = id;
+ }
- public String getLayerId() {
- return id;
- }
+ public String getLayerId() {
+ return id;
+ }
- public String getJobId() {
- return jobId;
- }
+ public String getJobId() {
+ return jobId;
+ }
- @Override
- public String getShowId() {
- return showId;
- }
+ @Override
+ public String getShowId() {
+ return showId;
+ }
- @Override
- public String getFacilityId() {
- return facilityId;
- }
+ @Override
+ public String getFacilityId() {
+ return facilityId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LayerInterface.java b/cuebot/src/main/java/com/imageworks/spcue/LayerInterface.java
index 414f42872..f53b1810e 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LayerInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LayerInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface LayerInterface extends JobInterface {
- public String getLayerId();
+ public String getLayerId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LayerStats.java b/cuebot/src/main/java/com/imageworks/spcue/LayerStats.java
index 0679bb17e..3edb78e4a 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LayerStats.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LayerStats.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.io.File;
@@ -27,147 +23,142 @@
public class LayerStats {
- private LayerDetail detail;
- private FrameStateTotals frameStateTotals;
- private ExecutionSummary executionSummary;
- private List threadStats;
- private List outputs;
-
- private String graphUnits;
- private float conversionUnits;
- private int scale;
+ private LayerDetail detail;
+ private FrameStateTotals frameStateTotals;
+ private ExecutionSummary executionSummary;
+ private List threadStats;
+ private List outputs;
- public List getOutputs() {
- return outputs;
- }
-
- public void setOutputs(List outputs) {
+ private String graphUnits;
+ private float conversionUnits;
+ private int scale;
- List newOutputs = new ArrayList(outputs.size());
- for (String output: outputs) {
- newOutputs.add(new File(output).getParent() + "/*");
- }
- this.outputs = newOutputs;
- }
+ public List getOutputs() {
+ return outputs;
+ }
- public List getThreadStats() {
- return threadStats;
- }
-
- public void setThreadStats(List threadStats) {
- this.threadStats = threadStats;
- setGraphScaleValues();
- }
-
- public LayerDetail getDetail() {
- return detail;
- }
-
- public void setDetail(LayerDetail detail) {
- this.detail = detail;
- }
-
- public FrameStateTotals getFrameStateTotals() {
- return frameStateTotals;
- }
-
- public void setFrameStateTotals(FrameStateTotals frameStateTotals) {
- this.frameStateTotals = frameStateTotals;
- }
-
- public ExecutionSummary getExecutionSummary() {
- return executionSummary;
- }
-
- public void setExecutionSummary(ExecutionSummary executionSummary) {
- this.executionSummary = executionSummary;
- }
-
- public int getGraphScale() {
- return scale;
- }
- public String getGraphUnits() {
- return graphUnits;
- }
-
- public String getFormattedHighMemory() {
- return String.format(Locale.ROOT, "%.1fGB",
- executionSummary.highMemoryKb / 1024.0 / 1024.0);
- }
-
- public String getFormattedProcHours() {
- return String.format(Locale.ROOT, "%.1f", executionSummary.coreTime / 3600.0);
- }
-
- public int getFailedFrames() {
- return frameStateTotals.waiting + frameStateTotals.dead + frameStateTotals.eaten;
- }
-
- public String getGraphLegend() {
- StringBuilder sb = new StringBuilder(128);
- List reversed = new ArrayList(threadStats);
- Collections.reverse(reversed);
- for(ThreadStats t: reversed) {
- sb.append("|");
- sb.append(t.getThreads());
- sb.append("+");
- sb.append("Thread ");
- }
- return sb.toString();
- }
-
- public String getGraphData() {
-
- StringBuilder sb = new StringBuilder(128);
-
- for(ThreadStats t: threadStats) {
- sb.append(String.format(Locale.ROOT, "%.2f", t.getAvgFrameTime() / conversionUnits));
- sb.append(",");
- }
- if (sb.length() > 1) {
- sb.deleteCharAt(sb.length() - 1);
- }
- return sb.toString();
- }
-
- public int getThreadAvgCount() {
- return threadStats.size();
- }
-
- /**
- * Since frame times vary wildly, anywhere from 1 second
- * to 7 days, this method will set some values so
- * average frame times are displayed in units that make
- * them easy to compare.
- *
- * Based on the highest average frame time per thread group,
- * average frame can be displayed in minutes, seconds, or hours.
- *
- */
- private void setGraphScaleValues() {
-
- int hightestAverageSec = 0;
- for(ThreadStats t: threadStats) {
- if (t.getAvgFrameTime() >= hightestAverageSec) {
- hightestAverageSec = t.getAvgFrameTime();
- }
- }
-
- if (hightestAverageSec < 60) {
- graphUnits = "Seconds";
- scale = ((hightestAverageSec / 2 + 1) * 2);
- conversionUnits = 1f;
- }
- else if (hightestAverageSec < 3600) {
- graphUnits = "Minutes";
- scale = ((hightestAverageSec / 60) + 1);
- conversionUnits = 60f;
- }
- else {
- graphUnits = "Hours";
- scale = ((hightestAverageSec / 3600) + 1);
- conversionUnits = 3600f;
- }
- }
+ public void setOutputs(List outputs) {
+
+ List newOutputs = new ArrayList(outputs.size());
+ for (String output : outputs) {
+ newOutputs.add(new File(output).getParent() + "/*");
+ }
+ this.outputs = newOutputs;
+ }
+
+ public List getThreadStats() {
+ return threadStats;
+ }
+
+ public void setThreadStats(List threadStats) {
+ this.threadStats = threadStats;
+ setGraphScaleValues();
+ }
+
+ public LayerDetail getDetail() {
+ return detail;
+ }
+
+ public void setDetail(LayerDetail detail) {
+ this.detail = detail;
+ }
+
+ public FrameStateTotals getFrameStateTotals() {
+ return frameStateTotals;
+ }
+
+ public void setFrameStateTotals(FrameStateTotals frameStateTotals) {
+ this.frameStateTotals = frameStateTotals;
+ }
+
+ public ExecutionSummary getExecutionSummary() {
+ return executionSummary;
+ }
+
+ public void setExecutionSummary(ExecutionSummary executionSummary) {
+ this.executionSummary = executionSummary;
+ }
+
+ public int getGraphScale() {
+ return scale;
+ }
+
+ public String getGraphUnits() {
+ return graphUnits;
+ }
+
+ public String getFormattedHighMemory() {
+ return String.format(Locale.ROOT, "%.1fGB", executionSummary.highMemoryKb / 1024.0 / 1024.0);
+ }
+
+ public String getFormattedProcHours() {
+ return String.format(Locale.ROOT, "%.1f", executionSummary.coreTime / 3600.0);
+ }
+
+ public int getFailedFrames() {
+ return frameStateTotals.waiting + frameStateTotals.dead + frameStateTotals.eaten;
+ }
+
+ public String getGraphLegend() {
+ StringBuilder sb = new StringBuilder(128);
+ List reversed = new ArrayList(threadStats);
+ Collections.reverse(reversed);
+ for (ThreadStats t : reversed) {
+ sb.append("|");
+ sb.append(t.getThreads());
+ sb.append("+");
+ sb.append("Thread ");
+ }
+ return sb.toString();
+ }
+
+ public String getGraphData() {
+
+ StringBuilder sb = new StringBuilder(128);
+
+ for (ThreadStats t : threadStats) {
+ sb.append(String.format(Locale.ROOT, "%.2f", t.getAvgFrameTime() / conversionUnits));
+ sb.append(",");
+ }
+ if (sb.length() > 1) {
+ sb.deleteCharAt(sb.length() - 1);
+ }
+ return sb.toString();
+ }
+
+ public int getThreadAvgCount() {
+ return threadStats.size();
+ }
+
+ /**
+ * Since frame times vary wildly, anywhere from 1 second to 7 days, this method will set some
+ * values so average frame times are displayed in units that make them easy to compare.
+ *
+ * Based on the highest average frame time per thread group, average frame can be displayed in
+ * minutes, seconds, or hours.
+ *
+ */
+ private void setGraphScaleValues() {
+
+ int hightestAverageSec = 0;
+ for (ThreadStats t : threadStats) {
+ if (t.getAvgFrameTime() >= hightestAverageSec) {
+ hightestAverageSec = t.getAvgFrameTime();
+ }
+ }
+
+ if (hightestAverageSec < 60) {
+ graphUnits = "Seconds";
+ scale = ((hightestAverageSec / 2 + 1) * 2);
+ conversionUnits = 1f;
+ } else if (hightestAverageSec < 3600) {
+ graphUnits = "Minutes";
+ scale = ((hightestAverageSec / 60) + 1);
+ conversionUnits = 60f;
+ } else {
+ graphUnits = "Hours";
+ scale = ((hightestAverageSec / 3600) + 1);
+ conversionUnits = 3600f;
+ }
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LightweightDependency.java b/cuebot/src/main/java/com/imageworks/spcue/LightweightDependency.java
index 8f940fbed..87fda00d3 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LightweightDependency.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LightweightDependency.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.depend.DependTarget;
@@ -24,28 +20,27 @@
public class LightweightDependency extends Entity implements DependInterface {
- public DependType type;
- public DependTarget target;
+ public DependType type;
+ public DependTarget target;
- public String parent = null;
+ public String parent = null;
- public String dependErJobId;
- public String dependErLayerId;
- public String dependErFrameId;
+ public String dependErJobId;
+ public String dependErLayerId;
+ public String dependErFrameId;
- public String dependOnJobId;
- public String dependOnLayerId;
- public String dependOnFrameId;
+ public String dependOnJobId;
+ public String dependOnLayerId;
+ public String dependOnFrameId;
- public boolean anyFrame;
- public boolean active;
+ public boolean anyFrame;
+ public boolean active;
- public String getName() {
- return type.toString() + "/" + dependErJobId;
- }
+ public String getName() {
+ return type.toString() + "/" + dependErJobId;
+ }
- public String toString() {
- return String.format("%s/%s", type.toString(), getId());
- }
+ public String toString() {
+ return String.format("%s/%s", type.toString(), getId());
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LimitEntity.java b/cuebot/src/main/java/com/imageworks/spcue/LimitEntity.java
index 6dee9db9b..894d5542d 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LimitEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LimitEntity.java
@@ -2,40 +2,36 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.limit.Limit;
public class LimitEntity extends Entity implements LimitInterface {
- public int maxValue;
- public int currentRunning;
+ public int maxValue;
+ public int currentRunning;
- public LimitEntity() {}
+ public LimitEntity() {}
- public LimitEntity(Limit grpcLimit) {
- this.id = grpcLimit.getId();
- this.name = grpcLimit.getName();
- this.maxValue = grpcLimit.getMaxValue();
- this.currentRunning = grpcLimit.getCurrentRunning();
- }
+ public LimitEntity(Limit grpcLimit) {
+ this.id = grpcLimit.getId();
+ this.name = grpcLimit.getName();
+ this.maxValue = grpcLimit.getMaxValue();
+ this.currentRunning = grpcLimit.getCurrentRunning();
+ }
- public String getLimitId() {
- return id;
- }
+ public String getLimitId() {
+ return id;
+ }
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LimitInterface.java b/cuebot/src/main/java/com/imageworks/spcue/LimitInterface.java
index df21166e4..1f7a39f2d 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LimitInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LimitInterface.java
@@ -2,25 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface LimitInterface extends EntityInterface {
- public String getLimitId();
+ public String getLimitId();
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/LocalHostAssignment.java b/cuebot/src/main/java/com/imageworks/spcue/LocalHostAssignment.java
index 65ce05c7e..9eee2340f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/LocalHostAssignment.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/LocalHostAssignment.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.dispatcher.ResourceContainer;
@@ -26,209 +22,205 @@
import org.apache.logging.log4j.LogManager;
/**
- * Contains information about local desktop cores a user has
- * assigned to the given job.
+ * Contains information about local desktop cores a user has assigned to the given job.
*
- * The local-only option, if true, means the job will only dispatch
- * a user's local cores. If false, the job will dispatch cores from
- * both the user's machine and the render farm.
+ * The local-only option, if true, means the job will only dispatch a user's local cores. If false,
+ * the job will dispatch cores from both the user's machine and the render farm.
*/
-public class LocalHostAssignment extends Entity
- implements ResourceContainer {
-
- private static final Logger logger = LogManager.getLogger(LocalHostAssignment.class);
-
- private int idleCoreUnits;
- private long idleMemory;
- private int idleGpuUnits;
- private long idleGpuMemory;
-
- private long maxMemory;
- private long maxGpuMemory;
- private int maxCoreUnits;
- private int maxGpuUnits;
-
- private int threads;
-
- private String hostId;
- private String jobId = null;
- private String layerId = null;
- private String frameId = null;
-
- private RenderPartitionType type;
-
- public LocalHostAssignment() { }
-
- public LocalHostAssignment(int maxCores, int threads, long maxMemory, int maxGpus, long maxGpuMemory) {
- this.maxCoreUnits = maxCores;
- this.threads = threads;
- this.maxMemory = maxMemory;
- this.maxGpuUnits = maxGpus;
- this.maxGpuMemory = maxGpuMemory;
- }
-
- public int handleNegativeCoresRequirement(int requestedCores) {
- // If we request a <=0 amount of cores, return positive core count.
- // Request -2 on a 24 core machine will return 22.
-
- if (requestedCores > 0) {
- // Do not process positive core requests.
- logger.debug("Requested " + requestedCores + " cores.");
- return requestedCores;
- }
- if (requestedCores <=0 && idleCoreUnits < threads) {
- // If request is negative but cores are already used, return 0.
- // We don't want to overbook the host.
- logger.debug("Requested " + requestedCores + " cores, but the host is busy and cannot book more jobs.");
- return 0;
- }
- // Book all cores minus the request
- int totalCores = idleCoreUnits + requestedCores;
- logger.debug("Requested " + requestedCores + " cores <= 0, " +
- idleCoreUnits + " cores are free, booking " + totalCores + " cores");
- return totalCores;
- }
-
- @Override
- public boolean hasAdditionalResources(int minCores, long minMemory, int minGpus, long minGpuMemory) {
- minCores = handleNegativeCoresRequirement(minCores);
- if (idleCoreUnits < minCores) {
- return false;
- }
- if (minCores <= 0) {
- return false;
- }
- else if (idleMemory < minMemory) {
- return false;
- }
- else if (idleGpuUnits < minGpus) {
- return false;
- }
- else if (idleGpuMemory < minGpuMemory) {
- return false;
- }
-
- return true;
- }
-
- @Override
- public void useResources(int coreUnits, long memory, int gpuUnits, long gpuMemory) {
- idleCoreUnits = idleCoreUnits - coreUnits;
- idleMemory = idleMemory - memory;
- idleGpuUnits = idleGpuUnits - gpuUnits;
- idleGpuMemory = idleGpuMemory - gpuMemory;
- }
-
- public int getThreads() {
- return threads;
- }
-
- public void setThreads(int threads) {
- this.threads = threads;
- }
-
- public long getMaxMemory() {
- return maxMemory;
- }
-
- public void setMaxMemory(long maxMemory) {
- this.maxMemory = maxMemory;
- }
-
- public int getMaxCoreUnits() {
- return maxCoreUnits;
- }
-
- public void setMaxCoreUnits(int maxCoreUnits) {
- this.maxCoreUnits = maxCoreUnits;
- }
-
- public long getIdleMemory() {
- return this.idleMemory;
- }
-
- public int getMaxGpuUnits() {
- return maxGpuUnits;
- }
-
- public void setMaxGpuUnits(int maxGpuUnits) {
- this.maxGpuUnits = maxGpuUnits;
- }
+public class LocalHostAssignment extends Entity implements ResourceContainer {
+
+ private static final Logger logger = LogManager.getLogger(LocalHostAssignment.class);
+
+ private int idleCoreUnits;
+ private long idleMemory;
+ private int idleGpuUnits;
+ private long idleGpuMemory;
+
+ private long maxMemory;
+ private long maxGpuMemory;
+ private int maxCoreUnits;
+ private int maxGpuUnits;
+
+ private int threads;
+
+ private String hostId;
+ private String jobId = null;
+ private String layerId = null;
+ private String frameId = null;
+
+ private RenderPartitionType type;
+
+ public LocalHostAssignment() {}
+
+ public LocalHostAssignment(int maxCores, int threads, long maxMemory, int maxGpus,
+ long maxGpuMemory) {
+ this.maxCoreUnits = maxCores;
+ this.threads = threads;
+ this.maxMemory = maxMemory;
+ this.maxGpuUnits = maxGpus;
+ this.maxGpuMemory = maxGpuMemory;
+ }
+
+ public int handleNegativeCoresRequirement(int requestedCores) {
+ // If we request a <=0 amount of cores, return positive core count.
+ // Request -2 on a 24 core machine will return 22.
+
+ if (requestedCores > 0) {
+ // Do not process positive core requests.
+ logger.debug("Requested " + requestedCores + " cores.");
+ return requestedCores;
+ }
+ if (requestedCores <= 0 && idleCoreUnits < threads) {
+ // If request is negative but cores are already used, return 0.
+ // We don't want to overbook the host.
+ logger.debug("Requested " + requestedCores
+ + " cores, but the host is busy and cannot book more jobs.");
+ return 0;
+ }
+ // Book all cores minus the request
+ int totalCores = idleCoreUnits + requestedCores;
+ logger.debug("Requested " + requestedCores + " cores <= 0, " + idleCoreUnits
+ + " cores are free, booking " + totalCores + " cores");
+ return totalCores;
+ }
+
+ @Override
+ public boolean hasAdditionalResources(int minCores, long minMemory, int minGpus,
+ long minGpuMemory) {
+ minCores = handleNegativeCoresRequirement(minCores);
+ if (idleCoreUnits < minCores) {
+ return false;
+ }
+ if (minCores <= 0) {
+ return false;
+ } else if (idleMemory < minMemory) {
+ return false;
+ } else if (idleGpuUnits < minGpus) {
+ return false;
+ } else if (idleGpuMemory < minGpuMemory) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public void useResources(int coreUnits, long memory, int gpuUnits, long gpuMemory) {
+ idleCoreUnits = idleCoreUnits - coreUnits;
+ idleMemory = idleMemory - memory;
+ idleGpuUnits = idleGpuUnits - gpuUnits;
+ idleGpuMemory = idleGpuMemory - gpuMemory;
+ }
+
+ public int getThreads() {
+ return threads;
+ }
+
+ public void setThreads(int threads) {
+ this.threads = threads;
+ }
+
+ public long getMaxMemory() {
+ return maxMemory;
+ }
+
+ public void setMaxMemory(long maxMemory) {
+ this.maxMemory = maxMemory;
+ }
+
+ public int getMaxCoreUnits() {
+ return maxCoreUnits;
+ }
+
+ public void setMaxCoreUnits(int maxCoreUnits) {
+ this.maxCoreUnits = maxCoreUnits;
+ }
+
+ public long getIdleMemory() {
+ return this.idleMemory;
+ }
+
+ public int getMaxGpuUnits() {
+ return maxGpuUnits;
+ }
+
+ public void setMaxGpuUnits(int maxGpuUnits) {
+ this.maxGpuUnits = maxGpuUnits;
+ }
+
+ public long getMaxGpuMemory() {
+ return maxGpuMemory;
+ }
+
+ public void setMaxGpuMemory(long maxGpuMemory) {
+ this.maxGpuMemory = maxGpuMemory;
+ }
+
+ public long getIdleGpuMemory() {
+ return this.idleGpuMemory;
+ }
+
+ public int getIdleCoreUnits() {
+ return this.idleCoreUnits;
+ }
+
+ public void setIdleCoreUnits(int idleCoreUnits) {
+ this.idleCoreUnits = idleCoreUnits;
+ }
+
+ public void setIdleMemory(long idleMemory) {
+ this.idleMemory = idleMemory;
+ }
+
+ public int getIdleGpuUnits() {
+ return this.idleGpuUnits;
+ }
+
+ public void setIdleGpuUnits(int idleGpuUnits) {
+ this.idleGpuUnits = idleGpuUnits;
+ }
+
+ public void setIdleGpuMemory(long idleGpuMemory) {
+ this.idleGpuMemory = idleGpuMemory;
+ }
+
+ public String getHostId() {
+ return hostId;
+ }
+
+ public void setHostId(String hostId) {
+ this.hostId = hostId;
+ }
+
+ public String getJobId() {
+ return jobId;
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
- public long getMaxGpuMemory() {
- return maxGpuMemory;
- }
-
- public void setMaxGpuMemory(long maxGpuMemory) {
- this.maxGpuMemory = maxGpuMemory;
- }
-
- public long getIdleGpuMemory() {
- return this.idleGpuMemory;
- }
-
- public int getIdleCoreUnits() {
- return this.idleCoreUnits;
- }
-
- public void setIdleCoreUnits(int idleCoreUnits) {
- this.idleCoreUnits = idleCoreUnits;
- }
+ public String getLayerId() {
+ return layerId;
+ }
+
+ public void setLayerId(String layerId) {
+ this.layerId = layerId;
+ }
+
+ public String getFrameId() {
+ return frameId;
+ }
- public void setIdleMemory(long idleMemory) {
- this.idleMemory = idleMemory;
- }
+ public void setFrameId(String frameId) {
+ this.frameId = frameId;
+ }
- public int getIdleGpuUnits() {
- return this.idleGpuUnits;
- }
+ public RenderPartitionType getType() {
+ return type;
+ }
- public void setIdleGpuUnits(int idleGpuUnits) {
- this.idleGpuUnits = idleGpuUnits;
- }
-
- public void setIdleGpuMemory(long idleGpuMemory) {
- this.idleGpuMemory = idleGpuMemory;
- }
-
- public String getHostId() {
- return hostId;
- }
-
- public void setHostId(String hostId) {
- this.hostId = hostId;
- }
-
- public String getJobId() {
- return jobId;
- }
-
- public void setJobId(String jobId) {
- this.jobId = jobId;
- }
-
- public String getLayerId() {
- return layerId;
- }
-
- public void setLayerId(String layerId) {
- this.layerId = layerId;
- }
-
- public String getFrameId() {
- return frameId;
- }
-
- public void setFrameId(String frameId) {
- this.frameId = frameId;
- }
-
- public RenderPartitionType getType() {
- return type;
- }
-
- public void setType(RenderPartitionType type) {
- this.type = type;
- }
+ public void setType(RenderPartitionType type) {
+ this.type = type;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/MaintenanceTask.java b/cuebot/src/main/java/com/imageworks/spcue/MaintenanceTask.java
index 479080ac7..f46378c8f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/MaintenanceTask.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/MaintenanceTask.java
@@ -2,53 +2,47 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
/**
- * MaintenanceTasks are stored in the task_lock table. Before
- * a maintenance operation kicks off a lock must be taken out on it
- * so multiple bots don't run the same task.
+ * MaintenanceTasks are stored in the task_lock table. Before a maintenance operation kicks off a
+ * lock must be taken out on it so multiple bots don't run the same task.
*/
public enum MaintenanceTask {
- /**
- * Lock the transfer of jobs to the historical table
- */
- LOCK_HISTORICAL_TRANSFER,
-
- /**
- * Lock the hardware start check
- */
- LOCK_HARDWARE_STATE_CHECK,
-
- /**
- * Lock the orphaned proc check
- */
- LOCK_ORPHANED_PROC_CHECK,
-
- /**
- * Lock for task updates
- */
- LOCK_TASK_UPDATE,
-
- /**
- * Lock the stale checkpoint task.
- */
- LOCK_STALE_CHECKPOINT
+ /**
+ * Lock the transfer of jobs to the historical table
+ */
+ LOCK_HISTORICAL_TRANSFER,
+
+ /**
+ * Lock the hardware start check
+ */
+ LOCK_HARDWARE_STATE_CHECK,
+
+ /**
+ * Lock the orphaned proc check
+ */
+ LOCK_ORPHANED_PROC_CHECK,
+
+ /**
+ * Lock for task updates
+ */
+ LOCK_TASK_UPDATE,
+
+ /**
+ * Lock the stale checkpoint task.
+ */
+ LOCK_STALE_CHECKPOINT
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/MatcherEntity.java b/cuebot/src/main/java/com/imageworks/spcue/MatcherEntity.java
index 157a5ef9b..f8072e090 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/MatcherEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/MatcherEntity.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.grpc.filter.MatchSubject;
@@ -25,40 +21,39 @@
public class MatcherEntity extends Entity implements MatcherInterface {
- public MatchSubject subject;
- public MatchType type;
- public String value;
+ public MatchSubject subject;
+ public MatchType type;
+ public String value;
- public String filterId;
- public String showId;
+ public String filterId;
+ public String showId;
- public static MatcherEntity build(FilterInterface filter, Matcher data) {
+ public static MatcherEntity build(FilterInterface filter, Matcher data) {
- MatcherEntity detail = new MatcherEntity();
- detail.name = null;
- detail.subject = data.getSubject();
- detail.type = data.getType();
- detail.value = data.getInput();
+ MatcherEntity detail = new MatcherEntity();
+ detail.name = null;
+ detail.subject = data.getSubject();
+ detail.type = data.getType();
+ detail.value = data.getInput();
- return detail;
- }
+ return detail;
+ }
- public static MatcherEntity build(FilterInterface filter, Matcher data, String id) {
- MatcherEntity detail = build(filter, data);
- detail.id = id.toString();
- return detail;
- }
+ public static MatcherEntity build(FilterInterface filter, Matcher data, String id) {
+ MatcherEntity detail = build(filter, data);
+ detail.id = id.toString();
+ return detail;
+ }
- public String getFilterId() {
- return filterId;
- }
+ public String getFilterId() {
+ return filterId;
+ }
- public String getShowId() {
- return showId;
- }
+ public String getShowId() {
+ return showId;
+ }
- public String getMatcherId() {
- return this.id;
- }
+ public String getMatcherId() {
+ return this.id;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/MatcherInterface.java b/cuebot/src/main/java/com/imageworks/spcue/MatcherInterface.java
index ae17ae686..a1d0c042f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/MatcherInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/MatcherInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface MatcherInterface extends FilterInterface {
- public String getMatcherId();
+ public String getMatcherId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/MinimalHost.java b/cuebot/src/main/java/com/imageworks/spcue/MinimalHost.java
index c8f872451..dd6fb7399 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/MinimalHost.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/MinimalHost.java
@@ -2,50 +2,45 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class MinimalHost extends Entity implements HostInterface {
- public String allocId;
- public String facilityId;
+ public String allocId;
+ public String facilityId;
- public MinimalHost() {
- // TODO Auto-generated constructor stub
- }
+ public MinimalHost() {
+ // TODO Auto-generated constructor stub
+ }
- public String getHostId() {
- return this.id;
- }
+ public String getHostId() {
+ return this.id;
+ }
- public String getAllocationId() {
- return allocId;
- }
+ public String getAllocationId() {
+ return allocId;
+ }
- public String getId() {
- return id;
- }
+ public String getId() {
+ return id;
+ }
- public String getName() {
- return name;
- }
+ public String getName() {
+ return name;
+ }
- public String getFacilityId() {
- return facilityId;
- }
+ public String getFacilityId() {
+ return facilityId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/OwnerEntity.java b/cuebot/src/main/java/com/imageworks/spcue/OwnerEntity.java
index 1ebea5ff0..9e2434e5c 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/OwnerEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/OwnerEntity.java
@@ -2,30 +2,25 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class OwnerEntity extends Entity {
- public OwnerEntity() {}
+ public OwnerEntity() {}
- public OwnerEntity(String name) {
- this.name = name;
- }
+ public OwnerEntity(String name) {
+ this.name = name;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/PointDetail.java b/cuebot/src/main/java/com/imageworks/spcue/PointDetail.java
index b99dfdd1a..01efc9716 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/PointDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/PointDetail.java
@@ -2,45 +2,40 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class PointDetail extends Entity implements PointInterface {
- public String showId;
- public String deptId;
+ public String showId;
+ public String deptId;
- public int cores = 0;
- public String tiTask = "";
- public boolean tiManaged = false;
+ public int cores = 0;
+ public String tiTask = "";
+ public boolean tiManaged = false;
- @Override
- public String getDepartmentId() {
- return deptId;
- }
+ @Override
+ public String getDepartmentId() {
+ return deptId;
+ }
- @Override
- public String getShowId() {
- return showId;
- }
+ @Override
+ public String getShowId() {
+ return showId;
+ }
- @Override
- public String getPointId() {
- return id;
- }
+ @Override
+ public String getPointId() {
+ return id;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/PointInterface.java b/cuebot/src/main/java/com/imageworks/spcue/PointInterface.java
index 7290a9d18..f1bce6e61 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/PointInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/PointInterface.java
@@ -2,24 +2,19 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface PointInterface extends DepartmentInterface, ShowInterface {
- public String getPointId();
+ public String getPointId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ProcInterface.java b/cuebot/src/main/java/com/imageworks/spcue/ProcInterface.java
index f1f32c037..cbc45a8dd 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ProcInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ProcInterface.java
@@ -2,26 +2,21 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface ProcInterface extends HostInterface, FrameInterface {
- String getProcId();
+ String getProcId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/PrometheusMetricsCollector.java b/cuebot/src/main/java/com/imageworks/spcue/PrometheusMetricsCollector.java
index 60e403fe6..624b2c93c 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/PrometheusMetricsCollector.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/PrometheusMetricsCollector.java
@@ -18,310 +18,260 @@
*/
@Component
public class PrometheusMetricsCollector {
- private BookingQueue bookingQueue;
-
- private DispatchQueue manageQueue;
-
- private DispatchQueue dispatchQueue;
-
- private HostReportQueue reportQueue;
-
- private boolean enabled;
-
- // BookingQueue bookingQueue
- private static final Gauge bookingWaitingTotal = Gauge.build()
- .name("cue_booking_waiting_total")
- .help("Booking Queue number of waiting tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge bookingRemainingCapacityTotal = Gauge.build()
- .name("cue_booking_remaining_capacity_total")
- .help("Booking Queue remaining capacity")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge bookingThreadsTotal = Gauge.build()
- .name("cue_booking_threads_total")
- .help("Booking Queue number of active threads")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge bookingExecutedTotal = Gauge.build()
- .name("cue_booking_executed_total")
- .help("Booking Queue number of executed tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge bookingRejectedTotal = Gauge.build()
- .name("cue_booking_rejected_total")
- .help("Booking Queue number of rejected tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
-
- // DispatchQueue manageQueue
- private static final Gauge manageWaitingTotal = Gauge.build()
- .name("cue_manage_waiting_total")
- .help("Manage Queue number of waiting tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge manageRemainingCapacityTotal = Gauge.build()
- .name("cue_manage_remaining_capacity_total")
- .help("Manage Queue remaining capacity")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge manageThreadsTotal = Gauge.build()
- .name("cue_manage_threads_total")
- .help("Manage Queue number of active threads")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge manageExecutedTotal = Gauge.build()
- .name("cue_manage_executed_total")
- .help("Manage Queue number of executed tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge manageRejectedTotal = Gauge.build()
- .name("cue_manage_rejected_total")
- .help("Manage Queue number of rejected tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
-
- // DispatchQueue dispatchQueue
- private static final Gauge dispatchWaitingTotal = Gauge.build()
- .name("cue_dispatch_waiting_total")
- .help("Dispatch Queue number of waiting tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge dispatchRemainingCapacityTotal = Gauge.build()
- .name("cue_dispatch_remaining_capacity_total")
- .help("Dispatch Queue remaining capacity")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge dispatchThreadsTotal = Gauge.build()
- .name("cue_dispatch_threads_total")
- .help("Dispatch Queue number of active threads")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge dispatchExecutedTotal = Gauge.build()
- .name("cue_dispatch_executed_total")
- .help("Dispatch Queue number of executed tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge dispatchRejectedTotal = Gauge.build()
- .name("cue_dispatch_rejected_total")
- .help("Dispatch Queue number of rejected tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
-
- // HostReportQueue reportQueue
- private static final Gauge reportQueueWaitingTotal = Gauge.build()
- .name("cue_report_waiting_total")
- .help("Report Queue number of waiting tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge reportQueueRemainingCapacityTotal = Gauge.build()
- .name("cue_report_remaining_capacity_total")
- .help("Report Queue remaining capacity")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge reportQueueThreadsTotal = Gauge.build()
- .name("cue_report_threads_total")
- .help("Report Queue number of active threads")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge reportQueueExecutedTotal = Gauge.build()
- .name("cue_report_executed_total")
- .help("Report Queue number of executed tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge reportQueueRejectedTotal = Gauge.build()
- .name("cue_report_rejected_total")
- .help("Report Queue number of rejected tasks")
- .labelNames("env", "cuebot_hosts")
- .register();
-
- private static final Counter findJobsByShowQueryCountMetric = Counter.build()
- .name("cue_find_jobs_by_show_count")
- .help("Count the occurrences of the query FIND_JOBS_BY_SHOW.")
- .labelNames("env", "cuebot_hosts")
- .register();
- private static final Gauge bookingDurationMillisMetric = Gauge.build()
- .name("cue_booking_durations_in_millis")
- .help("Register duration of booking steps in milliseconds.")
- .labelNames("env", "cuebot_host", "stage_desc")
- .register();
- private static final Histogram bookingDurationMillisHistogramMetric = Histogram.build()
- .name("cue_booking_durations_histogram_in_millis")
- .help("Register a summary of duration of booking steps in milliseconds.")
- .labelNames("env", "cuebot_host", "stage_desc")
- .register();
-
- private static final Counter frameKilledCounter = Counter.build()
- .name("cue_frame_killed_counter")
- .help("Number of frames kill requests processed")
- .labelNames("env", "cuebot_host", "render_node", "cause")
- .register();
-
- private static final Counter frameKillFailureCounter = Counter.build()
- .name("cue_frame_kill_failure_counter")
- .help("Number of frames that failed to be killed after FRAME_KILL_RETRY_LIMIT tries")
- .labelNames("env", "cuebot_host", "render_node", "job_name", "frame_name", "frame_id")
- .register();
-
- private String deployment_environment;
- private String cuebot_host;
-
- @Autowired
- public PrometheusMetricsCollector(Environment env) {
- if (env == null) {
- throw new SpcueRuntimeException("Env not defined");
- }
- this.enabled = env.getProperty("metrics.prometheus.collector", Boolean.class, false);
- String envKey = env.getProperty("metrics.prometheus.environment_id.environment_variable", String.class,
- "DEPLOYMENT_ENVIRONMENT");
-
- this.cuebot_host = getHostNameFromEnv();
- // Get environment id from environment variable
- this.deployment_environment = System.getenv(envKey);
- if (this.deployment_environment == null) {
- this.deployment_environment = "undefined";
- }
+ private BookingQueue bookingQueue;
+
+ private DispatchQueue manageQueue;
+
+ private DispatchQueue dispatchQueue;
+
+ private HostReportQueue reportQueue;
+
+ private boolean enabled;
+
+ // BookingQueue bookingQueue
+ private static final Gauge bookingWaitingTotal = Gauge.build().name("cue_booking_waiting_total")
+ .help("Booking Queue number of waiting tasks").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge bookingRemainingCapacityTotal =
+ Gauge.build().name("cue_booking_remaining_capacity_total")
+ .help("Booking Queue remaining capacity").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge bookingThreadsTotal = Gauge.build().name("cue_booking_threads_total")
+ .help("Booking Queue number of active threads").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge bookingExecutedTotal = Gauge.build().name("cue_booking_executed_total")
+ .help("Booking Queue number of executed tasks").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge bookingRejectedTotal = Gauge.build().name("cue_booking_rejected_total")
+ .help("Booking Queue number of rejected tasks").labelNames("env", "cuebot_hosts").register();
+
+ // DispatchQueue manageQueue
+ private static final Gauge manageWaitingTotal = Gauge.build().name("cue_manage_waiting_total")
+ .help("Manage Queue number of waiting tasks").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge manageRemainingCapacityTotal =
+ Gauge.build().name("cue_manage_remaining_capacity_total")
+ .help("Manage Queue remaining capacity").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge manageThreadsTotal = Gauge.build().name("cue_manage_threads_total")
+ .help("Manage Queue number of active threads").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge manageExecutedTotal = Gauge.build().name("cue_manage_executed_total")
+ .help("Manage Queue number of executed tasks").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge manageRejectedTotal = Gauge.build().name("cue_manage_rejected_total")
+ .help("Manage Queue number of rejected tasks").labelNames("env", "cuebot_hosts").register();
+
+ // DispatchQueue dispatchQueue
+ private static final Gauge dispatchWaitingTotal = Gauge.build().name("cue_dispatch_waiting_total")
+ .help("Dispatch Queue number of waiting tasks").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge dispatchRemainingCapacityTotal =
+ Gauge.build().name("cue_dispatch_remaining_capacity_total")
+ .help("Dispatch Queue remaining capacity").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge dispatchThreadsTotal = Gauge.build().name("cue_dispatch_threads_total")
+ .help("Dispatch Queue number of active threads").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge dispatchExecutedTotal = Gauge.build()
+ .name("cue_dispatch_executed_total").help("Dispatch Queue number of executed tasks")
+ .labelNames("env", "cuebot_hosts").register();
+ private static final Gauge dispatchRejectedTotal = Gauge.build()
+ .name("cue_dispatch_rejected_total").help("Dispatch Queue number of rejected tasks")
+ .labelNames("env", "cuebot_hosts").register();
+
+ // HostReportQueue reportQueue
+ private static final Gauge reportQueueWaitingTotal =
+ Gauge.build().name("cue_report_waiting_total").help("Report Queue number of waiting tasks")
+ .labelNames("env", "cuebot_hosts").register();
+ private static final Gauge reportQueueRemainingCapacityTotal =
+ Gauge.build().name("cue_report_remaining_capacity_total")
+ .help("Report Queue remaining capacity").labelNames("env", "cuebot_hosts").register();
+ private static final Gauge reportQueueThreadsTotal =
+ Gauge.build().name("cue_report_threads_total").help("Report Queue number of active threads")
+ .labelNames("env", "cuebot_hosts").register();
+ private static final Gauge reportQueueExecutedTotal =
+ Gauge.build().name("cue_report_executed_total").help("Report Queue number of executed tasks")
+ .labelNames("env", "cuebot_hosts").register();
+ private static final Gauge reportQueueRejectedTotal =
+ Gauge.build().name("cue_report_rejected_total").help("Report Queue number of rejected tasks")
+ .labelNames("env", "cuebot_hosts").register();
+
+ private static final Counter findJobsByShowQueryCountMetric =
+ Counter.build().name("cue_find_jobs_by_show_count")
+ .help("Count the occurrences of the query FIND_JOBS_BY_SHOW.")
+ .labelNames("env", "cuebot_hosts").register();
+ private static final Gauge bookingDurationMillisMetric =
+ Gauge.build().name("cue_booking_durations_in_millis")
+ .help("Register duration of booking steps in milliseconds.")
+ .labelNames("env", "cuebot_host", "stage_desc").register();
+ private static final Histogram bookingDurationMillisHistogramMetric =
+ Histogram.build().name("cue_booking_durations_histogram_in_millis")
+ .help("Register a summary of duration of booking steps in milliseconds.")
+ .labelNames("env", "cuebot_host", "stage_desc").register();
+
+ private static final Counter frameKilledCounter = Counter.build().name("cue_frame_killed_counter")
+ .help("Number of frames kill requests processed")
+ .labelNames("env", "cuebot_host", "render_node", "cause").register();
+
+ private static final Counter frameKillFailureCounter =
+ Counter.build().name("cue_frame_kill_failure_counter")
+ .help("Number of frames that failed to be killed after FRAME_KILL_RETRY_LIMIT tries")
+ .labelNames("env", "cuebot_host", "render_node", "job_name", "frame_name", "frame_id")
+ .register();
+
+ private String deployment_environment;
+ private String cuebot_host;
+
+ @Autowired
+ public PrometheusMetricsCollector(Environment env) {
+ if (env == null) {
+ throw new SpcueRuntimeException("Env not defined");
}
-
- /**
- * Get hostname from environment variable
- *
- * Uses the following fallback order:
- *
- * - NODE_HOSTNAME -> HOSTNAME -> HOST -> "undefined"
- *
- * @return
- */
- private String getHostNameFromEnv() {
- String hostname = System.getenv("NODE_HOSTNAME");
- if (hostname != null) {
- return hostname;
- }
-
- hostname = System.getenv("HOSTNAME");
- if (hostname != null) {
- return hostname;
- }
-
- hostname = System.getenv("HOST");
- if (hostname != null) {
- return hostname;
- }
-
- return "undefined";
- }
-
- /**
- * Collect metrics from queues
- */
- public void collectPrometheusMetrics() {
- if (this.enabled) {
- // BookingQueue bookingQueue
- bookingWaitingTotal.labels(this.deployment_environment, this.cuebot_host).set(bookingQueue.getSize());
- bookingRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(bookingQueue.getRemainingCapacity());
- bookingThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(bookingQueue.getActiveCount());
- bookingExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(bookingQueue.getCompletedTaskCount());
- bookingRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(bookingQueue.getRejectedTaskCount());
-
- // DispatchQueue manageQueue
- manageWaitingTotal.labels(this.deployment_environment, this.cuebot_host).set(manageQueue.getSize());
- manageRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(manageQueue.getRemainingCapacity());
- manageThreadsTotal.labels(this.deployment_environment, this.cuebot_host).set(manageQueue.getActiveCount());
- manageExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(manageQueue.getCompletedTaskCount());
- manageRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(manageQueue.getRejectedTaskCount());
-
- // DispatchQueue dispatchQueue
- dispatchWaitingTotal.labels(this.deployment_environment, this.cuebot_host).set(dispatchQueue.getSize());
- dispatchRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(dispatchQueue.getRemainingCapacity());
- dispatchThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(dispatchQueue.getActiveCount());
- dispatchExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(dispatchQueue.getCompletedTaskCount());
- dispatchRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(dispatchQueue.getRejectedTaskCount());
-
- // HostReportQueue reportQueue
- reportQueueWaitingTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(reportQueue.getQueue().size());
- reportQueueRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(reportQueue.getQueue().remainingCapacity());
- reportQueueThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(reportQueue.getActiveCount());
- reportQueueExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(reportQueue.getTaskCount());
- reportQueueRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
- .set(reportQueue.getRejectedTaskCount());
- }
- }
-
- /**
- * Set a new value to the cue_booking_durations_in_millis metric
- *
- * @param stage_desc booking stage description to be used as a tag
- * @param value value to set
- */
- public void setBookingDurationMetric(String stage_desc, double value) {
- bookingDurationMillisMetric.labels(this.deployment_environment, this.cuebot_host, stage_desc).set(value);
- bookingDurationMillisHistogramMetric.labels(this.deployment_environment, this.cuebot_host, stage_desc).observe(value);
- }
-
- /**
- * Increment cue_find_jobs_by_show_count metric
- */
- public void incrementFindJobsByShowQueryCountMetric() {
- findJobsByShowQueryCountMetric.labels(this.deployment_environment, this.cuebot_host).inc();
- }
-
- /**
- * Increment cue_frame_killed_counter metric
- *
- * @param renderNode hostname of the render node receiving the kill request
- * @param killCause cause assigned to the request
- */
- public void incrementFrameKilledCounter(String renderNode, HostReportHandler.KillCause killCause) {
- frameKilledCounter.labels(this.deployment_environment, this.cuebot_host, renderNode, killCause.name()).inc();
+ this.enabled = env.getProperty("metrics.prometheus.collector", Boolean.class, false);
+ String envKey = env.getProperty("metrics.prometheus.environment_id.environment_variable",
+ String.class, "DEPLOYMENT_ENVIRONMENT");
+
+ this.cuebot_host = getHostNameFromEnv();
+ // Get environment id from environment variable
+ this.deployment_environment = System.getenv(envKey);
+ if (this.deployment_environment == null) {
+ this.deployment_environment = "undefined";
}
-
- /**
- * Increment cue_frame_kill_failure_counter metric
- *
- * @param hostname
- * @param jobName
- * @param frameName
- * @param frameId
- */
- public void incrementFrameKillFailureCounter(String hostname, String jobName, String frameName, String frameId) {
- frameKillFailureCounter.labels(this.deployment_environment,
- this.cuebot_host,
- hostname,
- jobName,
- frameName,
- frameId).inc();
- }
-
- // Setters used for dependency injection
- public void setBookingQueue(BookingQueue bookingQueue) {
- this.bookingQueue = bookingQueue;
+ }
+
+ /**
+ * Get hostname from environment variable
+ *
+ * Uses the following fallback order:
+ *
+ * - NODE_HOSTNAME -> HOSTNAME -> HOST -> "undefined"
+ *
+ * @return
+ */
+ private String getHostNameFromEnv() {
+ String hostname = System.getenv("NODE_HOSTNAME");
+ if (hostname != null) {
+ return hostname;
}
- public void setManageQueue(DispatchQueue manageQueue) {
- this.manageQueue = manageQueue;
+ hostname = System.getenv("HOSTNAME");
+ if (hostname != null) {
+ return hostname;
}
- public void setDispatchQueue(DispatchQueue dispatchQueue) {
- this.dispatchQueue = dispatchQueue;
+ hostname = System.getenv("HOST");
+ if (hostname != null) {
+ return hostname;
}
- public void setReportQueue(HostReportQueue reportQueue) {
- this.reportQueue = reportQueue;
+ return "undefined";
+ }
+
+ /**
+ * Collect metrics from queues
+ */
+ public void collectPrometheusMetrics() {
+ if (this.enabled) {
+ // BookingQueue bookingQueue
+ bookingWaitingTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(bookingQueue.getSize());
+ bookingRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(bookingQueue.getRemainingCapacity());
+ bookingThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(bookingQueue.getActiveCount());
+ bookingExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(bookingQueue.getCompletedTaskCount());
+ bookingRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(bookingQueue.getRejectedTaskCount());
+
+ // DispatchQueue manageQueue
+ manageWaitingTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(manageQueue.getSize());
+ manageRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(manageQueue.getRemainingCapacity());
+ manageThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(manageQueue.getActiveCount());
+ manageExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(manageQueue.getCompletedTaskCount());
+ manageRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(manageQueue.getRejectedTaskCount());
+
+ // DispatchQueue dispatchQueue
+ dispatchWaitingTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(dispatchQueue.getSize());
+ dispatchRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(dispatchQueue.getRemainingCapacity());
+ dispatchThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(dispatchQueue.getActiveCount());
+ dispatchExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(dispatchQueue.getCompletedTaskCount());
+ dispatchRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(dispatchQueue.getRejectedTaskCount());
+
+ // HostReportQueue reportQueue
+ reportQueueWaitingTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(reportQueue.getQueue().size());
+ reportQueueRemainingCapacityTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(reportQueue.getQueue().remainingCapacity());
+ reportQueueThreadsTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(reportQueue.getActiveCount());
+ reportQueueExecutedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(reportQueue.getTaskCount());
+ reportQueueRejectedTotal.labels(this.deployment_environment, this.cuebot_host)
+ .set(reportQueue.getRejectedTaskCount());
}
-}
\ No newline at end of file
+ }
+
+ /**
+ * Set a new value to the cue_booking_durations_in_millis metric
+ *
+ * @param stage_desc booking stage description to be used as a tag
+ * @param value value to set
+ */
+ public void setBookingDurationMetric(String stage_desc, double value) {
+ bookingDurationMillisMetric.labels(this.deployment_environment, this.cuebot_host, stage_desc)
+ .set(value);
+ bookingDurationMillisHistogramMetric
+ .labels(this.deployment_environment, this.cuebot_host, stage_desc).observe(value);
+ }
+
+ /**
+ * Increment cue_find_jobs_by_show_count metric
+ */
+ public void incrementFindJobsByShowQueryCountMetric() {
+ findJobsByShowQueryCountMetric.labels(this.deployment_environment, this.cuebot_host).inc();
+ }
+
+ /**
+ * Increment cue_frame_killed_counter metric
+ *
+ * @param renderNode hostname of the render node receiving the kill request
+ * @param killCause cause assigned to the request
+ */
+ public void incrementFrameKilledCounter(String renderNode,
+ HostReportHandler.KillCause killCause) {
+ frameKilledCounter
+ .labels(this.deployment_environment, this.cuebot_host, renderNode, killCause.name()).inc();
+ }
+
+ /**
+ * Increment cue_frame_kill_failure_counter metric
+ *
+ * @param hostname
+ * @param jobName
+ * @param frameName
+ * @param frameId
+ */
+ public void incrementFrameKillFailureCounter(String hostname, String jobName, String frameName,
+ String frameId) {
+ frameKillFailureCounter.labels(this.deployment_environment, this.cuebot_host, hostname, jobName,
+ frameName, frameId).inc();
+ }
+
+ // Setters used for dependency injection
+ public void setBookingQueue(BookingQueue bookingQueue) {
+ this.bookingQueue = bookingQueue;
+ }
+
+ public void setManageQueue(DispatchQueue manageQueue) {
+ this.manageQueue = manageQueue;
+ }
+
+ public void setDispatchQueue(DispatchQueue dispatchQueue) {
+ this.dispatchQueue = dispatchQueue;
+ }
+
+ public void setReportQueue(HostReportQueue reportQueue) {
+ this.reportQueue = reportQueue;
+ }
+}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/Redirect.java b/cuebot/src/main/java/com/imageworks/spcue/Redirect.java
index a209e3cb1..2ece95a58 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/Redirect.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/Redirect.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.io.Serializable;
@@ -26,88 +22,85 @@
import com.imageworks.spcue.util.SqlUtil;
/**
- * A Redirect contains the new destination for a proc. The destination type may
- * be a job or a group.
+ * A Redirect contains the new destination for a proc. The destination type may be a job or a group.
*/
public class Redirect implements Serializable {
- private static final long serialVersionUID = -6461503320817105280L;
-
- /**
- * Track requests to redirect multiple procs together
- * by assigning a group id.
- * */
- private final String groupId;
- private final RedirectType type;
- private final String destinationId;
- private final String name;
- private final long creationTime;
-
- public static final long EXPIRE_TIME =
- TimeUnit.MILLISECONDS.convert(24, TimeUnit.HOURS);
-
- public Redirect(String groupId, RedirectType type, String destinationId, String name, long creationTime) {
- this.groupId = groupId;
- this.type = type;
- this.destinationId = destinationId;
- this.name = name;
- this.creationTime = creationTime;
- }
-
- public Redirect(RedirectType type, String destinationId, String name) {
- this.groupId = SqlUtil.genKeyRandom();
- this.type = type;
- this.destinationId = destinationId;
- this.name = name;
- this.creationTime = System.currentTimeMillis();
- }
-
- public Redirect(String groupId, JobInterface job) {
- this.groupId = groupId;
- this.type = RedirectType.JOB_REDIRECT;
- this.destinationId = job.getJobId();
- this.name = job.getName();
- this.creationTime = System.currentTimeMillis();
- }
-
- public Redirect(JobInterface job) {
- this.groupId = SqlUtil.genKeyRandom();
- this.type = RedirectType.JOB_REDIRECT;
- this.destinationId = job.getJobId();
- this.name = job.getName();
- this.creationTime = System.currentTimeMillis();
- }
-
- public Redirect(GroupInterface group) {
- this.groupId = SqlUtil.genKeyRandom();
- this.type = RedirectType.GROUP_REDIRECT;
- this.destinationId = group.getGroupId();
- this.name = group.getName();
- this.creationTime = System.currentTimeMillis();
- }
-
- public String getGroupId() {
- return groupId;
- }
-
- public RedirectType getType() {
- return type;
- }
-
- public String getDestinationId() {
- return destinationId;
- }
-
- public String getDestinationName() {
- return name;
- }
-
- public boolean isExpired() {
- return System.currentTimeMillis() - creationTime >= EXPIRE_TIME;
- }
-
- public long getCreationTime() {
- return creationTime;
- }
+ private static final long serialVersionUID = -6461503320817105280L;
+
+ /**
+ * Track requests to redirect multiple procs together by assigning a group id.
+ */
+ private final String groupId;
+ private final RedirectType type;
+ private final String destinationId;
+ private final String name;
+ private final long creationTime;
+
+ public static final long EXPIRE_TIME = TimeUnit.MILLISECONDS.convert(24, TimeUnit.HOURS);
+
+ public Redirect(String groupId, RedirectType type, String destinationId, String name,
+ long creationTime) {
+ this.groupId = groupId;
+ this.type = type;
+ this.destinationId = destinationId;
+ this.name = name;
+ this.creationTime = creationTime;
+ }
+
+ public Redirect(RedirectType type, String destinationId, String name) {
+ this.groupId = SqlUtil.genKeyRandom();
+ this.type = type;
+ this.destinationId = destinationId;
+ this.name = name;
+ this.creationTime = System.currentTimeMillis();
+ }
+
+ public Redirect(String groupId, JobInterface job) {
+ this.groupId = groupId;
+ this.type = RedirectType.JOB_REDIRECT;
+ this.destinationId = job.getJobId();
+ this.name = job.getName();
+ this.creationTime = System.currentTimeMillis();
+ }
+
+ public Redirect(JobInterface job) {
+ this.groupId = SqlUtil.genKeyRandom();
+ this.type = RedirectType.JOB_REDIRECT;
+ this.destinationId = job.getJobId();
+ this.name = job.getName();
+ this.creationTime = System.currentTimeMillis();
+ }
+
+ public Redirect(GroupInterface group) {
+ this.groupId = SqlUtil.genKeyRandom();
+ this.type = RedirectType.GROUP_REDIRECT;
+ this.destinationId = group.getGroupId();
+ this.name = group.getName();
+ this.creationTime = System.currentTimeMillis();
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public RedirectType getType() {
+ return type;
+ }
+
+ public String getDestinationId() {
+ return destinationId;
+ }
+
+ public String getDestinationName() {
+ return name;
+ }
+
+ public boolean isExpired() {
+ return System.currentTimeMillis() - creationTime >= EXPIRE_TIME;
+ }
+
+ public long getCreationTime() {
+ return creationTime;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ResourceUsage.java b/cuebot/src/main/java/com/imageworks/spcue/ResourceUsage.java
index b45af0838..26ba5c65b 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ResourceUsage.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ResourceUsage.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
/**
@@ -24,38 +20,37 @@
*/
public class ResourceUsage {
- private final long coreTimeSeconds;
- private final long gpuTimeSeconds;
- private final long clockTimeSeconds;
+ private final long coreTimeSeconds;
+ private final long gpuTimeSeconds;
+ private final long clockTimeSeconds;
- public ResourceUsage(long clockTime, int corePoints, int gpuPoints) {
+ public ResourceUsage(long clockTime, int corePoints, int gpuPoints) {
- if (clockTime < 1) {
- clockTime = 1;
- }
+ if (clockTime < 1) {
+ clockTime = 1;
+ }
- long coreTime = (long) (clockTime * (corePoints / 100f));
- if (coreTime < 1) {
- coreTime = 1;
- }
+ long coreTime = (long) (clockTime * (corePoints / 100f));
+ if (coreTime < 1) {
+ coreTime = 1;
+ }
- long gpuTime = clockTime * gpuPoints;
+ long gpuTime = clockTime * gpuPoints;
- clockTimeSeconds = clockTime;
- coreTimeSeconds = coreTime;
- gpuTimeSeconds = gpuTime;
- }
+ clockTimeSeconds = clockTime;
+ coreTimeSeconds = coreTime;
+ gpuTimeSeconds = gpuTime;
+ }
- public long getCoreTimeSeconds() {
- return coreTimeSeconds;
- }
+ public long getCoreTimeSeconds() {
+ return coreTimeSeconds;
+ }
- public long getGpuTimeSeconds() {
- return gpuTimeSeconds;
- }
+ public long getGpuTimeSeconds() {
+ return gpuTimeSeconds;
+ }
- public long getClockTimeSeconds() {
- return clockTimeSeconds;
- }
+ public long getClockTimeSeconds() {
+ return clockTimeSeconds;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ServiceEntity.java b/cuebot/src/main/java/com/imageworks/spcue/ServiceEntity.java
index 72b134f7d..1dfea70e3 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ServiceEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ServiceEntity.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.LinkedHashSet;
@@ -24,53 +20,50 @@
import com.imageworks.spcue.dispatcher.Dispatcher;
public class ServiceEntity extends Entity {
- /**
- * Determines if the service is threadable or not.
- */
- public boolean threadable = false;
-
- /**
- * Determines the default minimum cores per frame.
- */
- public int minCores = Dispatcher.CORE_POINTS_RESERVED_DEFAULT;
-
- /**
- * Determines the default minimum cores per frame. 0 indicates
- * the feature is disabled.
- */
- public int maxCores = 0;
-
- /**
- * Determines the default minimum gpus per frame.
- */
- public int minGpus = 0;
-
- /**
- * Determines the default minimum gpus per frame. 0 indicates
- * the feature is disabled.
- */
- public int maxGpus = 0;
-
- /**
- * Determines the default minimum memory per frame.
- */
- public long minMemory = Dispatcher.MEM_SERVICE_RESERVED_DEFAULT;
-
- /**
- * Determines the default minimum gpu per frame.
- */
- public long minGpuMemory = Dispatcher.MEM_SERVICE_GPU_RESERVED_DEFAULT;
-
- /**
- * Determines the default tags.
- */
- public LinkedHashSet tags = new LinkedHashSet();
-
- public int timeout = 0;
-
- public int timeout_llu = 0;
-
- public long minMemoryIncrease = Dispatcher.MINIMUM_MEMORY_INCREASE;
+ /**
+ * Determines if the service is threadable or not.
+ */
+ public boolean threadable = false;
-}
+ /**
+ * Determines the default minimum cores per frame.
+ */
+ public int minCores = Dispatcher.CORE_POINTS_RESERVED_DEFAULT;
+
+ /**
+ * Determines the default minimum cores per frame. 0 indicates the feature is disabled.
+ */
+ public int maxCores = 0;
+
+ /**
+ * Determines the default minimum gpus per frame.
+ */
+ public int minGpus = 0;
+
+ /**
+ * Determines the default minimum gpus per frame. 0 indicates the feature is disabled.
+ */
+ public int maxGpus = 0;
+
+ /**
+ * Determines the default minimum memory per frame.
+ */
+ public long minMemory = Dispatcher.MEM_SERVICE_RESERVED_DEFAULT;
+ /**
+ * Determines the default minimum gpu per frame.
+ */
+ public long minGpuMemory = Dispatcher.MEM_SERVICE_GPU_RESERVED_DEFAULT;
+
+ /**
+ * Determines the default tags.
+ */
+ public LinkedHashSet tags = new LinkedHashSet();
+
+ public int timeout = 0;
+
+ public int timeout_llu = 0;
+
+ public long minMemoryIncrease = Dispatcher.MINIMUM_MEMORY_INCREASE;
+
+}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ServiceOverrideEntity.java b/cuebot/src/main/java/com/imageworks/spcue/ServiceOverrideEntity.java
index 21f6b40a2..2e7cca2b9 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ServiceOverrideEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ServiceOverrideEntity.java
@@ -2,29 +2,24 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class ServiceOverrideEntity extends ServiceEntity {
- /**
- * The show that wants to override the service.
- */
- public String showId;
+ /**
+ * The show that wants to override the service.
+ */
+ public String showId;
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ShowEntity.java b/cuebot/src/main/java/com/imageworks/spcue/ShowEntity.java
index 1d2f675e1..a7831deaf 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ShowEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ShowEntity.java
@@ -2,35 +2,30 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class ShowEntity extends Entity implements ShowInterface {
- public boolean active;
- public boolean paused;
- public int defaultMinCores;
- public int defaultMaxCores;
- public int defaultMinGpus;
- public int defaultMaxGpus;
- public String[] commentMail;
-
- public String getShowId() {
- return id;
- }
+ public boolean active;
+ public boolean paused;
+ public int defaultMinCores;
+ public int defaultMaxCores;
+ public int defaultMinGpus;
+ public int defaultMaxGpus;
+ public String[] commentMail;
+
+ public String getShowId() {
+ return id;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ShowInterface.java b/cuebot/src/main/java/com/imageworks/spcue/ShowInterface.java
index e3f20defa..a43aaf6af 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ShowInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ShowInterface.java
@@ -2,25 +2,20 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface ShowInterface extends EntityInterface {
- public String getShowId();
+ public String getShowId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/SortableShow.java b/cuebot/src/main/java/com/imageworks/spcue/SortableShow.java
index 83798f079..9c8de3c55 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/SortableShow.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/SortableShow.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.util.HashSet;
@@ -29,92 +25,89 @@
public class SortableShow implements Comparable {
- private static final Logger logger = LogManager.getLogger(SortableShow.class);
-
- private String show;
- private float tier;
-
- private Map failed = new ConcurrentHashMap();
- private Set failedAllocs = new HashSet();
-
- public SortableShow(String show, float value) {
- this.show = show;
- this.tier = value;
- }
-
- public String getShowId() {
- return show;
- }
-
- public float getValue() {
- return tier;
- }
-
- public boolean isSkipped(String tags, long cores, long memory) {
- try {
- if (failed.containsKey(tags)) {
- long [] mark = failed.get(tags);
- if (cores < mark[0]) {
- logger.info("skipped due to not enough cores " + cores + " < " + mark[0]);
- return true;
- }
- else if (memory < mark[1]) {
- logger.info("skipped due to not enough memory " + memory + " < " + mark[1]);
- return true;
- }
- }
- return false;
- } catch (Exception e ){
- logger.info("exception checking skipped: " + e);
- return false;
+ private static final Logger logger = LogManager.getLogger(SortableShow.class);
+
+ private String show;
+ private float tier;
+
+ private Map failed = new ConcurrentHashMap();
+ private Set failedAllocs = new HashSet();
+
+ public SortableShow(String show, float value) {
+ this.show = show;
+ this.tier = value;
+ }
+
+ public String getShowId() {
+ return show;
+ }
+
+ public float getValue() {
+ return tier;
+ }
+
+ public boolean isSkipped(String tags, long cores, long memory) {
+ try {
+ if (failed.containsKey(tags)) {
+ long[] mark = failed.get(tags);
+ if (cores < mark[0]) {
+ logger.info("skipped due to not enough cores " + cores + " < " + mark[0]);
+ return true;
+ } else if (memory < mark[1]) {
+ logger.info("skipped due to not enough memory " + memory + " < " + mark[1]);
+ return true;
}
+ }
+ return false;
+ } catch (Exception e) {
+ logger.info("exception checking skipped: " + e);
+ return false;
}
+ }
- public boolean isSkipped(AllocationInterface a) {
- if (failedAllocs.contains(a)) {
- return true;
- }
- return false;
+ public boolean isSkipped(AllocationInterface a) {
+ if (failedAllocs.contains(a)) {
+ return true;
}
+ return false;
+ }
- public void skip(String tags, long cores, long memory) {
- if (tags != null) {
- failed.put(tags, new long[] { cores, memory});
- }
+ public void skip(String tags, long cores, long memory) {
+ if (tags != null) {
+ failed.put(tags, new long[] {cores, memory});
}
-
- /**
- * Adds an allocation that should not be
- * booked on this show.
- *
- * @param Allocation
- */
- public void skip(AllocationInterface a) {
- synchronized (failedAllocs) {
- failedAllocs.add(a);
- }
+ }
+
+ /**
+ * Adds an allocation that should not be booked on this show.
+ *
+ * @param Allocation
+ */
+ public void skip(AllocationInterface a) {
+ synchronized (failedAllocs) {
+ failedAllocs.add(a);
}
-
- @Override
- public int compareTo(SortableShow o) {
- return (int) ((this.tier * 100) - (o.getValue() * 100));
+ }
+
+ @Override
+ public int compareTo(SortableShow o) {
+ return (int) ((this.tier * 100) - (o.getValue() * 100));
+ }
+
+ @Override
+ public int hashCode() {
+ return show.hashCode();
+ };
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == null) {
+ return false;
}
-
- @Override
- public int hashCode() {
- return show.hashCode();
- };
-
- @Override
- public boolean equals(Object other) {
- if (other == null) {
- return false;
- }
- if (this.getClass() != other.getClass()) {
- return false;
- }
- SortableShow that = (SortableShow) other;
- return that.getShowId().equals(this.getShowId());
+ if (this.getClass() != other.getClass()) {
+ return false;
}
+ SortableShow that = (SortableShow) other;
+ return that.getShowId().equals(this.getShowId());
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/Source.java b/cuebot/src/main/java/com/imageworks/spcue/Source.java
index 8f6d78ee3..e1188f219 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/Source.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/Source.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
/**
@@ -24,36 +20,32 @@
*/
public class Source {
- public String source = "unknown";
- public String username = "";
- public String pid = "";
- public String host_kill = "";
- public String reason = "";
-
- public Source() {}
-
- public Source(String source) {
- this.source = source;
- }
-
- public Source(String source, String username, String pid, String host_kill, String reason) {
- this.source = source;
- this.username = username;
- this.pid = pid;
- this.host_kill = host_kill;
- this.reason = reason;
- }
-
- public String getReason() {
- return this.reason;
- }
-
- public String toString() {
- return "User: " + this.username +
- ", Pid: " + this.pid +
- ", Hostname: " + this.host_kill +
- ", Reason: " + this.reason +
- "\n" + this.source;
- }
+ public String source = "unknown";
+ public String username = "";
+ public String pid = "";
+ public String host_kill = "";
+ public String reason = "";
+
+ public Source() {}
+
+ public Source(String source) {
+ this.source = source;
+ }
+
+ public Source(String source, String username, String pid, String host_kill, String reason) {
+ this.source = source;
+ this.username = username;
+ this.pid = pid;
+ this.host_kill = host_kill;
+ this.reason = reason;
+ }
+
+ public String getReason() {
+ return this.reason;
+ }
+
+ public String toString() {
+ return "User: " + this.username + ", Pid: " + this.pid + ", Hostname: " + this.host_kill
+ + ", Reason: " + this.reason + "\n" + this.source;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/SpcueRuntimeException.java b/cuebot/src/main/java/com/imageworks/spcue/SpcueRuntimeException.java
index 7b42994c5..c3a6be1d6 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/SpcueRuntimeException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/SpcueRuntimeException.java
@@ -2,45 +2,40 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
@SuppressWarnings("serial")
public class SpcueRuntimeException extends RuntimeException {
- public SpcueRuntimeException() {
- super();
- // TODO Auto-generated constructor stub
- }
+ public SpcueRuntimeException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
- public SpcueRuntimeException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ public SpcueRuntimeException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
- public SpcueRuntimeException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ public SpcueRuntimeException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- public SpcueRuntimeException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ public SpcueRuntimeException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/SpecBuilderException.java b/cuebot/src/main/java/com/imageworks/spcue/SpecBuilderException.java
index 2d65d9efc..2fd234501 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/SpecBuilderException.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/SpecBuilderException.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import org.springframework.core.NestedRuntimeException;
@@ -24,15 +20,14 @@
@SuppressWarnings("serial")
public class SpecBuilderException extends NestedRuntimeException {
- public SpecBuilderException(String arg0) {
- super(arg0);
- // TODO Auto-generated constructor stub
- }
+ public SpecBuilderException(String arg0) {
+ super(arg0);
+ // TODO Auto-generated constructor stub
+ }
- public SpecBuilderException(String arg0, Throwable arg1) {
- super(arg0, arg1);
- // TODO Auto-generated constructor stub
- }
+ public SpecBuilderException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ // TODO Auto-generated constructor stub
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/StrandedCores.java b/cuebot/src/main/java/com/imageworks/spcue/StrandedCores.java
index caaa53cf6..3d2e819a6 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/StrandedCores.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/StrandedCores.java
@@ -2,43 +2,38 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public final class StrandedCores {
- /**
- * The maximum time this object should be valid.
- */
- private static final long MAX_AGE_MILLIS = 5000l;
+ /**
+ * The maximum time this object should be valid.
+ */
+ private static final long MAX_AGE_MILLIS = 5000l;
- private final int cores;
- private final long expireTime = System.currentTimeMillis() + MAX_AGE_MILLIS;
+ private final int cores;
+ private final long expireTime = System.currentTimeMillis() + MAX_AGE_MILLIS;
- public StrandedCores(int cores) {
- this.cores = cores;
- }
+ public StrandedCores(int cores) {
+ this.cores = cores;
+ }
- public int getCores() {
- return this.cores;
- }
+ public int getCores() {
+ return this.cores;
+ }
- public boolean isExpired() {
- return System.currentTimeMillis() > expireTime;
- }
+ public boolean isExpired() {
+ return System.currentTimeMillis() > expireTime;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/SubscriptionEntity.java b/cuebot/src/main/java/com/imageworks/spcue/SubscriptionEntity.java
index 339f0ca91..f3b8d33ea 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/SubscriptionEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/SubscriptionEntity.java
@@ -2,47 +2,42 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class SubscriptionEntity extends Entity implements SubscriptionInterface {
- public String showId;
- public String allocationId;
- public String facilityId;
+ public String showId;
+ public String allocationId;
+ public String facilityId;
- public int size;
- public int burst;
+ public int size;
+ public int burst;
- public String getShowId() {
- return showId;
- }
+ public String getShowId() {
+ return showId;
+ }
- public String getAllocationId() {
- return allocationId;
- }
+ public String getAllocationId() {
+ return allocationId;
+ }
- public String getSubscriptionId() {
- return id;
- }
+ public String getSubscriptionId() {
+ return id;
+ }
- @Override
- public String getFacilityId() {
- return facilityId;
- }
+ @Override
+ public String getFacilityId() {
+ return facilityId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/SubscriptionInterface.java b/cuebot/src/main/java/com/imageworks/spcue/SubscriptionInterface.java
index 874ed7415..8b0bf2604 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/SubscriptionInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/SubscriptionInterface.java
@@ -2,24 +2,19 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface SubscriptionInterface extends ShowInterface, AllocationInterface {
- public String getSubscriptionId();
+ public String getSubscriptionId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/TaskEntity.java b/cuebot/src/main/java/com/imageworks/spcue/TaskEntity.java
index 13a4fa020..0ae853737 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/TaskEntity.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/TaskEntity.java
@@ -1,65 +1,59 @@
-
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class TaskEntity extends Entity implements TaskInterface {
- public int minCoreUnits = 100;
- public boolean isDefaultTask = false;
-
- public String shot;
- public String showId;
- public String deptId;
- public String pointId;
-
- public TaskEntity() { }
-
- public TaskEntity(PointInterface c, String shot, int minCoreUnits) {
- this.pointId = c.getPointId();
- this.shot = shot;
- this.minCoreUnits = minCoreUnits;
- }
-
- public TaskEntity(PointInterface c, String shot) {
- this.pointId = c.getPointId();
- this.shot = shot;
- }
-
- @Override
- public String getDepartmentId() {
- return deptId;
- }
-
- @Override
- public String getShowId() {
- return showId;
- }
-
- @Override
- public String getTaskId() {
- return id;
- }
-
- @Override
- public String getPointId() {
- return pointId;
- }
+ public int minCoreUnits = 100;
+ public boolean isDefaultTask = false;
+
+ public String shot;
+ public String showId;
+ public String deptId;
+ public String pointId;
+
+ public TaskEntity() {}
+
+ public TaskEntity(PointInterface c, String shot, int minCoreUnits) {
+ this.pointId = c.getPointId();
+ this.shot = shot;
+ this.minCoreUnits = minCoreUnits;
+ }
+
+ public TaskEntity(PointInterface c, String shot) {
+ this.pointId = c.getPointId();
+ this.shot = shot;
+ }
+
+ @Override
+ public String getDepartmentId() {
+ return deptId;
+ }
+
+ @Override
+ public String getShowId() {
+ return showId;
+ }
+
+ @Override
+ public String getTaskId() {
+ return id;
+ }
+
+ @Override
+ public String getPointId() {
+ return pointId;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/TaskInterface.java b/cuebot/src/main/java/com/imageworks/spcue/TaskInterface.java
index d06fa0bfb..fc13f452f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/TaskInterface.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/TaskInterface.java
@@ -2,29 +2,24 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public interface TaskInterface extends EntityInterface, PointInterface {
- /**
- * Returns the unique Id of the task
- *
- * @return
- */
- public String getTaskId();
+ /**
+ * Returns the unique Id of the task
+ *
+ * @return
+ */
+ public String getTaskId();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/ThreadStats.java b/cuebot/src/main/java/com/imageworks/spcue/ThreadStats.java
index d1a2fbd2f..fd870aa75 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/ThreadStats.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/ThreadStats.java
@@ -2,43 +2,38 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
public class ThreadStats {
- private int threads;
- private int avgFrameTime;
+ private int threads;
+ private int avgFrameTime;
- public int getThreads() {
- return threads;
- }
+ public int getThreads() {
+ return threads;
+ }
- public void setThreads(int threads) {
- this.threads = threads;
- }
+ public void setThreads(int threads) {
+ this.threads = threads;
+ }
- public int getAvgFrameTime() {
- return avgFrameTime;
- }
+ public int getAvgFrameTime() {
+ return avgFrameTime;
+ }
- public void setAvgFrameTime(int avgFrameTime) {
- this.avgFrameTime = avgFrameTime;
- }
+ public void setAvgFrameTime(int avgFrameTime) {
+ this.avgFrameTime = avgFrameTime;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/TrackitTaskDetail.java b/cuebot/src/main/java/com/imageworks/spcue/TrackitTaskDetail.java
index 72dcd306b..cc664a322 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/TrackitTaskDetail.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/TrackitTaskDetail.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import java.sql.Date;
@@ -26,15 +22,14 @@
*/
public class TrackitTaskDetail {
- public String show;
- public String shot;
- public String task;
- public String status;
- public Date startDate;
- public Date endDate;
- public String cgSup;
- public int frameCount;
- public int points;
- public int weeks;
+ public String show;
+ public String shot;
+ public String task;
+ public String status;
+ public Date startDate;
+ public Date endDate;
+ public String cgSup;
+ public int frameCount;
+ public int points;
+ public int weeks;
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/VirtualProc.java b/cuebot/src/main/java/com/imageworks/spcue/VirtualProc.java
index 2954fe662..c88b1b933 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/VirtualProc.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/VirtualProc.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue;
import com.imageworks.spcue.dispatcher.Dispatcher;
@@ -27,265 +23,252 @@
public class VirtualProc extends FrameEntity implements ProcInterface {
- private static final Logger logger = LogManager.getLogger(VirtualProc.class);
-
- public String hostId;
- public String allocationId;
- public String frameId;
- public String hostName;
- public String os;
- public byte[] childProcesses;
-
- public boolean canHandleNegativeCoresRequest;
- public int coresReserved;
- public long memoryReserved;
- public long memoryUsed;
- public long memoryMax;
- public long virtualMemoryUsed;
- public long virtualMemoryMax;
-
- public int gpusReserved;
- public long gpuMemoryReserved;
- public long gpuMemoryUsed;
- public long gpuMemoryMax;
-
- public boolean unbooked;
- public boolean usageRecorded = false;
- public boolean isLocalDispatch = false;
-
- public String getProcId() {
- return id;
- }
-
- public String getHostId() {
- return hostId;
- }
-
- public String getAllocationId() {
- return allocationId;
- }
-
- public String getFrameId() {
- return frameId;
- }
-
- public String getName() {
- return hostName;
- }
-
- /**
- * Build and return a proc in either fast or efficient mode.
- *
- * Efficient mode tries to assign one core per frame, but may upgrade the
- * number of cores based on memory usage.
- *
- * Fast mode books all the idle cores on the the host at one time.
+ private static final Logger logger = LogManager.getLogger(VirtualProc.class);
+
+ public String hostId;
+ public String allocationId;
+ public String frameId;
+ public String hostName;
+ public String os;
+ public byte[] childProcesses;
+
+ public boolean canHandleNegativeCoresRequest;
+ public int coresReserved;
+ public long memoryReserved;
+ public long memoryUsed;
+ public long memoryMax;
+ public long virtualMemoryUsed;
+ public long virtualMemoryMax;
+
+ public int gpusReserved;
+ public long gpuMemoryReserved;
+ public long gpuMemoryUsed;
+ public long gpuMemoryMax;
+
+ public boolean unbooked;
+ public boolean usageRecorded = false;
+ public boolean isLocalDispatch = false;
+
+ public String getProcId() {
+ return id;
+ }
+
+ public String getHostId() {
+ return hostId;
+ }
+
+ public String getAllocationId() {
+ return allocationId;
+ }
+
+ public String getFrameId() {
+ return frameId;
+ }
+
+ public String getName() {
+ return hostName;
+ }
+
+ /**
+ * Build and return a proc in either fast or efficient mode.
+ *
+ * Efficient mode tries to assign one core per frame, but may upgrade the number of cores based on
+ * memory usage.
+ *
+ * Fast mode books all the idle cores on the the host at one time.
+ *
+ * @param host
+ * @param frame
+ * @return
+ */
+ public static final VirtualProc build(DispatchHost host, DispatchFrame frame,
+ String... selfishServices) {
+ VirtualProc proc = new VirtualProc();
+ proc.allocationId = host.getAllocationId();
+ proc.hostId = host.getHostId();
+ proc.frameId = null;
+ proc.layerId = frame.getLayerId();
+ proc.jobId = frame.getJobId();
+ proc.showId = frame.getShowId();
+ proc.facilityId = frame.getFacilityId();
+ proc.os = frame.os;
+
+ proc.hostName = host.getName();
+ proc.unbooked = false;
+ proc.isLocalDispatch = host.isLocalDispatch;
+
+ proc.coresReserved = frame.minCores;
+ proc.memoryReserved = frame.getMinMemory();
+ proc.gpusReserved = frame.minGpus;
+ proc.gpuMemoryReserved = frame.minGpuMemory;
+
+ /*
+ * Frames that are announcing cores less than 100 are not multi-threaded so there is no reason
+ * for the frame to span more than a single core.
*
- * @param host
- * @param frame
- * @return
+ * If we are in "fast mode", we just book all the cores If the host is nimby, desktops are
+ * automatically fast mode.
*/
- public static final VirtualProc build(DispatchHost host,
- DispatchFrame frame,
- String... selfishServices) {
- VirtualProc proc = new VirtualProc();
- proc.allocationId = host.getAllocationId();
- proc.hostId = host.getHostId();
- proc.frameId = null;
- proc.layerId = frame.getLayerId();
- proc.jobId = frame.getJobId();
- proc.showId = frame.getShowId();
- proc.facilityId = frame.getFacilityId();
- proc.os = frame.os;
-
- proc.hostName = host.getName();
- proc.unbooked = false;
- proc.isLocalDispatch = host.isLocalDispatch;
-
- proc.coresReserved = frame.minCores;
- proc.memoryReserved = frame.getMinMemory();
- proc.gpusReserved = frame.minGpus;
- proc.gpuMemoryReserved = frame.minGpuMemory;
-
- /*
- * Frames that are announcing cores less than 100 are not multi-threaded
- * so there is no reason for the frame to span more than a single core.
- *
- * If we are in "fast mode", we just book all the cores If the host is
- * nimby, desktops are automatically fast mode.
- */
-
- if (host.strandedCores > 0) {
- proc.coresReserved = proc.coresReserved + host.strandedCores;
- }
-
- proc.canHandleNegativeCoresRequest = host.canHandleNegativeCoresRequest(proc.coresReserved);
- if (proc.coresReserved == 0) {
- logger.debug("Reserving all cores");
- proc.coresReserved = host.cores;
- }
- else if (proc.coresReserved < 0) {
- logger.debug("Reserving all cores minus " + proc.coresReserved);
- proc.coresReserved = host.cores + proc.coresReserved;
- }
- else if (proc.coresReserved >= 100) {
-
- int originalCores = proc.coresReserved;
-
- /*
- * wholeCores could be 0 if we have a fraction of a core, we can
- * just throw a re
- */
- int wholeCores = (int) (Math.floor(host.idleCores / 100.0));
- if (wholeCores == 0) {
- throw new EntityException(
- "The host had only a fraction of a core remaining "
- + "but the frame required " + frame.minCores);
- }
+ if (host.strandedCores > 0) {
+ proc.coresReserved = proc.coresReserved + host.strandedCores;
+ }
- // if (host.threadMode == ThreadMode.Variable.value() &&
- // CueUtil.isDayTime()) {
- if (host.threadMode == ThreadMode.ALL_VALUE) {
- proc.coresReserved = wholeCores * 100;
+ proc.canHandleNegativeCoresRequest = host.canHandleNegativeCoresRequest(proc.coresReserved);
+
+ if (proc.coresReserved == 0) {
+ logger.debug("Reserving all cores");
+ proc.coresReserved = host.cores;
+ } else if (proc.coresReserved < 0) {
+ logger.debug("Reserving all cores minus " + proc.coresReserved);
+ proc.coresReserved = host.cores + proc.coresReserved;
+ } else if (proc.coresReserved >= 100) {
+
+ int originalCores = proc.coresReserved;
+
+ /*
+ * wholeCores could be 0 if we have a fraction of a core, we can just throw a re
+ */
+ int wholeCores = (int) (Math.floor(host.idleCores / 100.0));
+ if (wholeCores == 0) {
+ throw new EntityException("The host had only a fraction of a core remaining "
+ + "but the frame required " + frame.minCores);
+ }
+
+ // if (host.threadMode == ThreadMode.Variable.value() &&
+ // CueUtil.isDayTime()) {
+ if (host.threadMode == ThreadMode.ALL_VALUE) {
+ proc.coresReserved = wholeCores * 100;
+ } else {
+ if (frame.threadable) {
+ if (selfishServices != null && frame.services != null
+ && containsSelfishService(frame.services.split(","), selfishServices)) {
+ proc.coresReserved = wholeCores * 100;
+ } else {
+ if (host.idleMemory - frame.getMinMemory() <= Dispatcher.MEM_STRANDED_THRESHHOLD) {
+ proc.coresReserved = wholeCores * 100;
} else {
- if (frame.threadable) {
- if (selfishServices != null &&
- frame.services != null &&
- containsSelfishService(frame.services.split(","), selfishServices)){
- proc.coresReserved = wholeCores * 100;
- }
- else {
- if (host.idleMemory - frame.getMinMemory()
- <= Dispatcher.MEM_STRANDED_THRESHHOLD) {
- proc.coresReserved = wholeCores * 100;
- } else {
- proc.coresReserved = getCoreSpan(host, frame.getMinMemory());
- }
- }
- if (host.threadMode == ThreadMode.VARIABLE_VALUE
- && proc.coresReserved <= 200) {
- proc.coresReserved = 200;
- if (proc.coresReserved > host.idleCores) {
- // Do not allow threadable frame running on 1 core.
- throw new JobDispatchException(
- "Do not allow threadable frame running one core on a ThreadMode.Variable host.");
- }
- }
- }
- }
-
- /*
- * Sanity checks to ensure coreUnits are not to high or to low.
- */
- if (proc.coresReserved < 100) {
- proc.coresReserved = 100;
- }
-
- /*
- * If the core value is changed it can never fall below the
- * original.
- */
- if (proc.coresReserved < originalCores) {
- proc.coresReserved = originalCores;
+ proc.coresReserved = getCoreSpan(host, frame.getMinMemory());
}
-
- /*
- * Check to ensure we haven't exceeded max cores.
- */
- if (frame.maxCores > 0 && proc.coresReserved >= frame.maxCores) {
- proc.coresReserved = frame.maxCores;
- }
-
+ }
+ if (host.threadMode == ThreadMode.VARIABLE_VALUE && proc.coresReserved <= 200) {
+ proc.coresReserved = 200;
if (proc.coresReserved > host.idleCores) {
- if (host.threadMode == ThreadMode.VARIABLE_VALUE
- && frame.threadable && wholeCores == 1) {
- throw new JobDispatchException(
- "Do not allow threadable frame running one core on a ThreadMode.Variable host.");
- }
- proc.coresReserved = wholeCores * 100;
+ // Do not allow threadable frame running on 1 core.
+ throw new JobDispatchException(
+ "Do not allow threadable frame running one core on a ThreadMode.Variable host.");
}
+ }
}
-
- /*
- * Don't thread non-threadable layers, no matter what people put for the
- * number of cores.
- */
- if (!frame.threadable && proc.coresReserved > 100) {
- proc.coresReserved = 100;
+ }
+
+ /*
+ * Sanity checks to ensure coreUnits are not to high or to low.
+ */
+ if (proc.coresReserved < 100) {
+ proc.coresReserved = 100;
+ }
+
+ /*
+ * If the core value is changed it can never fall below the original.
+ */
+ if (proc.coresReserved < originalCores) {
+ proc.coresReserved = originalCores;
+ }
+
+ /*
+ * Check to ensure we haven't exceeded max cores.
+ */
+ if (frame.maxCores > 0 && proc.coresReserved >= frame.maxCores) {
+ proc.coresReserved = frame.maxCores;
+ }
+
+ if (proc.coresReserved > host.idleCores) {
+ if (host.threadMode == ThreadMode.VARIABLE_VALUE && frame.threadable && wholeCores == 1) {
+ throw new JobDispatchException(
+ "Do not allow threadable frame running one core on a ThreadMode.Variable host.");
}
-
- return proc;
+ proc.coresReserved = wholeCores * 100;
+ }
}
- private static final boolean containsSelfishService(String[] frameServices, String[] selfishServices) {
- for (String frameService: frameServices){
- for (String selfishService: selfishServices) {
- if (frameService.equals(selfishService)) {
- return true;
- }
- }
- }
- return false;
+ /*
+ * Don't thread non-threadable layers, no matter what people put for the number of cores.
+ */
+ if (!frame.threadable && proc.coresReserved > 100) {
+ proc.coresReserved = 100;
}
- public static final VirtualProc build(DispatchHost host,
- DispatchFrame frame, LocalHostAssignment lja) {
-
- VirtualProc proc = new VirtualProc();
- proc.allocationId = host.getAllocationId();
- proc.hostId = host.getHostId();
- proc.frameId = null;
- proc.layerId = frame.getLayerId();
- proc.jobId = frame.getJobId();
- proc.showId = frame.getShowId();
- proc.facilityId = frame.getFacilityId();
- proc.os = frame.os;
-
- proc.hostName = host.getName();
- proc.unbooked = false;
- proc.isLocalDispatch = host.isLocalDispatch;
-
- proc.coresReserved = lja.getThreads() * 100;
- proc.memoryReserved = frame.getMinMemory();
- proc.gpusReserved = frame.minGpus;
- proc.gpuMemoryReserved = frame.minGpuMemory;
-
- int wholeCores = (int) (Math.floor(host.idleCores / 100.0));
- if (wholeCores == 0) {
- throw new EntityException(
- "The host had only a fraction of a core remaining "
- + "but the frame required " + frame.minCores);
- }
+ return proc;
+ }
- if (proc.coresReserved > host.idleCores) {
- proc.coresReserved = wholeCores * 100;
+ private static final boolean containsSelfishService(String[] frameServices,
+ String[] selfishServices) {
+ for (String frameService : frameServices) {
+ for (String selfishService : selfishServices) {
+ if (frameService.equals(selfishService)) {
+ return true;
}
+ }
+ }
+ return false;
+ }
+
+ public static final VirtualProc build(DispatchHost host, DispatchFrame frame,
+ LocalHostAssignment lja) {
+
+ VirtualProc proc = new VirtualProc();
+ proc.allocationId = host.getAllocationId();
+ proc.hostId = host.getHostId();
+ proc.frameId = null;
+ proc.layerId = frame.getLayerId();
+ proc.jobId = frame.getJobId();
+ proc.showId = frame.getShowId();
+ proc.facilityId = frame.getFacilityId();
+ proc.os = frame.os;
+
+ proc.hostName = host.getName();
+ proc.unbooked = false;
+ proc.isLocalDispatch = host.isLocalDispatch;
+
+ proc.coresReserved = lja.getThreads() * 100;
+ proc.memoryReserved = frame.getMinMemory();
+ proc.gpusReserved = frame.minGpus;
+ proc.gpuMemoryReserved = frame.minGpuMemory;
+
+ int wholeCores = (int) (Math.floor(host.idleCores / 100.0));
+ if (wholeCores == 0) {
+ throw new EntityException("The host had only a fraction of a core remaining "
+ + "but the frame required " + frame.minCores);
+ }
- return proc;
-
+ if (proc.coresReserved > host.idleCores) {
+ proc.coresReserved = wholeCores * 100;
}
- /**
- * Allocates additional cores when the frame is using more 50% more than a
- * single cores worth of memory.
- *
- * @param host
- * @param minMemory
- * @return
- */
- public static int getCoreSpan(DispatchHost host, long minMemory) {
- int totalCores = (int) (Math.floor(host.cores / 100.0));
- int idleCores = (int) (Math.floor(host.idleCores / 100.0));
- if (idleCores < 1) {
- return 100;
- }
+ return proc;
+
+ }
+
+ /**
+ * Allocates additional cores when the frame is using more 50% more than a single cores worth of
+ * memory.
+ *
+ * @param host
+ * @param minMemory
+ * @return
+ */
+ public static int getCoreSpan(DispatchHost host, long minMemory) {
+ int totalCores = (int) (Math.floor(host.cores / 100.0));
+ int idleCores = (int) (Math.floor(host.idleCores / 100.0));
+ if (idleCores < 1) {
+ return 100;
+ }
- long memPerCore = host.idleMemory / totalCores;
- double procs = minMemory / (double) memPerCore;
- int reserveCores = (int) (Math.round(procs)) * 100;
+ long memPerCore = host.idleMemory / totalCores;
+ double procs = minMemory / (double) memPerCore;
+ int reserveCores = (int) (Math.round(procs)) * 100;
- return reserveCores;
- }
+ return reserveCores;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/config/AppConfig.java b/cuebot/src/main/java/com/imageworks/spcue/config/AppConfig.java
index 7ed1668ce..d6c4b45fe 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/config/AppConfig.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/config/AppConfig.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.config;
import com.imageworks.spcue.servlet.JobLaunchServlet;
@@ -38,56 +34,58 @@
@Configuration
@ImportResource({"classpath:conf/spring/applicationContext-dbEngine.xml",
- "classpath:conf/spring/applicationContext-grpc.xml",
- "classpath:conf/spring/applicationContext-grpcServer.xml",
- "classpath:conf/spring/applicationContext-service.xml",
- "classpath:conf/spring/applicationContext-jms.xml",
- "classpath:conf/spring/applicationContext-criteria.xml"})
+ "classpath:conf/spring/applicationContext-grpc.xml",
+ "classpath:conf/spring/applicationContext-grpcServer.xml",
+ "classpath:conf/spring/applicationContext-service.xml",
+ "classpath:conf/spring/applicationContext-jms.xml",
+ "classpath:conf/spring/applicationContext-criteria.xml"})
@EnableConfigurationProperties
@PropertySource({"classpath:opencue.properties"})
public class AppConfig {
- @Configuration
- @Conditional(PostgresDatabaseCondition.class)
- @ImportResource({"classpath:conf/spring/applicationContext-dao-postgres.xml"})
- static class PostgresEngineConfig {}
+ @Configuration
+ @Conditional(PostgresDatabaseCondition.class)
+ @ImportResource({"classpath:conf/spring/applicationContext-dao-postgres.xml"})
+ static class PostgresEngineConfig {
+ }
- @Bean
- @Primary
- @ConfigurationProperties(prefix="datasource.cue-data-source")
- public DataSource cueDataSource() {
- return DataSourceBuilder.create().build();
- }
+ @Bean
+ @Primary
+ @ConfigurationProperties(prefix = "datasource.cue-data-source")
+ public DataSource cueDataSource() {
+ return DataSourceBuilder.create().build();
+ }
- @Bean
- public ServletRegistrationBean jobLaunchServlet() {
- ServletRegistrationBean b = new ServletRegistrationBean<>();
- b.addUrlMappings("/launch");
- b.addInitParameter("contextConfigLocation", "classpath:conf/spring/jobLaunchServlet-servlet.xml");
- b.setServlet(new JobLaunchServlet());
- return b;
- }
+ @Bean
+ public ServletRegistrationBean jobLaunchServlet() {
+ ServletRegistrationBean b = new ServletRegistrationBean<>();
+ b.addUrlMappings("/launch");
+ b.addInitParameter("contextConfigLocation",
+ "classpath:conf/spring/jobLaunchServlet-servlet.xml");
+ b.setServlet(new JobLaunchServlet());
+ return b;
+ }
- @Bean
- public ServletRegistrationBean healthCheckServlet() {
- ServletRegistrationBean b = new ServletRegistrationBean<>();
- b.addUrlMappings("/health");
- b.addInitParameter("contextConfigLocation", "classpath:conf/spring/healthCheckServlet-servlet.xml");
- b.setServlet(new HealthCheckServlet());
- return b;
- }
+ @Bean
+ public ServletRegistrationBean healthCheckServlet() {
+ ServletRegistrationBean b = new ServletRegistrationBean<>();
+ b.addUrlMappings("/health");
+ b.addInitParameter("contextConfigLocation",
+ "classpath:conf/spring/healthCheckServlet-servlet.xml");
+ b.setServlet(new HealthCheckServlet());
+ return b;
+ }
- /**
- * Registers the Prometheus MetricsServlet to expose metrics at /metrics endpoint
- *
- * @return A ServletRegistrationBean for MetricsServlet
- */
- @Bean
- public ServletRegistrationBean prometheusServer() {
- ServletRegistrationBean b = new ServletRegistrationBean<>();
- b.addUrlMappings("/metrics");
- b.setServlet(new MetricsServlet());
- return b;
- }
+ /**
+ * Registers the Prometheus MetricsServlet to expose metrics at /metrics endpoint
+ *
+ * @return A ServletRegistrationBean for MetricsServlet
+ */
+ @Bean
+ public ServletRegistrationBean prometheusServer() {
+ ServletRegistrationBean b = new ServletRegistrationBean<>();
+ b.addUrlMappings("/metrics");
+ b.setServlet(new MetricsServlet());
+ return b;
+ }
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/config/DatabaseEngine.java b/cuebot/src/main/java/com/imageworks/spcue/config/DatabaseEngine.java
index 0ae36a296..98fd478ed 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/config/DatabaseEngine.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/config/DatabaseEngine.java
@@ -1,9 +1,9 @@
package com.imageworks.spcue.config;
public enum DatabaseEngine {
- POSTGRES;
+ POSTGRES;
- public static DatabaseEngine fromEnv() {
- return POSTGRES;
- }
+ public static DatabaseEngine fromEnv() {
+ return POSTGRES;
+ }
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/config/PostgresDatabaseCondition.java b/cuebot/src/main/java/com/imageworks/spcue/config/PostgresDatabaseCondition.java
index f80ebfb03..aae40a11e 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/config/PostgresDatabaseCondition.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/config/PostgresDatabaseCondition.java
@@ -6,14 +6,14 @@
public class PostgresDatabaseCondition implements Condition {
- @Override
- public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
- String dbEngine = System.getenv("CUEBOT_DB_ENGINE");
- if (dbEngine == null) {
- return true;
- }
- DatabaseEngine selectedDatabaseEngine = DatabaseEngine.valueOf(dbEngine.toUpperCase());
- return selectedDatabaseEngine.equals(DatabaseEngine.POSTGRES);
+ @Override
+ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
+ String dbEngine = System.getenv("CUEBOT_DB_ENGINE");
+ if (dbEngine == null) {
+ return true;
}
+ DatabaseEngine selectedDatabaseEngine = DatabaseEngine.valueOf(dbEngine.toUpperCase());
+ return selectedDatabaseEngine.equals(DatabaseEngine.POSTGRES);
+ }
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/ActionDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/ActionDao.java
index 2d8d3ccc1..507fa19a8 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/ActionDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/ActionDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -27,13 +23,15 @@
public interface ActionDao {
- void createAction(ActionEntity action);
- void deleteAction(ActionInterface action);
+ void createAction(ActionEntity action);
- ActionEntity getAction(String id);
- ActionEntity getAction(ActionInterface action);
- void updateAction(ActionEntity action);
+ void deleteAction(ActionInterface action);
- List getActions(FilterInterface filter);
-}
+ ActionEntity getAction(String id);
+ ActionEntity getAction(ActionInterface action);
+
+ void updateAction(ActionEntity action);
+
+ List getActions(FilterInterface filter);
+}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/AllocationDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/AllocationDao.java
index b5a83745c..2b5a6846a 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/AllocationDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/AllocationDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.AllocationEntity;
@@ -30,84 +26,81 @@
*/
public interface AllocationDao {
- /**
- * returns an AllocationEntity from its unique ID
- *
- * @param id
- * @return AllocationEntity
- */
- AllocationEntity getAllocationEntity(String id);
-
- /**
- * Return an AllocationEntity for the given facility and unique allocation
- * name.
- *
- * @param name
- * @return AllocationEntity
- */
- AllocationEntity findAllocationEntity(String facility, String name);
-
- /**
- * Return an AllocationEntity from its fully qualified name which should be
- * formatted as facility.name.
- *
- * @param name
- * @return
- */
- AllocationEntity findAllocationEntity(String name);
-
- /**
- * Creates a new allocation
- *
- * @param detail
- */
- void insertAllocation(FacilityInterface facility, AllocationEntity detail);
-
- /**
- * Deletes an allocation
- *
- * @param alloc
- */
- void deleteAllocation(AllocationInterface alloc);
-
- /**
- * Updates the name of the allocation. This method also updates all child
- * host allocation tags so you'll need to run
- * allocDao.recalculateTags(alloc)
- *
- * @param alloc
- * @param name
- */
- void updateAllocationName(AllocationInterface alloc, String name);
-
- /**
- * Updates the allocation tag. All hosts in the allocation are retagged.
- *
- * @param a
- * @param tag
- */
- void updateAllocationTag(AllocationInterface a, String tag);
-
- /**
- * Sets the default allocation, AKA where procs go first.
- *
- * @param a
- */
- void setDefaultAllocation(AllocationInterface a);
-
- /**
- * Returns the current default allocation.
- *
- * @return
- */
- AllocationEntity getDefaultAllocationEntity();
-
- /**
- * Set the allocation as billable or not billble.
- *
- * @param alloc
- * @param value
- */
- void updateAllocationBillable(AllocationInterface alloc, boolean value);
+ /**
+ * returns an AllocationEntity from its unique ID
+ *
+ * @param id
+ * @return AllocationEntity
+ */
+ AllocationEntity getAllocationEntity(String id);
+
+ /**
+ * Return an AllocationEntity for the given facility and unique allocation name.
+ *
+ * @param name
+ * @return AllocationEntity
+ */
+ AllocationEntity findAllocationEntity(String facility, String name);
+
+ /**
+ * Return an AllocationEntity from its fully qualified name which should be formatted as
+ * facility.name.
+ *
+ * @param name
+ * @return
+ */
+ AllocationEntity findAllocationEntity(String name);
+
+ /**
+ * Creates a new allocation
+ *
+ * @param detail
+ */
+ void insertAllocation(FacilityInterface facility, AllocationEntity detail);
+
+ /**
+ * Deletes an allocation
+ *
+ * @param alloc
+ */
+ void deleteAllocation(AllocationInterface alloc);
+
+ /**
+ * Updates the name of the allocation. This method also updates all child host allocation tags so
+ * you'll need to run allocDao.recalculateTags(alloc)
+ *
+ * @param alloc
+ * @param name
+ */
+ void updateAllocationName(AllocationInterface alloc, String name);
+
+ /**
+ * Updates the allocation tag. All hosts in the allocation are retagged.
+ *
+ * @param a
+ * @param tag
+ */
+ void updateAllocationTag(AllocationInterface a, String tag);
+
+ /**
+ * Sets the default allocation, AKA where procs go first.
+ *
+ * @param a
+ */
+ void setDefaultAllocation(AllocationInterface a);
+
+ /**
+ * Returns the current default allocation.
+ *
+ * @return
+ */
+ AllocationEntity getDefaultAllocationEntity();
+
+ /**
+ * Set the allocation as billable or not billble.
+ *
+ * @param alloc
+ * @param value
+ */
+ void updateAllocationBillable(AllocationInterface alloc, boolean value);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/BookingDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/BookingDao.java
index f3bb09915..4e2eedf5d 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/BookingDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/BookingDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -29,191 +25,183 @@
public interface BookingDao {
- /**
- * Updates the maximum number of cores the given local
- * host assignment should use.
- *
- * @param l
- * @return
- */
- boolean updateMaxCores(LocalHostAssignment l, int maxCoreUnits);
-
- /**
- * Updates the maximum number of gpus the given local
- * host assignment should use.
- *
- * @param l
- * @return
- */
- boolean updateMaxGpus(LocalHostAssignment l, int gpus);
-
- /**
- * Updates the maximum amount of memory a given local host
- * assignment should use.
- *
- * @param l
- * @return
- */
- boolean updateMaxMemory(LocalHostAssignment l, long maxMemory);
-
- /**
- * Updates the maximum amount of gpu memory a given local host
- * assignment should use.
- *
- * @param l
- * @return
- */
- boolean updateMaxGpuMemory(LocalHostAssignment l, long maxGpuMemory);
-
- /**
- * Create a new LocalHostAssignment attached to the given job.
- *
- * @param host
- * @param job
- * @param lha
- */
- void insertLocalHostAssignment(HostInterface host, JobInterface job,
- LocalHostAssignment lha);
-
- /**
- * Create a new LocalHostAssignment attached to the given layer.
- *
- * @param host
- * @param layer
- * @param lha
- */
- void insertLocalHostAssignment(HostInterface host, LayerInterface layer,
- LocalHostAssignment lha);
-
- /**
- * Create a new LocalHostAssignment attached to the given frame.
- *
- * @param host
- * @param frame
- * @param lha
- */
- void insertLocalHostAssignment(HostInterface host, FrameInterface frame,
- LocalHostAssignment lha);
-
- /**
- * Return the host + jobs local booking assignment properties.
- * @param host
- * @param job
- * @return
- */
- List getLocalJobAssignment(HostInterface host);
-
- /**
- * Return the host + jobs local booking assignment properties.
- * @param host
- * @param job
- * @return
- */
- LocalHostAssignment getLocalJobAssignment(String id);
-
- /**
- * Return the host + jobs local booking assignment properties.
- * @param hostId
- * @param jobId
- * @return
- */
- LocalHostAssignment getLocalJobAssignment(String hostId, String jobId);
-
- /**
- * Return true if the host has a local job assignment.
- *
- * @param host
- * @return
- */
- boolean hasLocalJob(HostInterface host);
-
- /**
- * Returns true if the host has an active local booking.
- *
- * @param host
- * @return
- */
- boolean hasActiveLocalJob(HostInterface host);
-
- /**
- * Delete the given LocalHostAssignment.
- *
- * @param e
- */
- boolean deleteLocalJobAssignment(LocalHostAssignment lha);
-
- /**
- * Deactivate the given LocalHostAssignment.
- *
- * @param l
- */
- boolean deactivate(LocalHostAssignment l);
-
- /**
- * Return the difference between the number of assigned cores and
- * the given coreUnits.
- *
- * @param l
- * @param coreUnits
- * @return
- */
- int getCoreUsageDifference(LocalHostAssignment l, int coreUnits);
-
- /**
- * Return the difference between the number of assigned gpus and
- * the given gpuUnits.
- *
- * @param l
- * @param gpuUnits
- * @return
- */
- int getGpuUsageDifference(LocalHostAssignment l, int gpuUnits);
-
- /**
- * Allocate additional cores from the given host.
- *
- * @param h
- * @param cores
- * @return
- */
- boolean allocateCoresFromHost(HostInterface h, int cores);
-
- /**
- * Deallocate cores from the given host, returning them to its pool.
- *
- * @param h
- * @param cores
- * @return
- */
- boolean deallocateCoresFromHost(HostInterface h, int cores);
-
- /**
- * Allocate additional gpus from the given host.
- *
- * @param h
- * @param gpus
- * @return
- */
- boolean allocateGpusFromHost(HostInterface h, int gpus);
-
- /**
- * Deallocate gpu from the given host, returning them to its pool.
- *
- * @param h
- * @param gpus
- * @return
- */
- boolean deallocateGpusFromHost(HostInterface h, int gpus);
-
- /**
- * Return true if the Host has a resource deficit. A
- * deficit can occur if there are more resources in use than the
- * maximum allowed due to changes from the user.
- *
- * @param l
- * @return
- */
- boolean hasResourceDeficit(HostInterface host);
+ /**
+ * Updates the maximum number of cores the given local host assignment should use.
+ *
+ * @param l
+ * @return
+ */
+ boolean updateMaxCores(LocalHostAssignment l, int maxCoreUnits);
+
+ /**
+ * Updates the maximum number of gpus the given local host assignment should use.
+ *
+ * @param l
+ * @return
+ */
+ boolean updateMaxGpus(LocalHostAssignment l, int gpus);
+
+ /**
+ * Updates the maximum amount of memory a given local host assignment should use.
+ *
+ * @param l
+ * @return
+ */
+ boolean updateMaxMemory(LocalHostAssignment l, long maxMemory);
+
+ /**
+ * Updates the maximum amount of gpu memory a given local host assignment should use.
+ *
+ * @param l
+ * @return
+ */
+ boolean updateMaxGpuMemory(LocalHostAssignment l, long maxGpuMemory);
+
+ /**
+ * Create a new LocalHostAssignment attached to the given job.
+ *
+ * @param host
+ * @param job
+ * @param lha
+ */
+ void insertLocalHostAssignment(HostInterface host, JobInterface job, LocalHostAssignment lha);
+
+ /**
+ * Create a new LocalHostAssignment attached to the given layer.
+ *
+ * @param host
+ * @param layer
+ * @param lha
+ */
+ void insertLocalHostAssignment(HostInterface host, LayerInterface layer, LocalHostAssignment lha);
+
+ /**
+ * Create a new LocalHostAssignment attached to the given frame.
+ *
+ * @param host
+ * @param frame
+ * @param lha
+ */
+ void insertLocalHostAssignment(HostInterface host, FrameInterface frame, LocalHostAssignment lha);
+
+ /**
+ * Return the host + jobs local booking assignment properties.
+ *
+ * @param host
+ * @param job
+ * @return
+ */
+ List getLocalJobAssignment(HostInterface host);
+
+ /**
+ * Return the host + jobs local booking assignment properties.
+ *
+ * @param host
+ * @param job
+ * @return
+ */
+ LocalHostAssignment getLocalJobAssignment(String id);
+
+ /**
+ * Return the host + jobs local booking assignment properties.
+ *
+ * @param hostId
+ * @param jobId
+ * @return
+ */
+ LocalHostAssignment getLocalJobAssignment(String hostId, String jobId);
+
+ /**
+ * Return true if the host has a local job assignment.
+ *
+ * @param host
+ * @return
+ */
+ boolean hasLocalJob(HostInterface host);
+
+ /**
+ * Returns true if the host has an active local booking.
+ *
+ * @param host
+ * @return
+ */
+ boolean hasActiveLocalJob(HostInterface host);
+
+ /**
+ * Delete the given LocalHostAssignment.
+ *
+ * @param e
+ */
+ boolean deleteLocalJobAssignment(LocalHostAssignment lha);
+
+ /**
+ * Deactivate the given LocalHostAssignment.
+ *
+ * @param l
+ */
+ boolean deactivate(LocalHostAssignment l);
+
+ /**
+ * Return the difference between the number of assigned cores and the given coreUnits.
+ *
+ * @param l
+ * @param coreUnits
+ * @return
+ */
+ int getCoreUsageDifference(LocalHostAssignment l, int coreUnits);
+
+ /**
+ * Return the difference between the number of assigned gpus and the given gpuUnits.
+ *
+ * @param l
+ * @param gpuUnits
+ * @return
+ */
+ int getGpuUsageDifference(LocalHostAssignment l, int gpuUnits);
+
+ /**
+ * Allocate additional cores from the given host.
+ *
+ * @param h
+ * @param cores
+ * @return
+ */
+ boolean allocateCoresFromHost(HostInterface h, int cores);
+
+ /**
+ * Deallocate cores from the given host, returning them to its pool.
+ *
+ * @param h
+ * @param cores
+ * @return
+ */
+ boolean deallocateCoresFromHost(HostInterface h, int cores);
+
+ /**
+ * Allocate additional gpus from the given host.
+ *
+ * @param h
+ * @param gpus
+ * @return
+ */
+ boolean allocateGpusFromHost(HostInterface h, int gpus);
+
+ /**
+ * Deallocate gpu from the given host, returning them to its pool.
+ *
+ * @param h
+ * @param gpus
+ * @return
+ */
+ boolean deallocateGpusFromHost(HostInterface h, int gpus);
+
+ /**
+ * Return true if the Host has a resource deficit. A deficit can occur if there are more resources
+ * in use than the maximum allowed due to changes from the user.
+ *
+ * @param l
+ * @return
+ */
+ boolean hasResourceDeficit(HostInterface host);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/CommentDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/CommentDao.java
index 08bea59b1..e0b0acc51 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/CommentDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/CommentDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.CommentDetail;
@@ -27,79 +23,79 @@
public interface CommentDao {
- /**
- * deletes the specified comment.
- *
- * @param id
- */
- public void deleteComment(String id);
-
- /**
- * Deletes comments using host, user, and subject
- *
- * @param host
- * @param user
- * @param subject
- * @return boolean: returns true if one or more comments where deleted
- */
- public boolean deleteCommentByHostUserAndSubject(HostInterface host, String user, String subject);
-
- /**
- * Get comments using host, user, and subject
- *
- * @param host
- * @param user
- * @param subject
- * @return List
- */
- public List getCommentsByHostUserAndSubject(HostInterface host, String user, String subject);
-
- /**
- * Retrieves the specified comment.
- *
- * @param id
- * @return
- */
- public CommentDetail getCommentDetail(String id);
-
- /**
- * Inserts a comment on a job
- *
- * @param job
- * @param comment
- */
- public void insertComment(JobInterface job, CommentDetail comment);
-
- /**
- * Inserts a comment on a host
- *
- * @param host
- * @param comment
- */
- public void insertComment(HostInterface host, CommentDetail comment);
-
- /**
- * Update specified comment
- *
- * @param comment
- */
- public void updateComment(CommentDetail comment);
-
- /**
- * Updates the specified comment's message field with the supplied value.
- *
- * @param id
- * @param message
- */
- public void updateCommentMessage(String id, String message);
-
- /**
- * Update the specified comment's subject field with the supplied value.
- *
- * @param id
- * @param subject
- */
- public void updateCommentSubject(String id, String subject);
+ /**
+ * deletes the specified comment.
+ *
+ * @param id
+ */
+ public void deleteComment(String id);
+
+ /**
+ * Deletes comments using host, user, and subject
+ *
+ * @param host
+ * @param user
+ * @param subject
+ * @return boolean: returns true if one or more comments where deleted
+ */
+ public boolean deleteCommentByHostUserAndSubject(HostInterface host, String user, String subject);
+
+ /**
+ * Get comments using host, user, and subject
+ *
+ * @param host
+ * @param user
+ * @param subject
+ * @return List
+ */
+ public List getCommentsByHostUserAndSubject(HostInterface host, String user,
+ String subject);
+
+ /**
+ * Retrieves the specified comment.
+ *
+ * @param id
+ * @return
+ */
+ public CommentDetail getCommentDetail(String id);
+
+ /**
+ * Inserts a comment on a job
+ *
+ * @param job
+ * @param comment
+ */
+ public void insertComment(JobInterface job, CommentDetail comment);
+
+ /**
+ * Inserts a comment on a host
+ *
+ * @param host
+ * @param comment
+ */
+ public void insertComment(HostInterface host, CommentDetail comment);
+
+ /**
+ * Update specified comment
+ *
+ * @param comment
+ */
+ public void updateComment(CommentDetail comment);
+
+ /**
+ * Updates the specified comment's message field with the supplied value.
+ *
+ * @param id
+ * @param message
+ */
+ public void updateCommentMessage(String id, String message);
+
+ /**
+ * Update the specified comment's subject field with the supplied value.
+ *
+ * @param id
+ * @param subject
+ */
+ public void updateCommentSubject(String id, String subject);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/DeedDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/DeedDao.java
index b02b58222..cb2116884 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/DeedDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/DeedDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -27,50 +23,47 @@
public interface DeedDao {
- /**
- * Create a new deed to the host.
- */
- DeedEntity insertDeed(OwnerEntity owner, HostInterface host);
+ /**
+ * Create a new deed to the host.
+ */
+ DeedEntity insertDeed(OwnerEntity owner, HostInterface host);
- /**
- * Delete the given deed. Return true if a row was
- * actually deleted, false if one was not.
- *
- * @param deed
- * @return
- */
- boolean deleteDeed(DeedEntity deed);
+ /**
+ * Delete the given deed. Return true if a row was actually deleted, false if one was not.
+ *
+ * @param deed
+ * @return
+ */
+ boolean deleteDeed(DeedEntity deed);
- /**
- * Delete the given deed. Return true if a row was
- * actually deleted, false if one was not.
- *
- * @param deed
- * @return
- */
- boolean deleteDeed(HostInterface host);
+ /**
+ * Delete the given deed. Return true if a row was actually deleted, false if one was not.
+ *
+ * @param deed
+ * @return
+ */
+ boolean deleteDeed(HostInterface host);
- /**
- * Return the deed by its given id.
- *
- * @param id
- * @return
- */
- DeedEntity getDeed(String id);
+ /**
+ * Return the deed by its given id.
+ *
+ * @param id
+ * @return
+ */
+ DeedEntity getDeed(String id);
- /**
- * Return all deed's from the given owner.
- *
- * @param owner
- * @return
- */
- List getDeeds(OwnerEntity owner);
+ /**
+ * Return all deed's from the given owner.
+ *
+ * @param owner
+ * @return
+ */
+ List getDeeds(OwnerEntity owner);
- /**
- *
- *
- * @param owner
- */
- void deleteDeeds(OwnerEntity owner);
+ /**
+ *
+ *
+ * @param owner
+ */
+ void deleteDeeds(OwnerEntity owner);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/DepartmentDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/DepartmentDao.java
index 2288983fb..de79d18cf 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/DepartmentDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/DepartmentDao.java
@@ -2,79 +2,70 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.DepartmentInterface;
/**
- * This DAO currently does double duty. It handles the creation, removal, and
- * updating of Department and DepartmentConfig entries.
+ * This DAO currently does double duty. It handles the creation, removal, and updating of Department
+ * and DepartmentConfig entries.
*/
public interface DepartmentDao {
- /**
- * Finds a department by name. Department objects contain only a name and a
- * unique ID.
- *
- * @param name
- * @return Department
- */
- public DepartmentInterface findDepartment(String name);
+ /**
+ * Finds a department by name. Department objects contain only a name and a unique ID.
+ *
+ * @param name
+ * @return Department
+ */
+ public DepartmentInterface findDepartment(String name);
- /**
- * Finds a department by id. Department objects contain only a name and a
- * unique ID.
- *
- * @param id
- * @return Department
- */
- public DepartmentInterface getDepartment(String id);
+ /**
+ * Finds a department by id. Department objects contain only a name and a unique ID.
+ *
+ * @param id
+ * @return Department
+ */
+ public DepartmentInterface getDepartment(String id);
- /**
- * Returns the cue's default department. The default department is assigned
- * to any job that falls within a group that doesn't have a department.
- * Usually this is Unassigned.
- *
- * @return Department
- */
- public DepartmentInterface getDefaultDepartment();
+ /**
+ * Returns the cue's default department. The default department is assigned to any job that falls
+ * within a group that doesn't have a department. Usually this is Unassigned.
+ *
+ * @return Department
+ */
+ public DepartmentInterface getDefaultDepartment();
- /**
- * Returns true if the department exists
- *
- * @param name
- * @return
- */
- public boolean departmentExists(String name);
+ /**
+ * Returns true if the department exists
+ *
+ * @param name
+ * @return
+ */
+ public boolean departmentExists(String name);
- /**
- * Inserts a new department record. Departments are only a name and a unique
- * ID.
- *
- * @param name
- */
- public void insertDepartment(String name);
+ /**
+ * Inserts a new department record. Departments are only a name and a unique ID.
+ *
+ * @param name
+ */
+ public void insertDepartment(String name);
- /**
- * Removes the specified department.
- *
- * @param d
- */
- public void deleteDepartment(DepartmentInterface d);
+ /**
+ * Removes the specified department.
+ *
+ * @param d
+ */
+ public void deleteDepartment(DepartmentInterface d);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/DependDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/DependDao.java
index 3840b6e8d..053c20cf2 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/DependDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/DependDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -46,185 +42,171 @@
*/
public interface DependDao {
- /**
- * Returns a LightweightDependency from its ID
- *
- * @param id
- * @return LightweightDependency
- */
- LightweightDependency getDepend(String id);
-
- /**
- * Returns a LightweightDependency from its ID
- *
- * @param signature
- * @return LightweightDependency
- */
- LightweightDependency getDependBySignature(String s);
-
- /**
- * Gets a list of LightweightDependenies that depend on
- * the specified job
- *
- * @param job
- * @return List
- */
- List getWhatDependsOn(JobInterface job);
-
- /**
- * Get a list of LightweightDependenies that depend on this job
- * and are either intenral, external, or either.
- * The depends returned can depend on any part of the job.
- *
- * @param job
- * @param target
- * @return
- */
- List getWhatDependsOn(JobInterface job, DependTarget target);
-
- /**
- * Gets a list of LightweightDependencies that depend on
- * the specified layer
- *
- * @param job
- * @param layer
- * @return List
- */
- List getWhatDependsOn(LayerInterface layer);
-
- /**
- * Gets a list of LightweightDependencies that depend on
- * the specified frame
- *
- * @param frame
- * @return
- */
- List getWhatDependsOn(FrameInterface frame);
-
- /**
- * Deletes a dependency
- *
- * @param depend
- */
- void deleteDepend(LightweightDependency depend);
-
- /**
- * Returns a list of depends where the specified job is the depender. Passing a
- * depend target will limit the results to either internal or external. This
- * method returns active depends only.
- *
- * @param Job
- * @param DependTarget
- * @return List
- */
- List getWhatThisDependsOn(JobInterface job, DependTarget target);
-
- /**
- * Returns a list of depends the layer depends on. Passing in a depend
- * target will limit the results to either internal, external or both.
- * This method returns active depends only.
- *
- * @param Layer
- * @return List
- */
- List getWhatThisDependsOn(LayerInterface layer, DependTarget target);
-
- /**
- * Returns a list of depends the frame depends on. Passing in a depend
- * target will limit the results to either inernal, external, or both.This
- * method returns active depends only.
- *
- * @param Frame
- * @return List
- */
- List getWhatThisDependsOn(FrameInterface frame, DependTarget target);
-
- /**
- * Returns a list of dependencies where the supplied frame is the element
- * being depended on.
- *
- * @param frame
- * @param active
- * @return
- */
- List getWhatDependsOn(FrameInterface frame, boolean active);
-
-
- /**
- *
- * @param layer
- * @param active
- * @return
- */
- List getWhatDependsOn(LayerInterface layer, boolean active);
-
- /**
- * Returns a list of child FrameByFrame dependencies
- *
- * @param depend
- * @return
- */
- List getChildDepends(LightweightDependency depend);
-
- void insertDepend(JobOnJob d);
-
- void insertDepend(JobOnLayer d);
-
- void insertDepend(JobOnFrame d);
-
- void insertDepend(LayerOnJob d);
-
- void insertDepend(LayerOnLayer d);
-
- void insertDepend(LayerOnFrame d);
-
- void insertDepend(FrameOnJob d);
-
- void insertDepend(FrameOnLayer d);
-
- void insertDepend(FrameByFrame d);
-
- void insertDepend(FrameOnFrame d);
-
- void insertDepend(PreviousFrame d);
-
- void updateFrameState(FrameInterface f);
-
- /**
- * Increment the depend count for the specified frame.
- *
- * @param f
- * @throws DependException if the depend count was not
- * incremented.
- */
- void incrementDependCount(FrameInterface f);
-
- /**
- * Decrement the depend count for the specified frame.
- * Return false if the depend count is already 0, true
- * if the depend count was decremented.
- *
- * @param f
- */
- boolean decrementDependCount(FrameInterface f);
-
- /**
- * Returns true if this is the thread that set
- * the depend to inactive.
- *
- * @param depend
- * @return
- */
- boolean setInactive(LightweightDependency depend);
-
- /**
- * Sets a dependency as active. If the dependency is
- * already active return false, otherwise return true.
- * Currently this only works on FrameOnFrame and LayerOnLayer.
- *
- * @param depend
- * @return true if this thread actually updated the row.
- */
- boolean setActive(LightweightDependency depend);
+ /**
+ * Returns a LightweightDependency from its ID
+ *
+ * @param id
+ * @return LightweightDependency
+ */
+ LightweightDependency getDepend(String id);
+
+ /**
+ * Returns a LightweightDependency from its ID
+ *
+ * @param signature
+ * @return LightweightDependency
+ */
+ LightweightDependency getDependBySignature(String s);
+
+ /**
+ * Gets a list of LightweightDependenies that depend on the specified job
+ *
+ * @param job
+ * @return List
+ */
+ List getWhatDependsOn(JobInterface job);
+
+ /**
+ * Get a list of LightweightDependenies that depend on this job and are either intenral, external,
+ * or either. The depends returned can depend on any part of the job.
+ *
+ * @param job
+ * @param target
+ * @return
+ */
+ List getWhatDependsOn(JobInterface job, DependTarget target);
+
+ /**
+ * Gets a list of LightweightDependencies that depend on the specified layer
+ *
+ * @param job
+ * @param layer
+ * @return List
+ */
+ List getWhatDependsOn(LayerInterface layer);
+
+ /**
+ * Gets a list of LightweightDependencies that depend on the specified frame
+ *
+ * @param frame
+ * @return
+ */
+ List getWhatDependsOn(FrameInterface frame);
+
+ /**
+ * Deletes a dependency
+ *
+ * @param depend
+ */
+ void deleteDepend(LightweightDependency depend);
+
+ /**
+ * Returns a list of depends where the specified job is the depender. Passing a depend target will
+ * limit the results to either internal or external. This method returns active depends only.
+ *
+ * @param Job
+ * @param DependTarget
+ * @return List
+ */
+ List getWhatThisDependsOn(JobInterface job, DependTarget target);
+
+ /**
+ * Returns a list of depends the layer depends on. Passing in a depend target will limit the
+ * results to either internal, external or both. This method returns active depends only.
+ *
+ * @param Layer
+ * @return List
+ */
+ List getWhatThisDependsOn(LayerInterface layer, DependTarget target);
+
+ /**
+ * Returns a list of depends the frame depends on. Passing in a depend target will limit the
+ * results to either inernal, external, or both.This method returns active depends only.
+ *
+ * @param Frame
+ * @return List
+ */
+ List getWhatThisDependsOn(FrameInterface frame, DependTarget target);
+
+ /**
+ * Returns a list of dependencies where the supplied frame is the element being depended on.
+ *
+ * @param frame
+ * @param active
+ * @return
+ */
+ List getWhatDependsOn(FrameInterface frame, boolean active);
+
+ /**
+ *
+ * @param layer
+ * @param active
+ * @return
+ */
+ List getWhatDependsOn(LayerInterface layer, boolean active);
+
+ /**
+ * Returns a list of child FrameByFrame dependencies
+ *
+ * @param depend
+ * @return
+ */
+ List getChildDepends(LightweightDependency depend);
+
+ void insertDepend(JobOnJob d);
+
+ void insertDepend(JobOnLayer d);
+
+ void insertDepend(JobOnFrame d);
+
+ void insertDepend(LayerOnJob d);
+
+ void insertDepend(LayerOnLayer d);
+
+ void insertDepend(LayerOnFrame d);
+
+ void insertDepend(FrameOnJob d);
+
+ void insertDepend(FrameOnLayer d);
+
+ void insertDepend(FrameByFrame d);
+
+ void insertDepend(FrameOnFrame d);
+
+ void insertDepend(PreviousFrame d);
+
+ void updateFrameState(FrameInterface f);
+
+ /**
+ * Increment the depend count for the specified frame.
+ *
+ * @param f
+ * @throws DependException if the depend count was not incremented.
+ */
+ void incrementDependCount(FrameInterface f);
+
+ /**
+ * Decrement the depend count for the specified frame. Return false if the depend count is already
+ * 0, true if the depend count was decremented.
+ *
+ * @param f
+ */
+ boolean decrementDependCount(FrameInterface f);
+
+ /**
+ * Returns true if this is the thread that set the depend to inactive.
+ *
+ * @param depend
+ * @return
+ */
+ boolean setInactive(LightweightDependency depend);
+
+ /**
+ * Sets a dependency as active. If the dependency is already active return false, otherwise return
+ * true. Currently this only works on FrameOnFrame and LayerOnLayer.
+ *
+ * @param depend
+ * @return true if this thread actually updated the row.
+ */
+ boolean setActive(LightweightDependency depend);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/DispatcherDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/DispatcherDao.java
index 2ac3a91df..1cf0932b0 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/DispatcherDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/DispatcherDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -32,170 +28,158 @@
import com.imageworks.spcue.VirtualProc;
/**
-* DispatcherDao provides DAO methods used by the DispatchService
-*/
+ * DispatcherDao provides DAO methods used by the DispatchService
+ */
public interface DispatcherDao {
- /**
- * Finds the next frame on the specified job that can utilize
- * the free resources on the host.
- *
- * @param host
- * @param job
- * @return
- */
- DispatchFrame findNextDispatchFrame(JobInterface job, DispatchHost host);
-
- /**
- * Returns the next frame based on the supplied job
- *
- * @param job
- * @param proc
- * @return DispatchFrame
- */
- DispatchFrame findNextDispatchFrame(JobInterface job, VirtualProc proc);
-
- /**
- * Finds the next frame on the specified job that can utilize
- * the free resources on the host.
- *
- * @param host
- * @param job
- * @return
- */
- List findNextDispatchFrames(JobInterface job, DispatchHost host, int limit);
-
- /**
- * Returns the next frame based on the supplied job
- *
- * @param job
- * @param proc
- * @return DispatchFrame
- */
- List findNextDispatchFrames(JobInterface job, VirtualProc proc, int limit);
-
- /**
- * Return a list of jobs which could use resources of the specified
- * host. It does not consider show priority.
- *
- * @param host
- * @param numJobs
- * @return
- */
- Set findDispatchJobsForAllShows(DispatchHost host, int numJobs);
-
- /**
- * Return a list of jobs which could use resources of the specified
- * host
- *
- * @param host
- * @param numJobs
- * @return
- */
- Set findDispatchJobs(DispatchHost host, int numJobs);
-
- /**
- * Return a list of jobs which could use resources of the specified
- * host that are in the specified group.
- *
- * @param host
- * @param numJobs
- * @return
- */
- Set findDispatchJobs(DispatchHost host, GroupInterface g);
-
- /**
- * Finds an under proced job if one exists and returns it,
- * otherwise it returns null.
- *
- * @param excludeJob
- * @param proc
- * @return
- */
- boolean findUnderProcedJob(JobInterface excludeJob, VirtualProc proc);
-
- /**
- * Returns true if there exists a higher priority job than the base job
- *
- * @param baseJob
- * @param proc
- * @return boolean
- */
- boolean higherPriorityJobExists(JobDetail baseJob, VirtualProc proc);
-
- /**
- * Dispatch the given host to the specified show. Look for a max of numJobs.
- *
- * @param host
- * @param show
- * @param numJobs
- * @return
- */
- Set findDispatchJobs(DispatchHost host, ShowInterface show, int numJobs);
-
- /**
- * Find a list of local dispatch jobs.
- *
- * @param host
- * @return
- */
- Set findLocalDispatchJobs(DispatchHost host);
-
- /**
- * Return a list of frames from the given layer.
- *
- * @param layer
- * @param proc
- * @param limit
- * @return
- */
- List findNextDispatchFrames(LayerInterface layer, VirtualProc proc,
- int limit);
-
- /**
- * Return a list of frames from the given layer.
- *
- * @param layer
- * @param host
- * @param limit
- * @return
- */
- List findNextDispatchFrames(LayerInterface layer, DispatchHost host,
- int limit);
-
- /**
- * Return Scheduling Mode selected
- *
- * @return
- */
- SchedulingMode getSchedulingMode();
-
- /**
- * Set Scheduling Mode.
- *
- * @param schedulingMode
- */
- void setSchedulingMode(SchedulingMode schedulingMode);
-
- /**
- * - PRIORITY_ONLY: Sort by priority only
- * - FIFO: Whether or not to enable FIFO scheduling in the same priority.
- * - BALANCED: Use a rank formula that takes into account time waiting, and number
- * of cores required: rank = priority + (100 * (1 - (job.cores/job.int_min_cores))) + age in days
- */
- enum SchedulingMode {
- PRIORITY_ONLY,
- FIFO,
- BALANCED
- }
-
- /**
- * Clear bookableShows cache
- *
- * @return
- */
- void clearCache();
+ /**
+ * Finds the next frame on the specified job that can utilize the free resources on the host.
+ *
+ * @param host
+ * @param job
+ * @return
+ */
+ DispatchFrame findNextDispatchFrame(JobInterface job, DispatchHost host);
+
+ /**
+ * Returns the next frame based on the supplied job
+ *
+ * @param job
+ * @param proc
+ * @return DispatchFrame
+ */
+ DispatchFrame findNextDispatchFrame(JobInterface job, VirtualProc proc);
+
+ /**
+ * Finds the next frame on the specified job that can utilize the free resources on the host.
+ *
+ * @param host
+ * @param job
+ * @return
+ */
+ List findNextDispatchFrames(JobInterface job, DispatchHost host, int limit);
+
+ /**
+ * Returns the next frame based on the supplied job
+ *
+ * @param job
+ * @param proc
+ * @return DispatchFrame
+ */
+ List findNextDispatchFrames(JobInterface job, VirtualProc proc, int limit);
+
+ /**
+ * Return a list of jobs which could use resources of the specified host. It does not consider
+ * show priority.
+ *
+ * @param host
+ * @param numJobs
+ * @return
+ */
+ Set findDispatchJobsForAllShows(DispatchHost host, int numJobs);
+
+ /**
+ * Return a list of jobs which could use resources of the specified host
+ *
+ * @param host
+ * @param numJobs
+ * @return
+ */
+ Set findDispatchJobs(DispatchHost host, int numJobs);
+
+ /**
+ * Return a list of jobs which could use resources of the specified host that are in the specified
+ * group.
+ *
+ * @param host
+ * @param numJobs
+ * @return
+ */
+ Set findDispatchJobs(DispatchHost host, GroupInterface g);
+
+ /**
+ * Finds an under proced job if one exists and returns it, otherwise it returns null.
+ *
+ * @param excludeJob
+ * @param proc
+ * @return
+ */
+ boolean findUnderProcedJob(JobInterface excludeJob, VirtualProc proc);
+
+ /**
+ * Returns true if there exists a higher priority job than the base job
+ *
+ * @param baseJob
+ * @param proc
+ * @return boolean
+ */
+ boolean higherPriorityJobExists(JobDetail baseJob, VirtualProc proc);
+
+ /**
+ * Dispatch the given host to the specified show. Look for a max of numJobs.
+ *
+ * @param host
+ * @param show
+ * @param numJobs
+ * @return
+ */
+ Set findDispatchJobs(DispatchHost host, ShowInterface show, int numJobs);
+
+ /**
+ * Find a list of local dispatch jobs.
+ *
+ * @param host
+ * @return
+ */
+ Set findLocalDispatchJobs(DispatchHost host);
+
+ /**
+ * Return a list of frames from the given layer.
+ *
+ * @param layer
+ * @param proc
+ * @param limit
+ * @return
+ */
+ List findNextDispatchFrames(LayerInterface layer, VirtualProc proc, int limit);
+
+ /**
+ * Return a list of frames from the given layer.
+ *
+ * @param layer
+ * @param host
+ * @param limit
+ * @return
+ */
+ List findNextDispatchFrames(LayerInterface layer, DispatchHost host, int limit);
+
+ /**
+ * Return Scheduling Mode selected
+ *
+ * @return
+ */
+ SchedulingMode getSchedulingMode();
+
+ /**
+ * Set Scheduling Mode.
+ *
+ * @param schedulingMode
+ */
+ void setSchedulingMode(SchedulingMode schedulingMode);
+
+ /**
+ * - PRIORITY_ONLY: Sort by priority only - FIFO: Whether or not to enable FIFO scheduling in the
+ * same priority. - BALANCED: Use a rank formula that takes into account time waiting, and number
+ * of cores required: rank = priority + (100 * (1 - (job.cores/job.int_min_cores))) + age in days
+ */
+ enum SchedulingMode {
+ PRIORITY_ONLY, FIFO, BALANCED
+ }
+
+ /**
+ * Clear bookableShows cache
+ *
+ * @return
+ */
+ void clearCache();
}
-
-
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/FacilityDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/FacilityDao.java
index 90c65859c..0d269f672 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/FacilityDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/FacilityDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.FacilityEntity;
@@ -24,52 +20,51 @@
public interface FacilityDao {
- /**
- * Returns the default facility
- *
- * @return
- */
- public FacilityInterface getDefaultFacility();
+ /**
+ * Returns the default facility
+ *
+ * @return
+ */
+ public FacilityInterface getDefaultFacility();
- /**
- * Gets a facility by Id
- *
- * @param id
- * @return
- */
- public FacilityInterface getFacility(String id);
+ /**
+ * Gets a facility by Id
+ *
+ * @param id
+ * @return
+ */
+ public FacilityInterface getFacility(String id);
- /**
- * Returns true if a facility exists
- *
- * @param name
- * @return
- */
- public boolean facilityExists(String name);
+ /**
+ * Returns true if a facility exists
+ *
+ * @param name
+ * @return
+ */
+ public boolean facilityExists(String name);
- /**
- * Insert and return a facility.
- *
- * @param name
- * @return
- */
- public FacilityInterface insertFacility(FacilityEntity facility);
+ /**
+ * Insert and return a facility.
+ *
+ * @param name
+ * @return
+ */
+ public FacilityInterface insertFacility(FacilityEntity facility);
- /**
- * Deletes a facility record, if possible.
- *
- * @param facility
- * @return
- */
- public int deleteFacility(FacilityInterface facility);
+ /**
+ * Deletes a facility record, if possible.
+ *
+ * @param facility
+ * @return
+ */
+ public int deleteFacility(FacilityInterface facility);
- /**
- * Rename the specified facility.
- *
- * @param facility
- * @param name
- * @return
- */
- int updateFacilityName(FacilityInterface facility, String name);
+ /**
+ * Rename the specified facility.
+ *
+ * @param facility
+ * @param name
+ * @return
+ */
+ int updateFacilityName(FacilityInterface facility, String name);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/FilterDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/FilterDao.java
index 61b65ff75..8de1c83fe 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/FilterDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/FilterDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -33,27 +29,32 @@
*/
public interface FilterDao {
- List getActiveFilters(ShowInterface show);
- List getFilters(ShowInterface show);
+ List getActiveFilters(ShowInterface show);
- void updateSetFilterEnabled(FilterInterface f, boolean enabled);
- void updateSetFilterName(FilterInterface f, String name);
- void updateSetFilterType(FilterInterface f, FilterType type);
+ List getFilters(ShowInterface show);
- void updateSetFilterOrder(FilterInterface f, double order);
+ void updateSetFilterEnabled(FilterInterface f, boolean enabled);
- void deleteFilter(FilterInterface f);
- void insertFilter(FilterEntity f);
+ void updateSetFilterName(FilterInterface f, String name);
- void reorderFilters(ShowInterface s);
+ void updateSetFilterType(FilterInterface f, FilterType type);
- void lowerFilterOrder(FilterInterface f, int by);
- void raiseFilterOrder(FilterInterface f, int by);
+ void updateSetFilterOrder(FilterInterface f, double order);
- FilterEntity getFilter(String id);
- FilterEntity getFilter(FilterInterface filter);
- FilterEntity findFilter(ShowInterface show, String name);
+ void deleteFilter(FilterInterface f);
+ void insertFilter(FilterEntity f);
-}
+ void reorderFilters(ShowInterface s);
+
+ void lowerFilterOrder(FilterInterface f, int by);
+
+ void raiseFilterOrder(FilterInterface f, int by);
+ FilterEntity getFilter(String id);
+
+ FilterEntity getFilter(FilterInterface filter);
+
+ FilterEntity findFilter(ShowInterface show, String name);
+
+}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/FrameDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/FrameDao.java
index 64a52e144..20ce02fbf 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/FrameDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/FrameDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -39,375 +35,357 @@
public interface FrameDao {
- /**
- * finds the frame in the job that used the lowest
- * amount of memory
- *
- * @param job
- * @return
- */
- public FrameDetail findLowestMemoryFrame(JobInterface job);
-
- /**
- * finds the frame in the job that used the highest
- * amount of memory,
- *
- * @param job
- * @return
- */
- public FrameDetail findHighestMemoryFrame(JobInterface job);
-
- /**
- * Returns the data for the shortest succeeded frame.
- *
- * @param job
- * @return
- */
- public FrameDetail findShortestFrame(JobInterface job);
-
- /**
- * Returns the data for the longest succeeded frame.
- *
- * @param job
- * @return
- */
- public FrameDetail findLongestFrame(JobInterface job);
-
- /**
- * Checks to see how many retries a frame has. If that number
- * is greater than or equal to the jobs max retries, the frame
- * is marked as dead.
- *
- * @param frame
- */
- void checkRetries(FrameInterface frame);
-
- /**
- * Batch inserts a frameSet of frames.
- *
- * @param frame
- */
- void insertFrames(LayerDetail layer, List frames);
-
- /**
- * Retrieve a FrameDetail from something that implements Frame
- *
- * @param frame
- * @return FrameDetail
- */
- FrameDetail getFrameDetail(FrameInterface frame);
-
- /**
- * Retrieve a FrameDetail from its unique ID.
- *
- * @param id
- * @return FrameDetail
- */
- FrameDetail getFrameDetail(String id);
-
- /**
- *
- * @param job
- * @param name
- * @return
- */
- FrameDetail findFrameDetail(JobInterface job, String name);
-
- /**
- * Returns a minimal Frame from its ID
- *
- * @param id
- * @return Frame
- */
- FrameInterface getFrame(String id);
-
- /**
- * Finds a minimal frame from its job and frame name
- *
- * @param job
- * @param name
- * @return Frame
- */
- FrameInterface findFrame(JobInterface job, String name);
-
- /**
- * Finds a minimal frame from its layer and number.
- *
- * @param job
- * @param name
- * @return Frame
- */
- FrameInterface findFrame(LayerInterface layer, int number);
-
- /**
- * Find a list of minimal frames from a job and FrameLookupRequest.
- *
- * @param job
- * @param r
- * @return List
- */
- List findFrames(FrameSearchInterface r);
-
- /**
- * Find a list of FrameDetail objects from a job and FrameLookupRequest.
- *
- * @param job
- * @param r
- * @return List
- */
- List findFrameDetails(FrameSearchInterface r);
-
- /**
- * Updates the specified frame's state.
- *
- * @param frame
- * @param state
- */
- boolean updateFrameState(FrameInterface frame, FrameState state);
-
- /**
- * Updates a frame to indicate its now running.
- *
- * @param proc
- * @param frame
- * @return
- */
- void updateFrameStarted(VirtualProc proc, FrameInterface frame);
-
- /**
- * Updates a frame to the stopped state. The frame MUST be
- * in the Running state to be stopped.
- *
- * @param proc
- * @param frame
- * @param report
- */
- boolean updateFrameStopped(FrameInterface frame, FrameState state, int exitStatus);
-
- /**
- * Updates a frame to the stopped state. The frame MUST be
- * in the Running state to be stopped.
- *
- * @param frame
- * @param state
- * @param exitStatus
- * @param maxRss
- * @return
- */
- boolean updateFrameStopped(FrameInterface frame, FrameState state, int exitStatus,
- long maxRss);
-
- /**
- * Sets a frame to an unreserved waiting state.
- *
- * @param frame
- * @return
- */
- boolean updateFrameCleared(FrameInterface frame);
- /**
- * Sets a frame exitStatus to EXIT_STATUS_MEMORY_FAILURE
- *
- * @param frame
- * @return whether the frame has been updated
- */
- boolean updateFrameMemoryError(FrameInterface frame);
-
- /**
- * Sets a frame to an unreserved waiting state.
- *
- * @param frame
- * @return
- */
- boolean updateFrameHostDown(FrameInterface frame);
-
- /**
- * Returns a DispatchFrame object from the frame's uinique ID.
- *
- * @param uuid
- * @return DispatchFrame
- */
- DispatchFrame getDispatchFrame(String uuid);
-
- /**
- * Set the specified frame to the Waiting state and its
- * depend count to 0.
- *
- * @param frame
- */
- void markFrameAsWaiting(FrameInterface frame);
-
- /**
- * If the specified frame has active dependencies, reset
- * the dependency count and set the frame state to Depend
- *
- * @param frame
- */
- void markFrameAsDepend(FrameInterface frame);
-
- /**
- * Reverses the specified frame range. The revese layer implementation is
- * is more intensive than other reorder operations because we look up
- * the dispatch order for each frame and then switch them.
- *
- * @param layer
- * @param frameSet
- */
- public void reorderLayerReverse(LayerInterface layer, FrameSet frameSet);
-
- /**
- *
- * Reorders specified frames to the end of the dispatch order.
- * This works by finding the frame with the highest dispatch
- * value, and updating the specified frames with higher values.
- * The rest of the frames in the layer are not touched.
- *
- * @param layer
- * @param frameSet
- */
- public void reorderFramesLast(LayerInterface layer, FrameSet frameSet);
-
- /**
- * Reorders specified frames to the top of the dispatch order.
- * This works by finding the frame with the lowest dispatch
- * order and updating targeted frames with even lower dispatcher orders,
- * negative numbers are allowed.
- *
- * @param layer
- * @param frameSet
- */
- public void reorderFramesFirst(LayerInterface layer, FrameSet frameSet);
-
- /**
- * This would reorder frames so that it would render the specified
- * sequence on a staggered frame range. The frame set must be
- * a staggered range.
- *
- * @param layer
- * @param frameSet
- */
- public void staggerLayer(LayerInterface layer, String range, int stagger);
-
- /**
- * Returns a list of Running frames that have not had a proc
- * assigned to them in over 5 min. This can happen when an
- * operation aborts due to a deadlock.
- *
- * @return
- */
- List getOrphanedFrames();
-
- /**
- * Return a list of all frames that have positive dependency
- * counts for the specified dependency.
- *
- * @param depend
- * @return
- */
- List getDependentFrames(LightweightDependency depend);
-
- /**
- * Returns true if the frame is succeeded.
- *
- * @param f
- * @return
- */
- public boolean isFrameComplete(FrameInterface f);
-
- /**
- * Attempts to fix the case where a proc is assigned to a frame
- * but the frame is in the waiting state.
- *
- * @param proc
- * @param frame
- * @return
- */
- boolean updateFrameFixed(VirtualProc proc, FrameInterface frame);
-
- /**
- * Return a ResourceUsage object which repesents the amount
- * of clock and core time the frame has used up until this point.
- *
- * @param f
- * @return
- */
- ResourceUsage getResourceUsage(FrameInterface f);
-
- /**
- * Update memory usage values and LLU time for the given frame. The
- * frame must be in the Running state. If the frame
- * is locked by another thread, the process is aborted because
- * we'll most likely get a new update one minute later.
- *
- * @param f
- * @param maxRss
- * @param rss
- * @param lluTime
- * @throws FrameReservationException if the frame is locked
- * by another thread.
- */
- void updateFrameMemoryUsageAndLluTime(FrameInterface f, long maxRss, long rss, long lluTime);
-
- /**
- * Attempt to put a exclusive row lock on the given
- * frame. The frame must be in the specified state.
- *
- * @param frame
- * @param state
- * @throws FrameReservationException if the frame changes state before
- * the lock can be applied.
- */
- void lockFrameForUpdate(FrameInterface frame, FrameState state);
-
- /**
- * Return true if the specified frame is an orphan.
- *
- * @param frame
- * @return
- */
- boolean isOrphan(FrameInterface frame);
-
- /**
- * Update a frame's checkpoint state status.
- *
- * @param frame
- * @param state
- * @return
- */
- boolean updateFrameCheckpointState(FrameInterface frame, CheckpointState state);
-
- /**
- * Return a list of checkpoints that have failed to report back in
- * within a certain cutoff time.
- *
- * @param cutoffTime
- * @return
- */
- List getStaleCheckpoints(int cutoffTimeMs);
-
- /**
- * Create a frame state display override.
- *
- * @param frameId String
- * @param override FrameStateDisplayOverride
- */
- void setFrameStateDisplayOverride(String frameId,
- FrameStateDisplayOverride override);
-
- /**
- * Get the frame overrides for a specific frame
- *
- * @param frameId
- * @return List
- */
- FrameStateDisplayOverrideSeq getFrameStateDisplayOverrides(String frameId);
-
- /**
- * Update a frame override with new text/color
- *
- * @param frameId
- * @param override FrameStateDisplayOverride
- */
- void updateFrameStateDisplayOverride(String frameId,
- FrameStateDisplayOverride override);
+ /**
+ * finds the frame in the job that used the lowest amount of memory
+ *
+ * @param job
+ * @return
+ */
+ public FrameDetail findLowestMemoryFrame(JobInterface job);
+
+ /**
+ * finds the frame in the job that used the highest amount of memory,
+ *
+ * @param job
+ * @return
+ */
+ public FrameDetail findHighestMemoryFrame(JobInterface job);
+
+ /**
+ * Returns the data for the shortest succeeded frame.
+ *
+ * @param job
+ * @return
+ */
+ public FrameDetail findShortestFrame(JobInterface job);
+
+ /**
+ * Returns the data for the longest succeeded frame.
+ *
+ * @param job
+ * @return
+ */
+ public FrameDetail findLongestFrame(JobInterface job);
+
+ /**
+ * Checks to see how many retries a frame has. If that number is greater than or equal to the jobs
+ * max retries, the frame is marked as dead.
+ *
+ * @param frame
+ */
+ void checkRetries(FrameInterface frame);
+
+ /**
+ * Batch inserts a frameSet of frames.
+ *
+ * @param frame
+ */
+ void insertFrames(LayerDetail layer, List frames);
+
+ /**
+ * Retrieve a FrameDetail from something that implements Frame
+ *
+ * @param frame
+ * @return FrameDetail
+ */
+ FrameDetail getFrameDetail(FrameInterface frame);
+
+ /**
+ * Retrieve a FrameDetail from its unique ID.
+ *
+ * @param id
+ * @return FrameDetail
+ */
+ FrameDetail getFrameDetail(String id);
+
+ /**
+ *
+ * @param job
+ * @param name
+ * @return
+ */
+ FrameDetail findFrameDetail(JobInterface job, String name);
+
+ /**
+ * Returns a minimal Frame from its ID
+ *
+ * @param id
+ * @return Frame
+ */
+ FrameInterface getFrame(String id);
+
+ /**
+ * Finds a minimal frame from its job and frame name
+ *
+ * @param job
+ * @param name
+ * @return Frame
+ */
+ FrameInterface findFrame(JobInterface job, String name);
+
+ /**
+ * Finds a minimal frame from its layer and number.
+ *
+ * @param job
+ * @param name
+ * @return Frame
+ */
+ FrameInterface findFrame(LayerInterface layer, int number);
+
+ /**
+ * Find a list of minimal frames from a job and FrameLookupRequest.
+ *
+ * @param job
+ * @param r
+ * @return List
+ */
+ List findFrames(FrameSearchInterface r);
+
+ /**
+ * Find a list of FrameDetail objects from a job and FrameLookupRequest.
+ *
+ * @param job
+ * @param r
+ * @return List
+ */
+ List findFrameDetails(FrameSearchInterface r);
+
+ /**
+ * Updates the specified frame's state.
+ *
+ * @param frame
+ * @param state
+ */
+ boolean updateFrameState(FrameInterface frame, FrameState state);
+
+ /**
+ * Updates a frame to indicate its now running.
+ *
+ * @param proc
+ * @param frame
+ * @return
+ */
+ void updateFrameStarted(VirtualProc proc, FrameInterface frame);
+
+ /**
+ * Updates a frame to the stopped state. The frame MUST be in the Running state to be stopped.
+ *
+ * @param proc
+ * @param frame
+ * @param report
+ */
+ boolean updateFrameStopped(FrameInterface frame, FrameState state, int exitStatus);
+
+ /**
+ * Updates a frame to the stopped state. The frame MUST be in the Running state to be stopped.
+ *
+ * @param frame
+ * @param state
+ * @param exitStatus
+ * @param maxRss
+ * @return
+ */
+ boolean updateFrameStopped(FrameInterface frame, FrameState state, int exitStatus, long maxRss);
+
+ /**
+ * Sets a frame to an unreserved waiting state.
+ *
+ * @param frame
+ * @return
+ */
+ boolean updateFrameCleared(FrameInterface frame);
+
+ /**
+ * Sets a frame exitStatus to EXIT_STATUS_MEMORY_FAILURE
+ *
+ * @param frame
+ * @return whether the frame has been updated
+ */
+ boolean updateFrameMemoryError(FrameInterface frame);
+
+ /**
+ * Sets a frame to an unreserved waiting state.
+ *
+ * @param frame
+ * @return
+ */
+ boolean updateFrameHostDown(FrameInterface frame);
+
+ /**
+ * Returns a DispatchFrame object from the frame's uinique ID.
+ *
+ * @param uuid
+ * @return DispatchFrame
+ */
+ DispatchFrame getDispatchFrame(String uuid);
+
+ /**
+ * Set the specified frame to the Waiting state and its depend count to 0.
+ *
+ * @param frame
+ */
+ void markFrameAsWaiting(FrameInterface frame);
+
+ /**
+ * If the specified frame has active dependencies, reset the dependency count and set the frame
+ * state to Depend
+ *
+ * @param frame
+ */
+ void markFrameAsDepend(FrameInterface frame);
+
+ /**
+ * Reverses the specified frame range. The revese layer implementation is is more intensive than
+ * other reorder operations because we look up the dispatch order for each frame and then switch
+ * them.
+ *
+ * @param layer
+ * @param frameSet
+ */
+ public void reorderLayerReverse(LayerInterface layer, FrameSet frameSet);
+
+ /**
+ *
+ * Reorders specified frames to the end of the dispatch order. This works by finding the frame
+ * with the highest dispatch value, and updating the specified frames with higher values. The rest
+ * of the frames in the layer are not touched.
+ *
+ * @param layer
+ * @param frameSet
+ */
+ public void reorderFramesLast(LayerInterface layer, FrameSet frameSet);
+
+ /**
+ * Reorders specified frames to the top of the dispatch order. This works by finding the frame
+ * with the lowest dispatch order and updating targeted frames with even lower dispatcher orders,
+ * negative numbers are allowed.
+ *
+ * @param layer
+ * @param frameSet
+ */
+ public void reorderFramesFirst(LayerInterface layer, FrameSet frameSet);
+
+ /**
+ * This would reorder frames so that it would render the specified sequence on a staggered frame
+ * range. The frame set must be a staggered range.
+ *
+ * @param layer
+ * @param frameSet
+ */
+ public void staggerLayer(LayerInterface layer, String range, int stagger);
+
+ /**
+ * Returns a list of Running frames that have not had a proc assigned to them in over 5 min. This
+ * can happen when an operation aborts due to a deadlock.
+ *
+ * @return
+ */
+ List getOrphanedFrames();
+
+ /**
+ * Return a list of all frames that have positive dependency counts for the specified dependency.
+ *
+ * @param depend
+ * @return
+ */
+ List getDependentFrames(LightweightDependency depend);
+
+ /**
+ * Returns true if the frame is succeeded.
+ *
+ * @param f
+ * @return
+ */
+ public boolean isFrameComplete(FrameInterface f);
+
+ /**
+ * Attempts to fix the case where a proc is assigned to a frame but the frame is in the waiting
+ * state.
+ *
+ * @param proc
+ * @param frame
+ * @return
+ */
+ boolean updateFrameFixed(VirtualProc proc, FrameInterface frame);
+
+ /**
+ * Return a ResourceUsage object which repesents the amount of clock and core time the frame has
+ * used up until this point.
+ *
+ * @param f
+ * @return
+ */
+ ResourceUsage getResourceUsage(FrameInterface f);
+
+ /**
+ * Update memory usage values and LLU time for the given frame. The frame must be in the Running
+ * state. If the frame is locked by another thread, the process is aborted because we'll most
+ * likely get a new update one minute later.
+ *
+ * @param f
+ * @param maxRss
+ * @param rss
+ * @param lluTime
+ * @throws FrameReservationException if the frame is locked by another thread.
+ */
+ void updateFrameMemoryUsageAndLluTime(FrameInterface f, long maxRss, long rss, long lluTime);
+
+ /**
+ * Attempt to put a exclusive row lock on the given frame. The frame must be in the specified
+ * state.
+ *
+ * @param frame
+ * @param state
+ * @throws FrameReservationException if the frame changes state before the lock can be applied.
+ */
+ void lockFrameForUpdate(FrameInterface frame, FrameState state);
+
+ /**
+ * Return true if the specified frame is an orphan.
+ *
+ * @param frame
+ * @return
+ */
+ boolean isOrphan(FrameInterface frame);
+
+ /**
+ * Update a frame's checkpoint state status.
+ *
+ * @param frame
+ * @param state
+ * @return
+ */
+ boolean updateFrameCheckpointState(FrameInterface frame, CheckpointState state);
+
+ /**
+ * Return a list of checkpoints that have failed to report back in within a certain cutoff time.
+ *
+ * @param cutoffTime
+ * @return
+ */
+ List getStaleCheckpoints(int cutoffTimeMs);
+
+ /**
+ * Create a frame state display override.
+ *
+ * @param frameId String
+ * @param override FrameStateDisplayOverride
+ */
+ void setFrameStateDisplayOverride(String frameId, FrameStateDisplayOverride override);
+
+ /**
+ * Get the frame overrides for a specific frame
+ *
+ * @param frameId
+ * @return List
+ */
+ FrameStateDisplayOverrideSeq getFrameStateDisplayOverrides(String frameId);
+
+ /**
+ * Update a frame override with new text/color
+ *
+ * @param frameId
+ * @param override FrameStateDisplayOverride
+ */
+ void updateFrameStateDisplayOverride(String frameId, FrameStateDisplayOverride override);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/GroupDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/GroupDao.java
index 87cd950d0..cedae2516 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/GroupDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/GroupDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -34,205 +30,205 @@
*/
public interface GroupDao {
- /**
- * returns the group from its unique id
- *
- * @param id
- * @return
- */
- GroupInterface getGroup(String id);
-
- /**
- * returns a list of groups using their unique ids
- * @param id
- * @return
- */
- List getGroups(List id);
-
- /**
- *
- * @param show
- * @return
- */
- GroupDetail getRootGroupDetail(ShowInterface show);
-
- /**
- * Returns the show's root group.
- *
- * @param show
- * @return
- */
- String getRootGroupId(ShowInterface show);
-
- /**
- * Insert group into specified parent
- *
- * @param group
- */
- void insertGroup(GroupDetail group, GroupInterface parent);
-
- /**
- *
- * @param group
- */
- void insertGroup(GroupDetail group);
-
- /**
- * Updates the groups department.
- *
- * @param group
- * @param dept
- */
- void updateDepartment(GroupInterface group, DepartmentInterface dept);
-
- /**
- * Removes the specified group. You cannot delete a group that contains
- * jobs or other groups or the shows root folder.
- *
- * @param group
- */
- void deleteGroup(GroupInterface group);
-
- /**
- * Sets the group's new parent. Triggers will handle any recursive level
- * changes.
- *
- * @param group
- * @param parent
- *
- * @throws EntityModificationError throws this if the group is the top level group
- * which cannot be parented to another group.
- */
- void updateGroupParent(GroupInterface group, GroupInterface parent);
-
- /**
- * Sets the maximum number of procs the group should be running.
- *
- * @param group
- * @param value
- */
- void updateDefaultJobMaxCores(GroupInterface group, int value);
-
- /**
- * Sets the minimum number of procs the group should be running.
- *
- * @param group
- * @param value
- */
- void updateDefaultJobMinCores(GroupInterface group, int value);
-
- /**
- * Sets the maximum number of cores for this group
- *
- * @param group
- * @param value
- */
- public void updateMaxCores(GroupInterface group, int value);
-
- /**
- * Set the minimum number of cores for this group
- *
- * @param group
- * @param value
- */
-
- public void updateMinCores(GroupInterface group, int value);
-
- /**
- * Sets the maximum number of gpus the group should be running.
- *
- * @param group
- * @param value
- */
- void updateDefaultJobMaxGpus(GroupInterface group, int value);
-
- /**
- * Sets the minimum number of gpus the group should be running.
- *
- * @param group
- * @param value
- */
- void updateDefaultJobMinGpus(GroupInterface group, int value);
-
- /**
- * Sets the maximum number of gpus for this group
- *
- * @param group
- * @param value
- */
- public void updateMaxGpus(GroupInterface group, int value);
-
- /**
- * Set the minimum number of gpus for this group
- *
- * @param group
- * @param value
- */
-
- public void updateMinGpus(GroupInterface group, int value);
-
- /**
- * Renames the group
- *
- * @param group
- * @param value
- */
- void updateName(GroupInterface group, String value);
-
- /**
- * Updates a group's priority.
- *
- * @param group
- * @param value
- */
- void updateDefaultJobPriority(GroupInterface group, int value);
-
- /**
- * Returns a full GroupDetail object from its unique id
- *
- * @param id
- * @return
- */
- GroupDetail getGroupDetail(String id);
-
- /**
- * Returns a recursive list of a group's children
- *
- * @param group
- * @return
- */
- List getChildrenRecursive(GroupInterface group);
-
- /**
- *
- * Returns a list of a groups immediate children
- *
- * @param group
- * @return
- */
- List getChildren(GroupInterface group);
-
- /**
- * Returns true if the group of the specified job is at or over its min proc
- *
- * @param job
- * @return
- */
- boolean isOverMinCores(JobInterface job);
-
- /**
- * Returns true if the group is managed.
- *
- * @param group
- * @return
- */
- boolean isManaged(GroupInterface group);
-
- /**
- * Return a GroupDetail for the specified job.
- * @param job
- * @return
- */
- GroupDetail getGroupDetail(JobInterface job);
+ /**
+ * returns the group from its unique id
+ *
+ * @param id
+ * @return
+ */
+ GroupInterface getGroup(String id);
+
+ /**
+ * returns a list of groups using their unique ids
+ *
+ * @param id
+ * @return
+ */
+ List getGroups(List id);
+
+ /**
+ *
+ * @param show
+ * @return
+ */
+ GroupDetail getRootGroupDetail(ShowInterface show);
+
+ /**
+ * Returns the show's root group.
+ *
+ * @param show
+ * @return
+ */
+ String getRootGroupId(ShowInterface show);
+
+ /**
+ * Insert group into specified parent
+ *
+ * @param group
+ */
+ void insertGroup(GroupDetail group, GroupInterface parent);
+
+ /**
+ *
+ * @param group
+ */
+ void insertGroup(GroupDetail group);
+
+ /**
+ * Updates the groups department.
+ *
+ * @param group
+ * @param dept
+ */
+ void updateDepartment(GroupInterface group, DepartmentInterface dept);
+
+ /**
+ * Removes the specified group. You cannot delete a group that contains jobs or other groups or
+ * the shows root folder.
+ *
+ * @param group
+ */
+ void deleteGroup(GroupInterface group);
+
+ /**
+ * Sets the group's new parent. Triggers will handle any recursive level changes.
+ *
+ * @param group
+ * @param parent
+ *
+ * @throws EntityModificationError throws this if the group is the top level group which cannot be
+ * parented to another group.
+ */
+ void updateGroupParent(GroupInterface group, GroupInterface parent);
+
+ /**
+ * Sets the maximum number of procs the group should be running.
+ *
+ * @param group
+ * @param value
+ */
+ void updateDefaultJobMaxCores(GroupInterface group, int value);
+
+ /**
+ * Sets the minimum number of procs the group should be running.
+ *
+ * @param group
+ * @param value
+ */
+ void updateDefaultJobMinCores(GroupInterface group, int value);
+
+ /**
+ * Sets the maximum number of cores for this group
+ *
+ * @param group
+ * @param value
+ */
+ public void updateMaxCores(GroupInterface group, int value);
+
+ /**
+ * Set the minimum number of cores for this group
+ *
+ * @param group
+ * @param value
+ */
+
+ public void updateMinCores(GroupInterface group, int value);
+
+ /**
+ * Sets the maximum number of gpus the group should be running.
+ *
+ * @param group
+ * @param value
+ */
+ void updateDefaultJobMaxGpus(GroupInterface group, int value);
+
+ /**
+ * Sets the minimum number of gpus the group should be running.
+ *
+ * @param group
+ * @param value
+ */
+ void updateDefaultJobMinGpus(GroupInterface group, int value);
+
+ /**
+ * Sets the maximum number of gpus for this group
+ *
+ * @param group
+ * @param value
+ */
+ public void updateMaxGpus(GroupInterface group, int value);
+
+ /**
+ * Set the minimum number of gpus for this group
+ *
+ * @param group
+ * @param value
+ */
+
+ public void updateMinGpus(GroupInterface group, int value);
+
+ /**
+ * Renames the group
+ *
+ * @param group
+ * @param value
+ */
+ void updateName(GroupInterface group, String value);
+
+ /**
+ * Updates a group's priority.
+ *
+ * @param group
+ * @param value
+ */
+ void updateDefaultJobPriority(GroupInterface group, int value);
+
+ /**
+ * Returns a full GroupDetail object from its unique id
+ *
+ * @param id
+ * @return
+ */
+ GroupDetail getGroupDetail(String id);
+
+ /**
+ * Returns a recursive list of a group's children
+ *
+ * @param group
+ * @return
+ */
+ List getChildrenRecursive(GroupInterface group);
+
+ /**
+ *
+ * Returns a list of a groups immediate children
+ *
+ * @param group
+ * @return
+ */
+ List getChildren(GroupInterface group);
+
+ /**
+ * Returns true if the group of the specified job is at or over its min proc
+ *
+ * @param job
+ * @return
+ */
+ boolean isOverMinCores(JobInterface job);
+
+ /**
+ * Returns true if the group is managed.
+ *
+ * @param group
+ * @return
+ */
+ boolean isManaged(GroupInterface group);
+
+ /**
+ * Return a GroupDetail for the specified job.
+ *
+ * @param job
+ * @return
+ */
+ GroupDetail getGroupDetail(JobInterface job);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/HistoricalDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/HistoricalDao.java
index 4cae1c61d..907ca6ab1 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/HistoricalDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/HistoricalDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -25,22 +21,19 @@
public interface HistoricalDao {
- /**
- * Return all jobs that have been finished longer than
- * the specified cut off in hours.
- *
- * @param cutoffHours
- * @return
- */
- List getFinishedJobs(int cutoffHours);
-
-
- /**
- * Transfer a job from the live tables to the historical tables.
- *
- * @param job
- */
- void transferJob(JobInterface job);
+ /**
+ * Return all jobs that have been finished longer than the specified cut off in hours.
+ *
+ * @param cutoffHours
+ * @return
+ */
+ List getFinishedJobs(int cutoffHours);
+
+ /**
+ * Transfer a job from the live tables to the historical tables.
+ *
+ * @param job
+ */
+ void transferJob(JobInterface job);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/HostDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/HostDao.java
index 94ba316b1..9af9bd8ca 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/HostDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/HostDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.sql.Timestamp;
@@ -34,305 +30,293 @@
import com.imageworks.spcue.grpc.report.HostReport;
import com.imageworks.spcue.grpc.report.RenderHost;
-
/**
* HostDao contains all SQL queries pretaining to host records.
*/
public interface HostDao {
- /**
- * Attempt to obtain an exclusive lock on the host. If another thread alrady
- * has the host locked, a ResourceReservationFailureException is thrown.
- *
- * @param host HostInterface
- * @throws ResourceReservationFailureException when an exclusive lock cannot
- * be made.
- */
- void lockForUpdate(HostInterface host);
-
- /**
- * returns true if the specified host id is locked
- *
- * @param host HostInterface
- * @return Boolean
- */
- boolean isHostLocked(HostInterface host);
-
- /**
- * deletes the passed host
- *
- * @param host HostInterface object to delete
- */
- void deleteHost(HostInterface host);
-
- /**
- * deletes the down state hosts
- */
- void deleteDownHosts();
-
- /**
- * updates a host with the passed hardware state
- *
- * @param host HostInterface
- * @param state HardwareState
- */
- void updateHostState(HostInterface host, HardwareState state);
-
- /**
- * updates a host with the passed free temporary directory
- *
- * @param host
- * @param freeTempDir
- */
- void updateHostFreeTempDir(HostInterface host, Long freeTempDir);
-
- /**
- * returns a full host detail
- *
- * @param host HostInterface
- * @return HostDetail
- */
- HostEntity getHostDetail(HostInterface host);
-
- /**
- * returns full host detail
- *
- * @param id String
- * @return HostEntity
- */
- HostEntity getHostDetail(String id);
-
- /**
- * returns full host detail
- *
- * @param name String
- * @return HostEntity
- */
- HostEntity findHostDetail(String name);
-
- /**
- * Return a DispatchHost object from its unique host name
- *
- * @param fqdn String
- * @return DispatchHost
- */
- DispatchHost findDispatchHost(String fqdn);
-
- /**
- * Return a dispatch host object by id
- *
- * @param id String
- * @return DispatchHost
- */
- DispatchHost getDispatchHost(String id);
-
- /**
- * Returns a host object by name
- *
- * @param name String
- * @return HostInterface
- */
- HostInterface findHost(String name);
-
- /**
- * Returns a host object by ID.
- *
- * @param id String
- * @return HostInterface
- */
- HostInterface getHost(String id);
-
- /**
- * Return the host involved with the given LocalJobAssignment.
- *
- * @param l LocalHostAssignment
- * @return HostInterface
- */
- HostInterface getHost(LocalHostAssignment l);
-
- /**
- * Inserts a render host and its supporting procs into an allocation.
- *
- * @param report RenderHost
- * @param a AllocationInterface
- * @param useLongNames boolean
- */
- void insertRenderHost(RenderHost report, AllocationInterface a, boolean useLongNames);
-
- /**
- * Checks to see if a render host exists by name and returns true if it
- * does, false if it doesn't.
- *
- * @param hostname String
- * @return boolean
- */
- boolean hostExists(String hostname);
-
- /**
- * Updates the host's lock state. Open, Locked, NimbyLocked. Records the
- * source of the lock.
- *
- * @param host HostInterface
- * @param state LockState
- * @param source Source
- */
- void updateHostLock(HostInterface host, LockState state, Source source);
-
- /**
- * Sets the reboot when idle boolean to true or false. If true the cue will
- * issue the reboot command to hosts that ping in idle then set the flag
- * back to false.
- *
- * @param host HostInterface
- * @param enabled boolean
- */
- void updateHostRebootWhenIdle(HostInterface host, boolean enabled);
-
- /**
- * Updates a host's allocation
- *
- * @param host HostInterface
- * @param alloc AllocationInterface
- */
- void updateHostSetAllocation(HostInterface host, AllocationInterface alloc);
-
- /**
- *
- * @param id String
- * @param tag String
- * @param type HostTagType
- */
- void tagHost(String id, String tag, HostTagType type);
-
- /**
- *
- * @param host HostInterface
- * @param tag String
- * @param type HostTagType
- */
- void tagHost(HostInterface host, String tag, HostTagType type);
-
- /**
- *
- * @param host HostInterface
- * @param type HostTagType
- */
- void removeTagsByType(HostInterface host, HostTagType type);
-
- /**
- * removes a tag
- *
- * @param host HostInterface
- * @param tag String
- */
- void removeTag(HostInterface host, String tag);
-
- /**
- * renames a tag from oldTag to newTag
- *
- * @param host HostInterface
- * @param oldTag String
- * @param newTag String
- */
- void renameTag(HostInterface host, String oldTag, String newTag);
-
- /**
- * You must run this AFTER you've changed any type of job tags. The reason
- * this is not a trigger or something of that nature is because is an
- * intense process.
- *
- * @param id String
- */
- void recalcuateTags(final String id);
-
- /**
- *
- * @param host HostInterface
- * @param mode ThreadMode
- */
- void updateThreadMode(HostInterface host, ThreadMode mode);
-
- /**
- * Update the specified host's hardware information.
- *
- * @param host HostInterface
- * @param totalMemory long
- * @param freeMemory long
- * @param totalSwap long
- * @param freeSwap long
- * @param totalMcp long
- * @param freeMcp long
- * @param totalGpuMemory long
- * @param freeGpuMemory long
- * @param load int
- * @param os String
- */
- void updateHostStats(HostInterface host,
- long totalMemory, long freeMemory,
- long totalSwap, long freeSwap,
- long totalMcp, long freeMcp,
- long totalGpuMemory, long freeGpuMemory,
- int load, Timestamp bootTime, String os);
-
- /**
- * Return true if the HardwareState is Up, false if it is anything else.
- *
- * @param host HostInterface
- * @return boolean
- */
- boolean isHostUp(HostInterface host);
-
- /**
- * Return the number of whole stranded cores on this host. The must have
- * less than Dispacher.MEM_STRANDED_THRESHHOLD for the cores to be
- * considered stranded.
- *
- * @param h HostInterface
- * @return int
- */
- int getStrandedCoreUnits(HostInterface h);
-
- /**
- * Return the number of whole stranded gpus on this host. The must have
- * less than Dispacher.MEM_STRANDED_THRESHHOLD for the gpus to be
- * considered stranded.
- *
- * @param h HostInterface
- * @return int
- */
- int getStrandedGpus(HostInterface h);
-
- /**
- * Return true if the host is preferring a particular show.
- *
- * @param h HostInterface
- * @return boolean
- */
- boolean isPreferShow(HostInterface h);
-
- /**
- * Return true if the host is a NIMBY host.
- *
- * @param h HostInterface
- * @return boolean
- */
- boolean isNimbyHost(HostInterface h);
-
- /**
- * Update the host's operating system setting.
- *
- * @param host HostInterface
- * @param os String
- */
- void updateHostOs(HostInterface host, String os);
-
- /**
- * Update a host's resource pool using the latest host report.
- *
- * @param host HostInterface
- * @param report HostReport
- */
- void updateHostResources(HostInterface host, HostReport report);
+ /**
+ * Attempt to obtain an exclusive lock on the host. If another thread alrady has the host locked,
+ * a ResourceReservationFailureException is thrown.
+ *
+ * @param host HostInterface
+ * @throws ResourceReservationFailureException when an exclusive lock cannot be made.
+ */
+ void lockForUpdate(HostInterface host);
+
+ /**
+ * returns true if the specified host id is locked
+ *
+ * @param host HostInterface
+ * @return Boolean
+ */
+ boolean isHostLocked(HostInterface host);
+
+ /**
+ * deletes the passed host
+ *
+ * @param host HostInterface object to delete
+ */
+ void deleteHost(HostInterface host);
+
+ /**
+ * deletes the down state hosts
+ */
+ void deleteDownHosts();
+
+ /**
+ * updates a host with the passed hardware state
+ *
+ * @param host HostInterface
+ * @param state HardwareState
+ */
+ void updateHostState(HostInterface host, HardwareState state);
+
+ /**
+ * updates a host with the passed free temporary directory
+ *
+ * @param host
+ * @param freeTempDir
+ */
+ void updateHostFreeTempDir(HostInterface host, Long freeTempDir);
+
+ /**
+ * returns a full host detail
+ *
+ * @param host HostInterface
+ * @return HostDetail
+ */
+ HostEntity getHostDetail(HostInterface host);
+
+ /**
+ * returns full host detail
+ *
+ * @param id String
+ * @return HostEntity
+ */
+ HostEntity getHostDetail(String id);
+
+ /**
+ * returns full host detail
+ *
+ * @param name String
+ * @return HostEntity
+ */
+ HostEntity findHostDetail(String name);
+
+ /**
+ * Return a DispatchHost object from its unique host name
+ *
+ * @param fqdn String
+ * @return DispatchHost
+ */
+ DispatchHost findDispatchHost(String fqdn);
+
+ /**
+ * Return a dispatch host object by id
+ *
+ * @param id String
+ * @return DispatchHost
+ */
+ DispatchHost getDispatchHost(String id);
+
+ /**
+ * Returns a host object by name
+ *
+ * @param name String
+ * @return HostInterface
+ */
+ HostInterface findHost(String name);
+
+ /**
+ * Returns a host object by ID.
+ *
+ * @param id String
+ * @return HostInterface
+ */
+ HostInterface getHost(String id);
+
+ /**
+ * Return the host involved with the given LocalJobAssignment.
+ *
+ * @param l LocalHostAssignment
+ * @return HostInterface
+ */
+ HostInterface getHost(LocalHostAssignment l);
+
+ /**
+ * Inserts a render host and its supporting procs into an allocation.
+ *
+ * @param report RenderHost
+ * @param a AllocationInterface
+ * @param useLongNames boolean
+ */
+ void insertRenderHost(RenderHost report, AllocationInterface a, boolean useLongNames);
+
+ /**
+ * Checks to see if a render host exists by name and returns true if it does, false if it doesn't.
+ *
+ * @param hostname String
+ * @return boolean
+ */
+ boolean hostExists(String hostname);
+
+ /**
+ * Updates the host's lock state. Open, Locked, NimbyLocked. Records the source of the lock.
+ *
+ * @param host HostInterface
+ * @param state LockState
+ * @param source Source
+ */
+ void updateHostLock(HostInterface host, LockState state, Source source);
+
+ /**
+ * Sets the reboot when idle boolean to true or false. If true the cue will issue the reboot
+ * command to hosts that ping in idle then set the flag back to false.
+ *
+ * @param host HostInterface
+ * @param enabled boolean
+ */
+ void updateHostRebootWhenIdle(HostInterface host, boolean enabled);
+
+ /**
+ * Updates a host's allocation
+ *
+ * @param host HostInterface
+ * @param alloc AllocationInterface
+ */
+ void updateHostSetAllocation(HostInterface host, AllocationInterface alloc);
+
+ /**
+ *
+ * @param id String
+ * @param tag String
+ * @param type HostTagType
+ */
+ void tagHost(String id, String tag, HostTagType type);
+
+ /**
+ *
+ * @param host HostInterface
+ * @param tag String
+ * @param type HostTagType
+ */
+ void tagHost(HostInterface host, String tag, HostTagType type);
+
+ /**
+ *
+ * @param host HostInterface
+ * @param type HostTagType
+ */
+ void removeTagsByType(HostInterface host, HostTagType type);
+
+ /**
+ * removes a tag
+ *
+ * @param host HostInterface
+ * @param tag String
+ */
+ void removeTag(HostInterface host, String tag);
+
+ /**
+ * renames a tag from oldTag to newTag
+ *
+ * @param host HostInterface
+ * @param oldTag String
+ * @param newTag String
+ */
+ void renameTag(HostInterface host, String oldTag, String newTag);
+
+ /**
+ * You must run this AFTER you've changed any type of job tags. The reason this is not a trigger
+ * or something of that nature is because is an intense process.
+ *
+ * @param id String
+ */
+ void recalcuateTags(final String id);
+
+ /**
+ *
+ * @param host HostInterface
+ * @param mode ThreadMode
+ */
+ void updateThreadMode(HostInterface host, ThreadMode mode);
+
+ /**
+ * Update the specified host's hardware information.
+ *
+ * @param host HostInterface
+ * @param totalMemory long
+ * @param freeMemory long
+ * @param totalSwap long
+ * @param freeSwap long
+ * @param totalMcp long
+ * @param freeMcp long
+ * @param totalGpuMemory long
+ * @param freeGpuMemory long
+ * @param load int
+ * @param os String
+ */
+ void updateHostStats(HostInterface host, long totalMemory, long freeMemory, long totalSwap,
+ long freeSwap, long totalMcp, long freeMcp, long totalGpuMemory, long freeGpuMemory, int load,
+ Timestamp bootTime, String os);
+
+ /**
+ * Return true if the HardwareState is Up, false if it is anything else.
+ *
+ * @param host HostInterface
+ * @return boolean
+ */
+ boolean isHostUp(HostInterface host);
+
+ /**
+ * Return the number of whole stranded cores on this host. The must have less than
+ * Dispacher.MEM_STRANDED_THRESHHOLD for the cores to be considered stranded.
+ *
+ * @param h HostInterface
+ * @return int
+ */
+ int getStrandedCoreUnits(HostInterface h);
+
+ /**
+ * Return the number of whole stranded gpus on this host. The must have less than
+ * Dispacher.MEM_STRANDED_THRESHHOLD for the gpus to be considered stranded.
+ *
+ * @param h HostInterface
+ * @return int
+ */
+ int getStrandedGpus(HostInterface h);
+
+ /**
+ * Return true if the host is preferring a particular show.
+ *
+ * @param h HostInterface
+ * @return boolean
+ */
+ boolean isPreferShow(HostInterface h);
+
+ /**
+ * Return true if the host is a NIMBY host.
+ *
+ * @param h HostInterface
+ * @return boolean
+ */
+ boolean isNimbyHost(HostInterface h);
+
+ /**
+ * Update the host's operating system setting.
+ *
+ * @param host HostInterface
+ * @param os String
+ */
+ void updateHostOs(HostInterface host, String os);
+
+ /**
+ * Update a host's resource pool using the latest host report.
+ *
+ * @param host HostInterface
+ * @param report HostReport
+ */
+ void updateHostResources(HostInterface host, HostReport report);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/JobDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/JobDao.java
index 6597c4b83..3fbfd2651 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/JobDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/JobDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -41,462 +37,444 @@
public interface JobDao {
- /**
- * Updates all jobs in the speficed group to the
- * max cores value.
- *
- * @param g
- * @param cores
- */
- public void updateMaxCores(GroupInterface g, int cores);
-
- /**
- * Updates all jobs in the specifid group to the
- * min cores value.
- *
- * @param g
- * @param cores
- */
- public void updateMinCores(GroupInterface g, int cores);
-
- /**
- * Updates all jobs in the speficed group to the
- * max gpu value.
- *
- * @param g
- * @param gpu
- */
- public void updateMaxGpus(GroupInterface g, int gpus);
-
- /**
- * Updates all jobs in the specifid group to the
- * min gpu value.
- *
- * @param g
- * @param gpu
- */
- public void updateMinGpus(GroupInterface g, int gpus);
-
- /**
- * Updates all jobs in the specified group to the
- * set priority.
- *
- * @param g
- * @param priority
- */
- public void updatePriority(GroupInterface g, int priority);
-
- /**
- * Updates a jobs parent group to specified group
- *
- * @param job
- * @param group
- */
- void updateParent(JobInterface job, GroupDetail group, Inherit[] inherit);
-
- /**
- * Returns an execution summary for the specified job.
- *
- * @param job
- * @return
- */
- ExecutionSummary getExecutionSummary(JobInterface job);
-
- /**
- * returns a FrameStateTotals object with all of the
- * job's frame state totals.
- *
- * @param job
- * @return
- */
- FrameStateTotals getFrameStateTotals(JobInterface job);
-
- /**
- * Returns a DispatchJob from its unique id
- *
- * @param uuid
- * @return
- */
- DispatchJob getDispatchJob(String uuid);
-
- /**
- * Returns true if the job has no more frames that
- * can possibly be dispatched.
- *
- * @param job
- * @return
- */
- boolean isJobComplete(JobInterface job);
-
- /**
- * Inserts a JobDetail. The job will not be pending until its
- * activated.
- *
- * @param j
- */
- void insertJob(JobDetail j, JobLogUtil jobLogUtil);
-
- /**
- * Finds a Job from its name. This method returns only
- * the current running job.
- *
- * @param name
- * @return
- */
- JobInterface findJob(String name);
-
- /**
- * Finds a JobDetail from its name. This method returns only
- * the current running job.
- *
- * @param name
- * @return
- */
- JobDetail findJobDetail(String name);
-
- /**
- * Gets a JobDetail from its unique ID
- *
- * @param id
- * @return
- */
- JobDetail getJobDetail(String id);
-
- /**
- * Returns a job by its ID
- *
- * @param id
- * @return
- */
- JobInterface getJob(String id);
-
- /**
- * Returns a list of jobs assigned to a specific task.
- *
- * @param idl
- * @return
- */
- List getJobs(TaskEntity t);
-
- /**
- * Finds all the jobs in a show.
- *
- * @param show
- * @return
- */
- List findJobs(ShowInterface show);
-
- /**
- *
- * @param group
- * @return
- */
- List findJobs(GroupInterface group);
-
- /**
- * Returns true if an active job with the specified name exists
- *
- * @param name
- * @return
- */
- boolean exists(String name);
-
- /**
- * Deletes specified job from DB
- *
- * @param job
- */
- void deleteJob(JobInterface job);
-
- /**
- * Activate job in lauching state.
- *
- * @param job
- */
- void activateJob(JobInterface job, JobState jobState);
-
- /**
- * updates the state of a job with new job state
- *
- * @param job
- * @param state
- */
- void updateState(JobInterface job, JobState state);
-
- /**
- * updates a job to the finished state. returns true
- * if the job was updated
- *
- * @param job
- */
- boolean updateJobFinished(JobInterface job);
-
- /**
- * reteurns true if job is over its minimum proc
- *
- * @param job
- * @return boolean
- */
- boolean isOverMinCores(JobInterface job);
-
- /**
- * returns true if a job has pending frames.
- *
- * @param job
- * @return
- */
- boolean hasPendingFrames(JobInterface job);
-
- /**
- * returns true if job is over max procs
- *
- * @param job
- * @return
- */
- boolean isOverMaxCores(JobInterface job);
-
- /**
- * returns true if job is at its max proc
- *
- * @param job
- * @return
- */
- boolean isAtMaxCores(JobInterface job);
-
- /**
- * Return true if adding given core units to the job
- * will set the job over its max core value.
- *
- * @param job
- * @param coreUnits
- * @return
- */
- boolean isOverMaxCores(JobInterface job, int coreUnits);
-
- /**
- * returns true if job is over max gpus
- *
- * @param job
- * @return
- */
- boolean isOverMaxGpus(JobInterface job);
-
- /**
- * returns true if job is at its max gpus
- *
- * @param job
- * @return
- */
- boolean isAtMaxGpus(JobInterface job);
-
- /**
- * Return true if adding given gpus to the job
- * will set the job over its max gpus value.
- *
- * @param job
- * @param gpus
- * @return
- */
- boolean isOverMaxGpus(JobInterface job, int gpus);
-
- /**
- * sets the jobs new priority value
- *
- * @param j
- * @param v
- */
- void updatePriority(JobInterface j, int v);
-
- /**
- * sets the jobs new min proc value
- *
- * @param j
- * @param v
- */
- void updateMinCores(JobInterface j, int v);
-
- /**
- * sets the jobs new max proc value
- *
- * @param j
- * @param v
- */
- void updateMaxCores(JobInterface j, int v);
-
- /**
- * sets the jobs new min gpu value
- *
- * @param j
- * @param v
- */
- void updateMinGpus(JobInterface j, int v);
-
- /**
- * sets the jobs new max gpu value
- *
- * @param j
- * @param v
- */
- void updateMaxGpus(JobInterface j, int v);
-
- /**
- * Update a job's paused state
- *
- * @param j
- * @param b
- */
- void updatePaused(JobInterface j, boolean b);
-
- /**
- * Update a jobs auto-eat state
- *
- * @param j
- * @param b
- */
- void updateAutoEat(JobInterface j, boolean b);
-
- /**
- * Updates the int_max_retries column with the value of
- * max_retries. Checks to make sure max_retries
- * is greater than 0 and less than or equal to
- * MAX_FRAME_RETRIES
- *
- * @param Job
- * @param max_retries
- */
- void updateMaxFrameRetries(JobInterface j, int max_retries);
-
- /**
- * Inserts a map into the job's env table
- *
- *
- * @param job
- * @param env
- */
- void insertEnvironment(JobInterface job, Map env);
-
- /**
- * Update jobs max RSS. Only updates if the passed in value
- * is greater than the current value of int_max_rss
- *
- * @param job
- * @param env
- */
- void updateMaxRSS(JobInterface job, long maxRss);
-
- /**
- * Inserts a key/value pair into the jobs env table
- *
- * @param job
- * @param key
- * @param value
- */
- void insertEnvironment(JobInterface job, String key, String value);
-
- /**
- * Grabs the job environment
- *
- * @param job
- * @return
- */
- Map getEnvironment(JobInterface job);
-
- /**
- * Updates the job's log path in the DB. This doesn't touch the file
- * system.
- *
- * @param job
- * @param path
- */
- public void updateLogPath(JobInterface job, String path);
-
- /**
- *
- * @param name
- * @return
- */
- public JobDetail findLastJob(String name);
-
- /**
- * Returns true of the cue has some pending jobs
- *
- * @return
- */
- public boolean cueHasPendingJobs(FacilityInterface f);
-
- /**
- * Enables/disables autobooking for specified job.
- *
- * @param value
- */
- public void enableAutoBooking(JobInterface job, boolean value);
-
- /**
- * Enables/disables auto unbooking for specified job.
- *
- * @param job
- * @param value
- */
- void enableAutoUnBooking(JobInterface job, boolean value);
-
- /**
- * Maps the post job to the specified job
- *
- * @param job
- */
- void mapPostJob(BuildableJob job);
-
- /**
- * Activates the specified job's post job
- *
- * @param job
- */
- void activatePostJob(JobInterface job);
-
- /**
- * Update all jobs in the specified group to the
- * specified department.
- *
- * @param group
- */
- void updateDepartment(GroupInterface group, DepartmentInterface dept);
-
- /**
- * Update the specified job to the specified department.
- *
- * @param group
- */
- void updateDepartment(JobInterface job, DepartmentInterface dept);
-
- /**
- * Set the job's new parent. The job will automatically
- * inherit all relevant settings from the group.
- *
- * @param job
- * @param dest
- */
- void updateParent(JobInterface job, GroupDetail dest);
-
- /**
- * Update layer usage with processor time usage.
- * This happens when the proc has completed or failed some work.
- *
- * @param proc
- * @param newState
- */
- void updateUsage(JobInterface job, ResourceUsage usage, int exitStatus);
-
- /**
- * Returns true if the job is launching
- *
- * @param j
- * @return
- */
- boolean isLaunching(JobInterface j);
-
- void updateEmail(JobInterface job, String email);
-
- String getEmail(JobInterface job);
+ /**
+ * Updates all jobs in the speficed group to the max cores value.
+ *
+ * @param g
+ * @param cores
+ */
+ public void updateMaxCores(GroupInterface g, int cores);
+
+ /**
+ * Updates all jobs in the specifid group to the min cores value.
+ *
+ * @param g
+ * @param cores
+ */
+ public void updateMinCores(GroupInterface g, int cores);
+
+ /**
+ * Updates all jobs in the speficed group to the max gpu value.
+ *
+ * @param g
+ * @param gpu
+ */
+ public void updateMaxGpus(GroupInterface g, int gpus);
+
+ /**
+ * Updates all jobs in the specifid group to the min gpu value.
+ *
+ * @param g
+ * @param gpu
+ */
+ public void updateMinGpus(GroupInterface g, int gpus);
+
+ /**
+ * Updates all jobs in the specified group to the set priority.
+ *
+ * @param g
+ * @param priority
+ */
+ public void updatePriority(GroupInterface g, int priority);
+
+ /**
+ * Updates a jobs parent group to specified group
+ *
+ * @param job
+ * @param group
+ */
+ void updateParent(JobInterface job, GroupDetail group, Inherit[] inherit);
+
+ /**
+ * Returns an execution summary for the specified job.
+ *
+ * @param job
+ * @return
+ */
+ ExecutionSummary getExecutionSummary(JobInterface job);
+
+ /**
+ * returns a FrameStateTotals object with all of the job's frame state totals.
+ *
+ * @param job
+ * @return
+ */
+ FrameStateTotals getFrameStateTotals(JobInterface job);
+
+ /**
+ * Returns a DispatchJob from its unique id
+ *
+ * @param uuid
+ * @return
+ */
+ DispatchJob getDispatchJob(String uuid);
+
+ /**
+ * Returns true if the job has no more frames that can possibly be dispatched.
+ *
+ * @param job
+ * @return
+ */
+ boolean isJobComplete(JobInterface job);
+
+ /**
+ * Inserts a JobDetail. The job will not be pending until its activated.
+ *
+ * @param j
+ */
+ void insertJob(JobDetail j, JobLogUtil jobLogUtil);
+
+ /**
+ * Finds a Job from its name. This method returns only the current running job.
+ *
+ * @param name
+ * @return
+ */
+ JobInterface findJob(String name);
+
+ /**
+ * Finds a JobDetail from its name. This method returns only the current running job.
+ *
+ * @param name
+ * @return
+ */
+ JobDetail findJobDetail(String name);
+
+ /**
+ * Gets a JobDetail from its unique ID
+ *
+ * @param id
+ * @return
+ */
+ JobDetail getJobDetail(String id);
+
+ /**
+ * Returns a job by its ID
+ *
+ * @param id
+ * @return
+ */
+ JobInterface getJob(String id);
+
+ /**
+ * Returns a list of jobs assigned to a specific task.
+ *
+ * @param idl
+ * @return
+ */
+ List getJobs(TaskEntity t);
+
+ /**
+ * Finds all the jobs in a show.
+ *
+ * @param show
+ * @return
+ */
+ List findJobs(ShowInterface show);
+
+ /**
+ *
+ * @param group
+ * @return
+ */
+ List findJobs(GroupInterface group);
+
+ /**
+ * Returns true if an active job with the specified name exists
+ *
+ * @param name
+ * @return
+ */
+ boolean exists(String name);
+
+ /**
+ * Deletes specified job from DB
+ *
+ * @param job
+ */
+ void deleteJob(JobInterface job);
+
+ /**
+ * Activate job in lauching state.
+ *
+ * @param job
+ */
+ void activateJob(JobInterface job, JobState jobState);
+
+ /**
+ * updates the state of a job with new job state
+ *
+ * @param job
+ * @param state
+ */
+ void updateState(JobInterface job, JobState state);
+
+ /**
+ * updates a job to the finished state. returns true if the job was updated
+ *
+ * @param job
+ */
+ boolean updateJobFinished(JobInterface job);
+
+ /**
+ * reteurns true if job is over its minimum proc
+ *
+ * @param job
+ * @return boolean
+ */
+ boolean isOverMinCores(JobInterface job);
+
+ /**
+ * returns true if a job has pending frames.
+ *
+ * @param job
+ * @return
+ */
+ boolean hasPendingFrames(JobInterface job);
+
+ /**
+ * returns true if job is over max procs
+ *
+ * @param job
+ * @return
+ */
+ boolean isOverMaxCores(JobInterface job);
+
+ /**
+ * returns true if job is at its max proc
+ *
+ * @param job
+ * @return
+ */
+ boolean isAtMaxCores(JobInterface job);
+
+ /**
+ * Return true if adding given core units to the job will set the job over its max core value.
+ *
+ * @param job
+ * @param coreUnits
+ * @return
+ */
+ boolean isOverMaxCores(JobInterface job, int coreUnits);
+
+ /**
+ * returns true if job is over max gpus
+ *
+ * @param job
+ * @return
+ */
+ boolean isOverMaxGpus(JobInterface job);
+
+ /**
+ * returns true if job is at its max gpus
+ *
+ * @param job
+ * @return
+ */
+ boolean isAtMaxGpus(JobInterface job);
+
+ /**
+ * Return true if adding given gpus to the job will set the job over its max gpus value.
+ *
+ * @param job
+ * @param gpus
+ * @return
+ */
+ boolean isOverMaxGpus(JobInterface job, int gpus);
+
+ /**
+ * sets the jobs new priority value
+ *
+ * @param j
+ * @param v
+ */
+ void updatePriority(JobInterface j, int v);
+
+ /**
+ * sets the jobs new min proc value
+ *
+ * @param j
+ * @param v
+ */
+ void updateMinCores(JobInterface j, int v);
+
+ /**
+ * sets the jobs new max proc value
+ *
+ * @param j
+ * @param v
+ */
+ void updateMaxCores(JobInterface j, int v);
+
+ /**
+ * sets the jobs new min gpu value
+ *
+ * @param j
+ * @param v
+ */
+ void updateMinGpus(JobInterface j, int v);
+
+ /**
+ * sets the jobs new max gpu value
+ *
+ * @param j
+ * @param v
+ */
+ void updateMaxGpus(JobInterface j, int v);
+
+ /**
+ * Update a job's paused state
+ *
+ * @param j
+ * @param b
+ */
+ void updatePaused(JobInterface j, boolean b);
+
+ /**
+ * Update a jobs auto-eat state
+ *
+ * @param j
+ * @param b
+ */
+ void updateAutoEat(JobInterface j, boolean b);
+
+ /**
+ * Updates the int_max_retries column with the value of max_retries. Checks to make sure
+ * max_retries is greater than 0 and less than or equal to MAX_FRAME_RETRIES
+ *
+ * @param Job
+ * @param max_retries
+ */
+ void updateMaxFrameRetries(JobInterface j, int max_retries);
+
+ /**
+ * Inserts a map into the job's env table
+ *
+ *
+ * @param job
+ * @param env
+ */
+ void insertEnvironment(JobInterface job, Map env);
+
+ /**
+ * Update jobs max RSS. Only updates if the passed in value is greater than the current value of
+ * int_max_rss
+ *
+ * @param job
+ * @param env
+ */
+ void updateMaxRSS(JobInterface job, long maxRss);
+
+ /**
+ * Inserts a key/value pair into the jobs env table
+ *
+ * @param job
+ * @param key
+ * @param value
+ */
+ void insertEnvironment(JobInterface job, String key, String value);
+
+ /**
+ * Grabs the job environment
+ *
+ * @param job
+ * @return
+ */
+ Map getEnvironment(JobInterface job);
+
+ /**
+ * Updates the job's log path in the DB. This doesn't touch the file system.
+ *
+ * @param job
+ * @param path
+ */
+ public void updateLogPath(JobInterface job, String path);
+
+ /**
+ *
+ * @param name
+ * @return
+ */
+ public JobDetail findLastJob(String name);
+
+ /**
+ * Returns true of the cue has some pending jobs
+ *
+ * @return
+ */
+ public boolean cueHasPendingJobs(FacilityInterface f);
+
+ /**
+ * Enables/disables autobooking for specified job.
+ *
+ * @param value
+ */
+ public void enableAutoBooking(JobInterface job, boolean value);
+
+ /**
+ * Enables/disables auto unbooking for specified job.
+ *
+ * @param job
+ * @param value
+ */
+ void enableAutoUnBooking(JobInterface job, boolean value);
+
+ /**
+ * Maps the post job to the specified job
+ *
+ * @param job
+ */
+ void mapPostJob(BuildableJob job);
+
+ /**
+ * Activates the specified job's post job
+ *
+ * @param job
+ */
+ void activatePostJob(JobInterface job);
+
+ /**
+ * Update all jobs in the specified group to the specified department.
+ *
+ * @param group
+ */
+ void updateDepartment(GroupInterface group, DepartmentInterface dept);
+
+ /**
+ * Update the specified job to the specified department.
+ *
+ * @param group
+ */
+ void updateDepartment(JobInterface job, DepartmentInterface dept);
+
+ /**
+ * Set the job's new parent. The job will automatically inherit all relevant settings from the
+ * group.
+ *
+ * @param job
+ * @param dest
+ */
+ void updateParent(JobInterface job, GroupDetail dest);
+
+ /**
+ * Update layer usage with processor time usage. This happens when the proc has completed or
+ * failed some work.
+ *
+ * @param proc
+ * @param newState
+ */
+ void updateUsage(JobInterface job, ResourceUsage usage, int exitStatus);
+
+ /**
+ * Returns true if the job is launching
+ *
+ * @param j
+ * @return
+ */
+ boolean isLaunching(JobInterface j);
+
+ void updateEmail(JobInterface job, String email);
+
+ String getEmail(JobInterface job);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/LayerDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/LayerDao.java
index c4b07edf9..06d83737f 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/LayerDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/LayerDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -35,437 +31,417 @@
public interface LayerDao {
- /**
- *
- * @param layer
- * @return
- */
- public ExecutionSummary getExecutionSummary(LayerInterface layer);
-
- /**
- * return the frame state totals for the specified layer
- *
- * @param layer
- * @return
- */
- public FrameStateTotals getFrameStateTotals(LayerInterface layer);
-
- /**
- * returns a list of layers by job
- *
- * @param job
- * @return
- */
- public List getLayerDetails(JobInterface job);
-
- /**
- * Returns true if supplied layer is complete.
- *
- * @param layer
- * @return boolean
- */
- boolean isLayerComplete(LayerInterface layer);
-
- /**
- * Returns true if supplied layer is dispatchable.
- *
- * @param l
- * @return boolean
- */
- boolean isLayerDispatchable(LayerInterface l);
-
- /**
- * Inserts a LayerDetail
- *
- * @param l
- */
- void insertLayerDetail(LayerDetail l);
-
- /**
- * gets a layer detail from an object that implements layer
- *
- * @param layer
- * @return LayerDetail
- */
- LayerDetail getLayerDetail(LayerInterface layer);
-
- /**
- * get layer detail from the the unique id
- *
- * @param id
- * @return
- */
- LayerDetail getLayerDetail(String id);
-
- /**
- * get a layer detail from the job and layer name
- *
- * @param job
- * @param name
- * @return
- */
- LayerDetail findLayerDetail(JobInterface job, String name);
-
- /**
- * Get a minimal layer from the layer id
- *
- * @param id
- * @return
- */
- LayerInterface getLayer(String id);
-
- /**
- * Find a minimal layer from the job and layer name
- *
- * @param job
- * @param name
- * @return
- */
- LayerInterface findLayer(JobInterface job, String name);
-
- /**
- * update the number of min cores the layer requires
- *
- * @param layer
- * @param val
- */
- void updateLayerMinCores(LayerInterface layer, int val);
-
-
- /**
- * update the number of gpus the layer requires
- *
- * @param layer
- * @param val
- */
- void updateLayerMinGpus(LayerInterface layer, int val);
-
- /**
- * update the amount of memory required by all subsequent
- * running frames in the specified layer.
- *
- * @param layer
- * @param val
- */
- void updateLayerMinMemory(LayerInterface layer, long kb);
-
- /**
- * update the amount of gpu memory in kb required by all subsequent
- * running frames in the specified layer.
- *
- * @param layer
- * @param val
- */
- void updateLayerMinGpuMemory(LayerInterface layer, long val);
-
- /**
- * Update a layer with new host tags.
- *
- * @param layer
- * @param val
- */
- void updateLayerTags(LayerInterface layer, Set tags);
-
- /**
- * Insert a key/value pair into the layer environment
- *
- * @param layer
- * @param key
- * @param value
- */
- void insertLayerEnvironment(LayerInterface layer, String key, String value);
-
- /**
- * Insert a map key/value pairs into the layer environment
- *
- * @param layer
- * @param env
- */
- void insertLayerEnvironment(LayerInterface layer, Map env);
-
- /**
- * Get the layer environment map
- *
- * @param layer
- * @return
- */
- Map getLayerEnvironment(LayerInterface layer);
-
- /**
- * Updated the layers MaxRSS value. If force is true then the
- * value is updated no matter what the current value is. If force
- * is false, the value is only updated the val is greater than than
- * the existing value.
- *
- * @param layer
- * @param val
- */
- void updateLayerMaxRSS(LayerInterface layer, long val, boolean force);
-
- /**
- * Increases the value of the minimum memory when the supplied
- * value is larger than the current value
- *
- * @param layer
- * @param val
- */
- void increaseLayerMinMemory(LayerInterface layer, long val);
-
- /**
- * Increases the value of the minimum gpu when the supplied
- * value is larger than the current value
- *
- * @param layer
- * @param val
- */
- void increaseLayerMinGpuMemory(LayerInterface layer, long val);
-
- /**
- * Tries to find a max RSS value for layer in the specified job. The
- * layer must have at least 25% of its pending frames completed
- * for this to return a valid result. If the layer cannot be
- * found then 0 is returned.
- *
- * @param job
- * @param name
- * @return
- */
- long findPastMaxRSS(JobInterface job, String name);
-
- /**
- * Returns a list of layers from the specified job.
- *
- * @param job
- * @return
- */
- public List getLayers(JobInterface job);
-
- /**
- * Update all layers of the set type in specified job
- * with the new tags.
- *
- * @param job
- * @param tags
- * @param type
- */
- void updateTags(JobInterface job, String tags, LayerType type);
-
- /**
- * Update all layers of the set type in the specified
- * job with the new memory requirement.
- *
- * @param job
- * @param mem
- * @param type
- */
- void updateMinMemory(JobInterface job, long mem, LayerType type);
-
- /**
- * Update all layers of the set type in the specified
- * job with the new gpu requirement.
- *
- * @param job
- * @param mem
- * @param type
- */
- void updateMinGpuMemory(JobInterface job, long mem, LayerType type);
-
- /**
- * Update all layers of the set type in the specified job
- * with the new max cores requirement.
- *
- * @param job
- * @param cores
- * @param type
- */
- void updateMaxCores(JobInterface job, int cores, LayerType type);
-
- /**
- * Update all layers of the set type in the specified job
- * with the new min cores requirement.
- *
- * @param job
- * @param cores
- * @param type
- */
- void updateMinCores(JobInterface job, int cores, LayerType type);
-
- /**
- * Update all layers of the set type in the specified job
- * with the new min gpu requirement.
- *
- * @param job
- * @param gpus
- * @param type
- */
- void updateMinGpus(JobInterface job, int gpus, LayerType type);
-
- /**
- * Update a layer's max cores value, which limits how
- * much threading can go on.
- *
- * @param layer
- * @param threadable
- */
- void updateThreadable(LayerInterface layer, boolean threadable);
-
- /**
- * Update a layer's timeout value, which limits how
- * much the frame can run on a host.
- *
- * @param layer
- * @param timeout
- */
- void updateTimeout(LayerInterface layer, int timeout);
-
- /**
- * Update a layer's LLU timeout value, which limits how
- * much the frame can run on a host without updates in the log file.
- *
- * @param layer
- * @param timeout_llu
- */
- void updateTimeoutLLU(LayerInterface layer, int timeout_llu);
-
- /**
- * Lowers the minimum memory on a layer if the layer
- * is using less memory and the currnet min memory is
- * the dispatcher default.
- *
- * @param layer
- * @param val
- * @return
- */
- boolean balanceLayerMinMemory(LayerInterface layer, long val);
-
- /**
- * Appends a tag to the current set of tags. If the tag
- * already exists then nothing happens.
- *
- * @param layer
- * @param val
- */
- void appendLayerTags(LayerInterface layer, String val);
-
- /**
- * Returns true if the layer can be optimized to use
- * util based on the specified criteria.
- *
- * @param l
- * @param succeeded
- * @param avg
- * @return
- */
- boolean isOptimizable(LayerInterface l, int succeeded, float avg);
-
- /**
- * Update layer usage with processor time usage.
- * This happens when the proc has completed or failed some work.
- *
- * @param layer
- * @param newState
- * @param exitStatus
- */
- void updateUsage(LayerInterface layer, ResourceUsage usage, int exitStatus);
-
- /**
- * Returns true of the layer is launching.
- *
- * @param l
- * @return
- */
- boolean isLaunching(LayerInterface l);
-
- /**
- * Return true if the application running in the given layer
- * is threadable.
- *
- * @param l
- * @return
- */
- boolean isThreadable(LayerInterface l);
-
- /**
- * Enable/disable memory optimizer.
- *
- * @param layer
- * @param state
- */
- void enableMemoryOptimizer(LayerInterface layer, boolean state);
-
- /**
- * Return a list of outputs mapped to the given layer.
- *
- * @param layer
- * @return
- */
- List getLayerOutputs(LayerInterface layer);
-
- /**
- * Add a list of filespecs to the given layer's output table.
- *
- * @param layer
- * @param specs
- */
- void insertLayerOutput(LayerInterface layer, String spec);
-
- /**
- * Return the thread stats for the given layer.
- *
- * @param layer
- * @return
- */
- List getThreadStats(LayerInterface layer);
-
- /**
- * Set the layer's max cores value to the given int. The
- * max cores value will not allow the dispatcher to
- * book over the given number of cores.
- *
- * @param layer
- * @param val
- */
- void updateLayerMaxCores(LayerInterface layer, int val);
-
- /**
- * Set the layer's max gpus value to the given int. The
- * max gpu value will not allow the dispatcher to
- * book over the given number of gpu.
- *
- * @param layer
- * @param val
- */
- void updateLayerMaxGpus(LayerInterface layer, int val);
-
- /**
- * Add a limit to the given layer.
- *
- * @param layer
- * @param limit_id
- */
- void addLimit(LayerInterface layer, String limitId);
-
- /**
- * Remove a limit to the given layer.
- *
- * @param layer
- * @param limit_id
- */
- void dropLimit(LayerInterface layer, String limitId);
-
- /**
- * Return a list of limits on the layer.
- *
- * @param layer
- */
- List getLimits(LayerInterface layer);
-
- /**
- * Return a list of limit names on the layer.
- *
- * @param layer
- */
- List getLimitNames(LayerInterface layer);
+ /**
+ *
+ * @param layer
+ * @return
+ */
+ public ExecutionSummary getExecutionSummary(LayerInterface layer);
+
+ /**
+ * return the frame state totals for the specified layer
+ *
+ * @param layer
+ * @return
+ */
+ public FrameStateTotals getFrameStateTotals(LayerInterface layer);
+
+ /**
+ * returns a list of layers by job
+ *
+ * @param job
+ * @return
+ */
+ public List getLayerDetails(JobInterface job);
+
+ /**
+ * Returns true if supplied layer is complete.
+ *
+ * @param layer
+ * @return boolean
+ */
+ boolean isLayerComplete(LayerInterface layer);
+
+ /**
+ * Returns true if supplied layer is dispatchable.
+ *
+ * @param l
+ * @return boolean
+ */
+ boolean isLayerDispatchable(LayerInterface l);
+
+ /**
+ * Inserts a LayerDetail
+ *
+ * @param l
+ */
+ void insertLayerDetail(LayerDetail l);
+
+ /**
+ * gets a layer detail from an object that implements layer
+ *
+ * @param layer
+ * @return LayerDetail
+ */
+ LayerDetail getLayerDetail(LayerInterface layer);
+
+ /**
+ * get layer detail from the the unique id
+ *
+ * @param id
+ * @return
+ */
+ LayerDetail getLayerDetail(String id);
+
+ /**
+ * get a layer detail from the job and layer name
+ *
+ * @param job
+ * @param name
+ * @return
+ */
+ LayerDetail findLayerDetail(JobInterface job, String name);
+
+ /**
+ * Get a minimal layer from the layer id
+ *
+ * @param id
+ * @return
+ */
+ LayerInterface getLayer(String id);
+
+ /**
+ * Find a minimal layer from the job and layer name
+ *
+ * @param job
+ * @param name
+ * @return
+ */
+ LayerInterface findLayer(JobInterface job, String name);
+
+ /**
+ * update the number of min cores the layer requires
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMinCores(LayerInterface layer, int val);
+
+ /**
+ * update the number of gpus the layer requires
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMinGpus(LayerInterface layer, int val);
+
+ /**
+ * update the amount of memory required by all subsequent running frames in the specified layer.
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMinMemory(LayerInterface layer, long kb);
+
+ /**
+ * update the amount of gpu memory in kb required by all subsequent running frames in the
+ * specified layer.
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMinGpuMemory(LayerInterface layer, long val);
+
+ /**
+ * Update a layer with new host tags.
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerTags(LayerInterface layer, Set tags);
+
+ /**
+ * Insert a key/value pair into the layer environment
+ *
+ * @param layer
+ * @param key
+ * @param value
+ */
+ void insertLayerEnvironment(LayerInterface layer, String key, String value);
+
+ /**
+ * Insert a map key/value pairs into the layer environment
+ *
+ * @param layer
+ * @param env
+ */
+ void insertLayerEnvironment(LayerInterface layer, Map env);
+
+ /**
+ * Get the layer environment map
+ *
+ * @param layer
+ * @return
+ */
+ Map getLayerEnvironment(LayerInterface layer);
+
+ /**
+ * Updated the layers MaxRSS value. If force is true then the value is updated no matter what the
+ * current value is. If force is false, the value is only updated the val is greater than than the
+ * existing value.
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMaxRSS(LayerInterface layer, long val, boolean force);
+
+ /**
+ * Increases the value of the minimum memory when the supplied value is larger than the current
+ * value
+ *
+ * @param layer
+ * @param val
+ */
+ void increaseLayerMinMemory(LayerInterface layer, long val);
+
+ /**
+ * Increases the value of the minimum gpu when the supplied value is larger than the current value
+ *
+ * @param layer
+ * @param val
+ */
+ void increaseLayerMinGpuMemory(LayerInterface layer, long val);
+
+ /**
+ * Tries to find a max RSS value for layer in the specified job. The layer must have at least 25%
+ * of its pending frames completed for this to return a valid result. If the layer cannot be found
+ * then 0 is returned.
+ *
+ * @param job
+ * @param name
+ * @return
+ */
+ long findPastMaxRSS(JobInterface job, String name);
+
+ /**
+ * Returns a list of layers from the specified job.
+ *
+ * @param job
+ * @return
+ */
+ public List getLayers(JobInterface job);
+
+ /**
+ * Update all layers of the set type in specified job with the new tags.
+ *
+ * @param job
+ * @param tags
+ * @param type
+ */
+ void updateTags(JobInterface job, String tags, LayerType type);
+
+ /**
+ * Update all layers of the set type in the specified job with the new memory requirement.
+ *
+ * @param job
+ * @param mem
+ * @param type
+ */
+ void updateMinMemory(JobInterface job, long mem, LayerType type);
+
+ /**
+ * Update all layers of the set type in the specified job with the new gpu requirement.
+ *
+ * @param job
+ * @param mem
+ * @param type
+ */
+ void updateMinGpuMemory(JobInterface job, long mem, LayerType type);
+
+ /**
+ * Update all layers of the set type in the specified job with the new max cores requirement.
+ *
+ * @param job
+ * @param cores
+ * @param type
+ */
+ void updateMaxCores(JobInterface job, int cores, LayerType type);
+
+ /**
+ * Update all layers of the set type in the specified job with the new min cores requirement.
+ *
+ * @param job
+ * @param cores
+ * @param type
+ */
+ void updateMinCores(JobInterface job, int cores, LayerType type);
+
+ /**
+ * Update all layers of the set type in the specified job with the new min gpu requirement.
+ *
+ * @param job
+ * @param gpus
+ * @param type
+ */
+ void updateMinGpus(JobInterface job, int gpus, LayerType type);
+
+ /**
+ * Update a layer's max cores value, which limits how much threading can go on.
+ *
+ * @param layer
+ * @param threadable
+ */
+ void updateThreadable(LayerInterface layer, boolean threadable);
+
+ /**
+ * Update a layer's timeout value, which limits how much the frame can run on a host.
+ *
+ * @param layer
+ * @param timeout
+ */
+ void updateTimeout(LayerInterface layer, int timeout);
+
+ /**
+ * Update a layer's LLU timeout value, which limits how much the frame can run on a host without
+ * updates in the log file.
+ *
+ * @param layer
+ * @param timeout_llu
+ */
+ void updateTimeoutLLU(LayerInterface layer, int timeout_llu);
+
+ /**
+ * Lowers the minimum memory on a layer if the layer is using less memory and the currnet min
+ * memory is the dispatcher default.
+ *
+ * @param layer
+ * @param val
+ * @return
+ */
+ boolean balanceLayerMinMemory(LayerInterface layer, long val);
+
+ /**
+ * Appends a tag to the current set of tags. If the tag already exists then nothing happens.
+ *
+ * @param layer
+ * @param val
+ */
+ void appendLayerTags(LayerInterface layer, String val);
+
+ /**
+ * Returns true if the layer can be optimized to use util based on the specified criteria.
+ *
+ * @param l
+ * @param succeeded
+ * @param avg
+ * @return
+ */
+ boolean isOptimizable(LayerInterface l, int succeeded, float avg);
+
+ /**
+ * Update layer usage with processor time usage. This happens when the proc has completed or
+ * failed some work.
+ *
+ * @param layer
+ * @param newState
+ * @param exitStatus
+ */
+ void updateUsage(LayerInterface layer, ResourceUsage usage, int exitStatus);
+
+ /**
+ * Returns true of the layer is launching.
+ *
+ * @param l
+ * @return
+ */
+ boolean isLaunching(LayerInterface l);
+
+ /**
+ * Return true if the application running in the given layer is threadable.
+ *
+ * @param l
+ * @return
+ */
+ boolean isThreadable(LayerInterface l);
+
+ /**
+ * Enable/disable memory optimizer.
+ *
+ * @param layer
+ * @param state
+ */
+ void enableMemoryOptimizer(LayerInterface layer, boolean state);
+
+ /**
+ * Return a list of outputs mapped to the given layer.
+ *
+ * @param layer
+ * @return
+ */
+ List getLayerOutputs(LayerInterface layer);
+
+ /**
+ * Add a list of filespecs to the given layer's output table.
+ *
+ * @param layer
+ * @param specs
+ */
+ void insertLayerOutput(LayerInterface layer, String spec);
+
+ /**
+ * Return the thread stats for the given layer.
+ *
+ * @param layer
+ * @return
+ */
+ List getThreadStats(LayerInterface layer);
+
+ /**
+ * Set the layer's max cores value to the given int. The max cores value will not allow the
+ * dispatcher to book over the given number of cores.
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMaxCores(LayerInterface layer, int val);
+
+ /**
+ * Set the layer's max gpus value to the given int. The max gpu value will not allow the
+ * dispatcher to book over the given number of gpu.
+ *
+ * @param layer
+ * @param val
+ */
+ void updateLayerMaxGpus(LayerInterface layer, int val);
+
+ /**
+ * Add a limit to the given layer.
+ *
+ * @param layer
+ * @param limit_id
+ */
+ void addLimit(LayerInterface layer, String limitId);
+
+ /**
+ * Remove a limit to the given layer.
+ *
+ * @param layer
+ * @param limit_id
+ */
+ void dropLimit(LayerInterface layer, String limitId);
+
+ /**
+ * Return a list of limits on the layer.
+ *
+ * @param layer
+ */
+ List getLimits(LayerInterface layer);
+
+ /**
+ * Return a list of limit names on the layer.
+ *
+ * @param layer
+ */
+ List getLimitNames(LayerInterface layer);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/LimitDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/LimitDao.java
index c74d1d11b..686c35831 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/LimitDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/LimitDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.LimitEntity;
@@ -24,53 +20,53 @@
public interface LimitDao {
- /**
- * Insert and return a facility.
- *
- * @param limit
- * @return
- */
- public String createLimit(String name, int maxValue);
+ /**
+ * Insert and return a facility.
+ *
+ * @param limit
+ * @return
+ */
+ public String createLimit(String name, int maxValue);
- /**
- * Deletes a limit record, if possible.
- *
- * @param limit
- * @return
- */
- public void deleteLimit(LimitInterface limit);
+ /**
+ * Deletes a limit record, if possible.
+ *
+ * @param limit
+ * @return
+ */
+ public void deleteLimit(LimitInterface limit);
- /**
- * Find a limit by it's name
- *
- * @param name
- * @return LimitEntity
- */
- public LimitEntity findLimit(String name);
+ /**
+ * Find a limit by it's name
+ *
+ * @param name
+ * @return LimitEntity
+ */
+ public LimitEntity findLimit(String name);
- /**
- * Gets a limit by Id
- *
- * @param id
- * @return LimitEntity
- */
- public LimitEntity getLimit(String id);
+ /**
+ * Gets a limit by Id
+ *
+ * @param id
+ * @return LimitEntity
+ */
+ public LimitEntity getLimit(String id);
- /**
- * Set the specified limit's name.
- *
- * @param limit
- * @param name
- * @return
- */
- public void setLimitName(LimitInterface limit, String name);
+ /**
+ * Set the specified limit's name.
+ *
+ * @param limit
+ * @param name
+ * @return
+ */
+ public void setLimitName(LimitInterface limit, String name);
- /**
- * Set the specified limit's max value.
- *
- * @param limit
- * @param value
- * @return
- */
- public void setMaxValue(LimitInterface limit, int value);
+ /**
+ * Set the specified limit's max value.
+ *
+ * @param limit
+ * @param value
+ * @return
+ */
+ public void setMaxValue(LimitInterface limit, int value);
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/MaintenanceDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/MaintenanceDao.java
index 29e2faa57..6359ea936 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/MaintenanceDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/MaintenanceDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.MaintenanceTask;
@@ -28,38 +24,37 @@
*/
public interface MaintenanceDao {
- /**
- * Set hosts to the down state that have not pinged in within 5 minutes and
- * return the number hosts that failed the check.
- *
- * @return int
- */
- int setUpHostsToDown();
-
- /**
- * Lock specified task
- *
- * @param task
- * @return
- */
- boolean lockTask(MaintenanceTask task);
-
- /**
- * Locks a test for the specified number of minutes. No other thread will
- * execute this task, even if the task is unlocked for N amount of time.
- *
- * @param task
- * @param minutes
- * @return
- */
- public boolean lockTask(MaintenanceTask task, int minutes);
-
- /**
- * Unlock specified task
- *
- * @param task
- */
- void unlockTask(MaintenanceTask task);
+ /**
+ * Set hosts to the down state that have not pinged in within 5 minutes and return the number
+ * hosts that failed the check.
+ *
+ * @return int
+ */
+ int setUpHostsToDown();
+
+ /**
+ * Lock specified task
+ *
+ * @param task
+ * @return
+ */
+ boolean lockTask(MaintenanceTask task);
+
+ /**
+ * Locks a test for the specified number of minutes. No other thread will execute this task, even
+ * if the task is unlocked for N amount of time.
+ *
+ * @param task
+ * @param minutes
+ * @return
+ */
+ public boolean lockTask(MaintenanceTask task, int minutes);
+
+ /**
+ * Unlock specified task
+ *
+ * @param task
+ */
+ void unlockTask(MaintenanceTask task);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/MatcherDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/MatcherDao.java
index ef1f9099f..0f5dd5928 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/MatcherDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/MatcherDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -27,13 +23,16 @@
public interface MatcherDao {
- void insertMatcher(MatcherEntity matcher);
- void deleteMatcher(MatcherInterface matcher);
- void updateMatcher(MatcherEntity matcher);
+ void insertMatcher(MatcherEntity matcher);
- MatcherEntity getMatcher(String id);
- MatcherEntity getMatcher(MatcherInterface matcher);
- List getMatchers(FilterInterface filter);
+ void deleteMatcher(MatcherInterface matcher);
-}
+ void updateMatcher(MatcherEntity matcher);
+
+ MatcherEntity getMatcher(String id);
+ MatcherEntity getMatcher(MatcherInterface matcher);
+
+ List getMatchers(FilterInterface filter);
+
+}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/NestedWhiteboardDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/NestedWhiteboardDao.java
index 0b48b8006..7f137d670 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/NestedWhiteboardDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/NestedWhiteboardDao.java
@@ -2,29 +2,23 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
-
import com.imageworks.spcue.ShowInterface;
import com.imageworks.spcue.grpc.host.NestedHostSeq;
import com.imageworks.spcue.grpc.job.NestedGroup;
-
/**
* A DAO for nested data structures being returned to the client.
*
@@ -32,20 +26,19 @@
*/
public interface NestedWhiteboardDao {
- /**
- * returns a grouped whiteboard for specified show.
- *
- * @param show
- * @return
- */
- NestedGroup getJobWhiteboard(ShowInterface show);
-
- /**
- * get a list of hosts
- *
- * @return List
- */
- NestedHostSeq getHostWhiteboard();
+ /**
+ * returns a grouped whiteboard for specified show.
+ *
+ * @param show
+ * @return
+ */
+ NestedGroup getJobWhiteboard(ShowInterface show);
+
+ /**
+ * get a list of hosts
+ *
+ * @return List
+ */
+ NestedHostSeq getHostWhiteboard();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/OwnerDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/OwnerDao.java
index fbbd7e7be..f12c1820a 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/OwnerDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/OwnerDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.Entity;
@@ -26,57 +22,55 @@
public interface OwnerDao {
- /**
- * Return true if the given owner owns the particualar host.
- *
- * @param owner
- * @param host
- * @return
- */
- boolean isOwner(OwnerEntity owner, HostInterface host);
+ /**
+ * Return true if the given owner owns the particualar host.
+ *
+ * @param owner
+ * @param host
+ * @return
+ */
+ boolean isOwner(OwnerEntity owner, HostInterface host);
- /**
- * Get an owner record by ID.
- *
- * @param id
- */
- OwnerEntity getOwner(String id);
+ /**
+ * Get an owner record by ID.
+ *
+ * @param id
+ */
+ OwnerEntity getOwner(String id);
- /**
- * Return the owner of the given host.
- *
- * @param host
- * @return
- */
- OwnerEntity getOwner(HostInterface host);
+ /**
+ * Return the owner of the given host.
+ *
+ * @param host
+ * @return
+ */
+ OwnerEntity getOwner(HostInterface host);
- /**
- * Return an owner record by name.
- *
- * @param name
- */
- OwnerEntity findOwner(String name);
+ /**
+ * Return an owner record by name.
+ *
+ * @param name
+ */
+ OwnerEntity findOwner(String name);
- /**
- * Delete the specified owner and all his/her deeds.
- * Return true if the owner was actually deleted.
- * False if not.
- */
- boolean deleteOwner(Entity owner);
+ /**
+ * Delete the specified owner and all his/her deeds. Return true if the owner was actually
+ * deleted. False if not.
+ */
+ boolean deleteOwner(Entity owner);
- /**
- * Insert a new owner record.
- *
- * @param owner
- */
- void insertOwner(OwnerEntity owner, ShowInterface show);
+ /**
+ * Insert a new owner record.
+ *
+ * @param owner
+ */
+ void insertOwner(OwnerEntity owner, ShowInterface show);
- /**
- * Set the owner's show. This can be null.
- *
- * @param owner
- * @param show
- */
- void updateShow(Entity owner, ShowInterface show);
+ /**
+ * Set the owner's show. This can be null.
+ *
+ * @param owner
+ * @param show
+ */
+ void updateShow(Entity owner, ShowInterface show);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/PointDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/PointDao.java
index af0deac92..a1afdcf34 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/PointDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/PointDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -29,104 +25,102 @@
public interface PointDao {
- /**
- * Inserts a render into the point table
- *
- * @param t
- * @return
- */
- void insertPointConf(PointDetail t);
-
- /**
- * Inserts and returns an empty render point detail
- *
- * @param show
- * @param dept
- * @return
- */
- PointDetail insertPointConf(ShowInterface show, DepartmentInterface dept);
-
- /**
- * Returns true if the department is being managed by track-it.
- *
- * @param show
- * @param dept
- * @return
- */
- boolean isManaged(ShowInterface show, DepartmentInterface dept);
-
- /**
- * Returns true if a render point config already exists
- * for the specified show and department
- *
- * @param show
- * @param dept
- * @return
- */
- boolean pointConfExists(ShowInterface show, DepartmentInterface dept);
-
- /**
- * Updates the number of cores managed by this department
- *
- * @param cdept
- * @param cores
- */
- void updateManagedCores(PointInterface cdept, int cores);
-
- /**
- * Enables TI managed.
- *
- * @param p
- * @param task
- * @param cores
- */
- void updateEnableManaged(PointInterface cdept, String task, int cores);
-
- /**
- * Disables TI mananaged.
- *
- * @param p
- */
- void updateDisableManaged(PointInterface cdept);
-
- /**
- * Returns a list of all managed point configs.
- *
- * @return
- */
- List getManagedPointConfs();
-
- /**
- * Returns a DepartmentConfigDetail by unique ID
- *
- * @param id
- * @return
- */
- PointDetail getPointConfDetail(String id);
-
- /**
- * Returns a DepartmentConfigDetail using the specified show and department
- *
- *
- * @param show
- * @param dept
- * @return
- */
- PointDetail getPointConfigDetail(ShowInterface show, DepartmentInterface dept);
-
- /**
- * Updates the time at which the point config was last updated.
- *
- * @param t
- */
- void updatePointConfUpdateTime(PointInterface t);
-
- /**
- *
- * @param job
- * @return
- */
- boolean isOverMinCores(JobInterface job);
+ /**
+ * Inserts a render into the point table
+ *
+ * @param t
+ * @return
+ */
+ void insertPointConf(PointDetail t);
+
+ /**
+ * Inserts and returns an empty render point detail
+ *
+ * @param show
+ * @param dept
+ * @return
+ */
+ PointDetail insertPointConf(ShowInterface show, DepartmentInterface dept);
+
+ /**
+ * Returns true if the department is being managed by track-it.
+ *
+ * @param show
+ * @param dept
+ * @return
+ */
+ boolean isManaged(ShowInterface show, DepartmentInterface dept);
+
+ /**
+ * Returns true if a render point config already exists for the specified show and department
+ *
+ * @param show
+ * @param dept
+ * @return
+ */
+ boolean pointConfExists(ShowInterface show, DepartmentInterface dept);
+
+ /**
+ * Updates the number of cores managed by this department
+ *
+ * @param cdept
+ * @param cores
+ */
+ void updateManagedCores(PointInterface cdept, int cores);
+
+ /**
+ * Enables TI managed.
+ *
+ * @param p
+ * @param task
+ * @param cores
+ */
+ void updateEnableManaged(PointInterface cdept, String task, int cores);
+
+ /**
+ * Disables TI mananaged.
+ *
+ * @param p
+ */
+ void updateDisableManaged(PointInterface cdept);
+
+ /**
+ * Returns a list of all managed point configs.
+ *
+ * @return
+ */
+ List getManagedPointConfs();
+
+ /**
+ * Returns a DepartmentConfigDetail by unique ID
+ *
+ * @param id
+ * @return
+ */
+ PointDetail getPointConfDetail(String id);
+
+ /**
+ * Returns a DepartmentConfigDetail using the specified show and department
+ *
+ *
+ * @param show
+ * @param dept
+ * @return
+ */
+ PointDetail getPointConfigDetail(ShowInterface show, DepartmentInterface dept);
+
+ /**
+ * Updates the time at which the point config was last updated.
+ *
+ * @param t
+ */
+ void updatePointConfUpdateTime(PointInterface t);
+
+ /**
+ *
+ * @param job
+ * @return
+ */
+ boolean isOverMinCores(JobInterface job);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/ProcDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/ProcDao.java
index dcdf8d097..221b4f99b 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/ProcDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/ProcDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -38,278 +34,270 @@
*/
public interface ProcDao {
- /**
- * Returns the amount of reserved memory a proc has
- *
- * @param proc
- * @return
- */
-
- long getReservedMemory(ProcInterface proc);
-
- /**
- * Returns the amount of reserved gpu memory a proc has
- *
- * @param proc
- * @return
- */
-
- long getReservedGpuMemory(ProcInterface proc);
-
- /**
- * Removes a little bit of reserved memory from every other running frame
- * in order to give some to the target proc.
- *
- * @param targetProc
- * @param targetMem
- * @return
- */
- boolean balanceUnderUtilizedProcs(ProcInterface targetProc, long targetMem);
-
- /**
- * Increase a proc's reserved memory.
- *
- * @param id
- * @param value
- * @return
- */
- boolean increaseReservedMemory(ProcInterface p, long value);
-
- /**
- * Set a proc's reserved memory.
- *
- * @param id
- * @param value
- * @return
- */
- void updateReservedMemory(ProcInterface p, long value);
-
- /**
- * verifies the mapping bewtween a proc id and a frame id
- *
- * @param procid
- * @param frameid
- * @return
- */
- boolean verifyRunningProc(String procid, String frameid);
-
- /**
- * Creates a new virtual proc
- *
- * @param proc
- */
- void insertVirtualProc(VirtualProc proc);
-
- /**
- * Deletes an existing virtual proc
- *
- * @param proc
- */
- boolean deleteVirtualProc(VirtualProc proc);
-
- /**
- * Clears a virtual proc assignement. This keeps the proc
- * around but sets pk_frame to null. This would normally
- * happen after a frame completes and before the proc is
- * dispatched again.
- *
- * @param proc
- */
- boolean clearVirtualProcAssignment(ProcInterface proc);
-
- /**
- * Clear a proc assignment by frame id. Return true
- * if an assignment was cleared.
- *
- * @param frame
- * @return
- */
- boolean clearVirtualProcAssignment(FrameInterface frame);
-
- /**
- * Updates an existing proc's assignment
- *
- * @param proc
- */
- void updateVirtualProcAssignment(VirtualProc proc);
-
- /**
- * Update a procs memory usage based on the given
- * frame it should be running.
- *
- * @param proc
- * @param usedKb
- * @param maxKb
- */
- void updateProcMemoryUsage(FrameInterface f, long rss, long maxRss,
- long vsize, long maxVsize, long usedGpuMemory,
- long maxUsedGpuMemory, long usedSwapMemory,
- byte[] children);
-
- /**
- * get aq virual proc from its unique id
- *
- * @param id
- * @return
- */
- VirtualProc getVirtualProc(String id);
-
- /**
- * get a virtual proc from the frame its assigned to
- *
- * @param frame
- * @return
- */
- VirtualProc findVirtualProc(FrameInterface frame);
-
- /**
- * gets a list of virtual procs from a FrameLookupRequest
- *
- * @param job
- * @param req
- * @return
- */
- List findVirtualProcs(FrameSearchInterface s);
-
- /**
- * get the list of procs from the host.
- *
- * @param host
- * @return
- */
- List findVirtualProcs(HostInterface host);
-
- /**
- * find all procs booked on a specified layer
- *
- * @param layer
- * @return
- */
- List findVirtualProcs(LayerInterface layer);
-
- /**
- * find all procs booked on specified job
- *
- * @param job
- * @return
- */
- List findVirtualProcs(JobInterface job);
-
- /**
- *
- * @return
- */
- List findOrphanedVirtualProcs();
-
- /**
- *
- * @return
- */
- List findOrphanedVirtualProcs(int limit);
-
- /**
- * Returns procs with a host in a particular hardware state.
- *
- * @param state
- * @return
- */
- public List findVirtualProcs(HardwareState state);
-
- /**
- * Returns a list if procs using a ProcSearchInterface object.
- *
- * @param r - A ProcSearchInterface object
- * @return a list of virtual procs
- */
- List findVirtualProcs(ProcSearchInterface r);
-
- /**
- * Unbooks a list of virtual procs using a batch query
- *
- * @param procs
- * @return
- */
- void unbookVirtualProcs(List procs);
-
- /**
- * Unbooks a single virtual proc
- *
- * @param procs
- * @return
- */
- void unbookProc(ProcInterface proc);
-
- /**
- * Used to set the unbook flag on a proc to true or false.
- *
- * @param proc
- * @param unbooked
- */
- public boolean setUnbookState(ProcInterface proc, boolean unbooked);
-
- /**
- * Updates the proc record with the name of its redirect target.
- *
- * @param p
- * @param r
- */
- public boolean setRedirectTarget(ProcInterface p, Redirect r);
-
- /**
- * Returns the unique id of the proc's current show
- *
- * @param p
- * @return
- */
- public String getCurrentShowId(ProcInterface p);
-
- /**
- * Returns the unique id of the procs current job
- *
- * @param p
- * @return
- */
- public String getCurrentJobId(ProcInterface p);
-
- /**
- * Returns the unique id of the procs current layer
- *
- * @param p
- * @return
- */
- public String getCurrentLayerId(ProcInterface p);
-
- /**
- * Returns the unique id of the procs current frame
- *
- * @param p
- * @return
- */
- public String getCurrentFrameId(ProcInterface p);
-
- /**
- * Returns an array of booked virutal procs.
- *
- * @param r
- * @return
- */
- List findBookedVirtualProcs(ProcSearchInterface r);
-
- /**
- * Return true if the proc is an orphan.
- *
- * @param proc
- * @return
- */
- boolean isOrphan(ProcInterface proc);
-
- /**
- * Return a list of all procs that are booked as part
- * of the given local job assignment.
- *
- * @param l
- * @return
- */
- List findVirtualProcs(LocalHostAssignment l);
+ /**
+ * Returns the amount of reserved memory a proc has
+ *
+ * @param proc
+ * @return
+ */
+
+ long getReservedMemory(ProcInterface proc);
+
+ /**
+ * Returns the amount of reserved gpu memory a proc has
+ *
+ * @param proc
+ * @return
+ */
+
+ long getReservedGpuMemory(ProcInterface proc);
+
+ /**
+ * Removes a little bit of reserved memory from every other running frame in order to give some to
+ * the target proc.
+ *
+ * @param targetProc
+ * @param targetMem
+ * @return
+ */
+ boolean balanceUnderUtilizedProcs(ProcInterface targetProc, long targetMem);
+
+ /**
+ * Increase a proc's reserved memory.
+ *
+ * @param id
+ * @param value
+ * @return
+ */
+ boolean increaseReservedMemory(ProcInterface p, long value);
+
+ /**
+ * Set a proc's reserved memory.
+ *
+ * @param id
+ * @param value
+ * @return
+ */
+ void updateReservedMemory(ProcInterface p, long value);
+
+ /**
+ * verifies the mapping bewtween a proc id and a frame id
+ *
+ * @param procid
+ * @param frameid
+ * @return
+ */
+ boolean verifyRunningProc(String procid, String frameid);
+
+ /**
+ * Creates a new virtual proc
+ *
+ * @param proc
+ */
+ void insertVirtualProc(VirtualProc proc);
+
+ /**
+ * Deletes an existing virtual proc
+ *
+ * @param proc
+ */
+ boolean deleteVirtualProc(VirtualProc proc);
+
+ /**
+ * Clears a virtual proc assignement. This keeps the proc around but sets pk_frame to null. This
+ * would normally happen after a frame completes and before the proc is dispatched again.
+ *
+ * @param proc
+ */
+ boolean clearVirtualProcAssignment(ProcInterface proc);
+
+ /**
+ * Clear a proc assignment by frame id. Return true if an assignment was cleared.
+ *
+ * @param frame
+ * @return
+ */
+ boolean clearVirtualProcAssignment(FrameInterface frame);
+
+ /**
+ * Updates an existing proc's assignment
+ *
+ * @param proc
+ */
+ void updateVirtualProcAssignment(VirtualProc proc);
+
+ /**
+ * Update a procs memory usage based on the given frame it should be running.
+ *
+ * @param proc
+ * @param usedKb
+ * @param maxKb
+ */
+ void updateProcMemoryUsage(FrameInterface f, long rss, long maxRss, long vsize, long maxVsize,
+ long usedGpuMemory, long maxUsedGpuMemory, long usedSwapMemory, byte[] children);
+
+ /**
+ * get aq virual proc from its unique id
+ *
+ * @param id
+ * @return
+ */
+ VirtualProc getVirtualProc(String id);
+
+ /**
+ * get a virtual proc from the frame its assigned to
+ *
+ * @param frame
+ * @return
+ */
+ VirtualProc findVirtualProc(FrameInterface frame);
+
+ /**
+ * gets a list of virtual procs from a FrameLookupRequest
+ *
+ * @param job
+ * @param req
+ * @return
+ */
+ List findVirtualProcs(FrameSearchInterface s);
+
+ /**
+ * get the list of procs from the host.
+ *
+ * @param host
+ * @return
+ */
+ List findVirtualProcs(HostInterface host);
+
+ /**
+ * find all procs booked on a specified layer
+ *
+ * @param layer
+ * @return
+ */
+ List findVirtualProcs(LayerInterface layer);
+
+ /**
+ * find all procs booked on specified job
+ *
+ * @param job
+ * @return
+ */
+ List findVirtualProcs(JobInterface job);
+
+ /**
+ *
+ * @return
+ */
+ List findOrphanedVirtualProcs();
+
+ /**
+ *
+ * @return
+ */
+ List findOrphanedVirtualProcs(int limit);
+
+ /**
+ * Returns procs with a host in a particular hardware state.
+ *
+ * @param state
+ * @return
+ */
+ public List findVirtualProcs(HardwareState state);
+
+ /**
+ * Returns a list if procs using a ProcSearchInterface object.
+ *
+ * @param r - A ProcSearchInterface object
+ * @return a list of virtual procs
+ */
+ List findVirtualProcs(ProcSearchInterface r);
+
+ /**
+ * Unbooks a list of virtual procs using a batch query
+ *
+ * @param procs
+ * @return
+ */
+ void unbookVirtualProcs(List procs);
+
+ /**
+ * Unbooks a single virtual proc
+ *
+ * @param procs
+ * @return
+ */
+ void unbookProc(ProcInterface proc);
+
+ /**
+ * Used to set the unbook flag on a proc to true or false.
+ *
+ * @param proc
+ * @param unbooked
+ */
+ public boolean setUnbookState(ProcInterface proc, boolean unbooked);
+
+ /**
+ * Updates the proc record with the name of its redirect target.
+ *
+ * @param p
+ * @param r
+ */
+ public boolean setRedirectTarget(ProcInterface p, Redirect r);
+
+ /**
+ * Returns the unique id of the proc's current show
+ *
+ * @param p
+ * @return
+ */
+ public String getCurrentShowId(ProcInterface p);
+
+ /**
+ * Returns the unique id of the procs current job
+ *
+ * @param p
+ * @return
+ */
+ public String getCurrentJobId(ProcInterface p);
+
+ /**
+ * Returns the unique id of the procs current layer
+ *
+ * @param p
+ * @return
+ */
+ public String getCurrentLayerId(ProcInterface p);
+
+ /**
+ * Returns the unique id of the procs current frame
+ *
+ * @param p
+ * @return
+ */
+ public String getCurrentFrameId(ProcInterface p);
+
+ /**
+ * Returns an array of booked virutal procs.
+ *
+ * @param r
+ * @return
+ */
+ List findBookedVirtualProcs(ProcSearchInterface r);
+
+ /**
+ * Return true if the proc is an orphan.
+ *
+ * @param proc
+ * @return
+ */
+ boolean isOrphan(ProcInterface proc);
+
+ /**
+ * Return a list of all procs that are booked as part of the given local job assignment.
+ *
+ * @param l
+ * @return
+ */
+ List findVirtualProcs(LocalHostAssignment l);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/RedirectDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/RedirectDao.java
index 0459f478c..9ab9dee31 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/RedirectDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/RedirectDao.java
@@ -2,20 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
package com.imageworks.spcue.dao;
import org.springframework.transaction.annotation.Propagation;
@@ -23,48 +20,48 @@
import com.imageworks.spcue.Redirect;
-@Transactional(propagation=Propagation.MANDATORY)
+@Transactional(propagation = Propagation.MANDATORY)
public interface RedirectDao {
- /**
- * Check for redirect existence.
- *
- * @param key Redirect key
- *
- * @return True if redirect exists
- */
- boolean containsKey(String key);
+ /**
+ * Check for redirect existence.
+ *
+ * @param key Redirect key
+ *
+ * @return True if redirect exists
+ */
+ boolean containsKey(String key);
- /**
- * Count redirects in a group.
- *
- * @param groupId the group to query
- *
- * @return count of redirects in group
- */
- int countRedirectsWithGroup(String groupId);
+ /**
+ * Count redirects in a group.
+ *
+ * @param groupId the group to query
+ *
+ * @return count of redirects in group
+ */
+ int countRedirectsWithGroup(String groupId);
- /**
- * Delete all expired redirects.
- *
- * @return number of redirects deleted
- */
- int deleteExpired();
+ /**
+ * Delete all expired redirects.
+ *
+ * @return number of redirects deleted
+ */
+ int deleteExpired();
- /**
- * Add redirect.
- *
- * @param key Redirect key
- *
- * @param r Redirect to add
- */
- void put(String key, Redirect r);
+ /**
+ * Add redirect.
+ *
+ * @param key Redirect key
+ *
+ * @param r Redirect to add
+ */
+ void put(String key, Redirect r);
- /**
- * Delete and return specified redirect.
- *
- * @param key Redirect key
- *
- * @return the redirect that was deleted or null
- */
- Redirect remove(String key);
+ /**
+ * Delete and return specified redirect.
+ *
+ * @param key Redirect key
+ *
+ * @return the redirect that was deleted or null
+ */
+ Redirect remove(String key);
}
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/ServiceDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/ServiceDao.java
index 0933ae8d3..77ba25f21 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/ServiceDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/ServiceDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.ServiceEntity;
@@ -24,24 +20,23 @@
public interface ServiceDao {
- void insert(ServiceEntity service);
+ void insert(ServiceEntity service);
- void insert(ServiceOverrideEntity service);
+ void insert(ServiceOverrideEntity service);
- ServiceEntity get(String identifier);
+ ServiceEntity get(String identifier);
- void update(ServiceEntity service);
+ void update(ServiceEntity service);
- void update(ServiceOverrideEntity service);
+ void update(ServiceOverrideEntity service);
- void delete(ServiceOverrideEntity service);
+ void delete(ServiceOverrideEntity service);
- void delete(ServiceEntity service);
+ void delete(ServiceEntity service);
- ServiceOverrideEntity getOverride(String id);
+ ServiceOverrideEntity getOverride(String id);
- ServiceOverrideEntity getOverride(String id, String show);
+ ServiceOverrideEntity getOverride(String id, String show);
- boolean isOverridden(String service, String show);
+ boolean isOverridden(String service, String show);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/ShowDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/ShowDao.java
index b12c0b097..709bb5582 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/ShowDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/ShowDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.HostInterface;
@@ -28,129 +24,124 @@
*/
public interface ShowDao {
- /**
- * find show detail by name
- *
- * @param name
- * @return ShowDetail
- */
- ShowEntity findShowDetail(String name);
-
- /**
- * get show detail from its unique id
- *
- * @param id
- * @return ShowDetail
- */
- ShowEntity getShowDetail(String id);
-
- /**
- * Get show detail from its preferred show.
- *
- * @param id
- * @return ShowDetail
- */
- ShowEntity getShowDetail(HostInterface host);
-
- /**
- * create a show from ShowDetail
- *
- * @param show
- */
- void insertShow(ShowEntity show);
-
- /**
- * return true if show exists, false if not
- *
- * @param name
- * @return boolean
- */
- boolean showExists(String name);
-
- /**
- *
- * @param s
- * @param val
- */
- void updateShowDefaultMinCores(ShowInterface s, int val);
-
- /**
- *
- * @param s
- * @param val
- */
- void updateShowDefaultMaxCores(ShowInterface s, int val);
-
- /**
- *
- * @param s
- * @param val
- */
- void updateShowDefaultMinGpus(ShowInterface s, int val);
-
- /**
- *
- * @param s
- * @param val
- */
- void updateShowDefaultMaxGpus(ShowInterface s, int val);
-
-
- /**
- * Disabling this would stop new proc assignement. The show would get no new
- * procs, but any procs already assigned to a job would continue to
- * dispatch.
- *
- * @param s
- * @param enabled
- */
- void updateBookingEnabled(ShowInterface s, boolean enabled);
-
- /**
- * Disabling dispatching would unbook each proc after it had completed a
- * frame.
- *
- * @param s
- * @param enabled
- */
- void updateDispatchingEnabled(ShowInterface s, boolean enabled);
-
- /**
- * Deletes a show if no data has been added to it.
- *
- * @param s
- */
- void delete(ShowInterface s);
-
- /**
- * Updates the show frame counter. This counts all failed succceeded frames,
- * forver.
- *
- * @param s
- * @param exitStatus
- */
- void updateFrameCounters(ShowInterface s, int exitStatus);
-
- /**
- * Set the enabled status of a show to true/false.
- *
- * @param s
- * @param enabled
- */
- void updateActive(ShowInterface s, boolean enabled);
-
- /**
- * An array of email addresses for which all job comments are echoed to.
- *
- * @param s
- * @param emails
- */
- void updateShowCommentEmail(ShowInterface s, String[] emails);
-
- /**
- * Scheduled task to update shows. Set show as inactive if it has at
- * least 1 job in job_history service th
- */
- void updateShowsStatus();
+ /**
+ * find show detail by name
+ *
+ * @param name
+ * @return ShowDetail
+ */
+ ShowEntity findShowDetail(String name);
+
+ /**
+ * get show detail from its unique id
+ *
+ * @param id
+ * @return ShowDetail
+ */
+ ShowEntity getShowDetail(String id);
+
+ /**
+ * Get show detail from its preferred show.
+ *
+ * @param id
+ * @return ShowDetail
+ */
+ ShowEntity getShowDetail(HostInterface host);
+
+ /**
+ * create a show from ShowDetail
+ *
+ * @param show
+ */
+ void insertShow(ShowEntity show);
+
+ /**
+ * return true if show exists, false if not
+ *
+ * @param name
+ * @return boolean
+ */
+ boolean showExists(String name);
+
+ /**
+ *
+ * @param s
+ * @param val
+ */
+ void updateShowDefaultMinCores(ShowInterface s, int val);
+
+ /**
+ *
+ * @param s
+ * @param val
+ */
+ void updateShowDefaultMaxCores(ShowInterface s, int val);
+
+ /**
+ *
+ * @param s
+ * @param val
+ */
+ void updateShowDefaultMinGpus(ShowInterface s, int val);
+
+ /**
+ *
+ * @param s
+ * @param val
+ */
+ void updateShowDefaultMaxGpus(ShowInterface s, int val);
+
+ /**
+ * Disabling this would stop new proc assignement. The show would get no new procs, but any procs
+ * already assigned to a job would continue to dispatch.
+ *
+ * @param s
+ * @param enabled
+ */
+ void updateBookingEnabled(ShowInterface s, boolean enabled);
+
+ /**
+ * Disabling dispatching would unbook each proc after it had completed a frame.
+ *
+ * @param s
+ * @param enabled
+ */
+ void updateDispatchingEnabled(ShowInterface s, boolean enabled);
+
+ /**
+ * Deletes a show if no data has been added to it.
+ *
+ * @param s
+ */
+ void delete(ShowInterface s);
+
+ /**
+ * Updates the show frame counter. This counts all failed succceeded frames, forver.
+ *
+ * @param s
+ * @param exitStatus
+ */
+ void updateFrameCounters(ShowInterface s, int exitStatus);
+
+ /**
+ * Set the enabled status of a show to true/false.
+ *
+ * @param s
+ * @param enabled
+ */
+ void updateActive(ShowInterface s, boolean enabled);
+
+ /**
+ * An array of email addresses for which all job comments are echoed to.
+ *
+ * @param s
+ * @param emails
+ */
+ void updateShowCommentEmail(ShowInterface s, String[] emails);
+
+ /**
+ * Scheduled task to update shows. Set show as inactive if it has at least 1 job in job_history
+ * service th
+ */
+ void updateShowsStatus();
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/SubscriptionDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/SubscriptionDao.java
index d0fe43eb7..ffc083d7d 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/SubscriptionDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/SubscriptionDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.AllocationInterface;
@@ -27,100 +23,95 @@
public interface SubscriptionDao {
- /**
- * returns true if the subscription has running procs
- *
- * @param sub SubscriptionInterface
- * @return boolean
- */
- boolean hasRunningProcs(SubscriptionInterface sub);
-
- /**
- * Return true if the given show is at or over its size value for the given
- * allocation.
- *
- * @param show ShowInterface
- * @param alloc AllocationInterface
- * @return boolean
- */
- boolean isShowAtOrOverSize(ShowInterface show, AllocationInterface alloc);
-
- /**
- * Return true if the given show is over its size value for the given
- * allocation.
- *
- * @param show ShowInterface
- * @param alloc AllocationInterface
- * @return boolean
- */
- boolean isShowOverSize(ShowInterface show, AllocationInterface alloc);
-
- /**
- * Return true if adding the given coreUnits would put the show over its
- * burst value for the given allocation.
- *
- * @param show ShowInterface
- * @param alloc AllocationInterface
- * @param coreUnits int
- * @return boolean
- */
- boolean isShowOverBurst(ShowInterface show, AllocationInterface alloc, int coreUnits);
-
- /**
- * Return true if the given show is at or over its burst value for the given
- * allocation.
- *
- * @param show ShowInterface
- * @param alloc AllocationInterface
- * @return boolean
- */
- boolean isShowAtOrOverBurst(ShowInterface show, AllocationInterface alloc);
-
- /**
- * Return true if the show that is utilizing the given proc has exceeded its
- * burst.
- *
- * @param proc VirtualProc
- * @return boolean
- */
- boolean isShowOverSize(VirtualProc proc);
-
- /**
- * Return a SubscriptionDetail from its unique id
- *
- * @param id String
- * @return SubscriptionEntity
- */
- SubscriptionEntity getSubscriptionDetail(String id);
-
- /**
- * Insert a new subscription
- *
- * @param detail SubscriptionEntity
- */
- void insertSubscription(SubscriptionEntity detail);
-
- /**
- * Delete specified subscription
- *
- * @param sub SubscriptionInterface
- */
- void deleteSubscription(SubscriptionInterface sub);
-
- /**
- * update the size of a subscription
- *
- * @param sub SubscriptionInterface
- * @param size int
- */
- void updateSubscriptionSize(SubscriptionInterface sub, int size);
-
- /**
- * update the subscription burst
- *
- * @param sub SubscriptionInterface
- * @param size int
- */
- void updateSubscriptionBurst(SubscriptionInterface sub, int size);
+ /**
+ * returns true if the subscription has running procs
+ *
+ * @param sub SubscriptionInterface
+ * @return boolean
+ */
+ boolean hasRunningProcs(SubscriptionInterface sub);
+
+ /**
+ * Return true if the given show is at or over its size value for the given allocation.
+ *
+ * @param show ShowInterface
+ * @param alloc AllocationInterface
+ * @return boolean
+ */
+ boolean isShowAtOrOverSize(ShowInterface show, AllocationInterface alloc);
+
+ /**
+ * Return true if the given show is over its size value for the given allocation.
+ *
+ * @param show ShowInterface
+ * @param alloc AllocationInterface
+ * @return boolean
+ */
+ boolean isShowOverSize(ShowInterface show, AllocationInterface alloc);
+
+ /**
+ * Return true if adding the given coreUnits would put the show over its burst value for the given
+ * allocation.
+ *
+ * @param show ShowInterface
+ * @param alloc AllocationInterface
+ * @param coreUnits int
+ * @return boolean
+ */
+ boolean isShowOverBurst(ShowInterface show, AllocationInterface alloc, int coreUnits);
+
+ /**
+ * Return true if the given show is at or over its burst value for the given allocation.
+ *
+ * @param show ShowInterface
+ * @param alloc AllocationInterface
+ * @return boolean
+ */
+ boolean isShowAtOrOverBurst(ShowInterface show, AllocationInterface alloc);
+
+ /**
+ * Return true if the show that is utilizing the given proc has exceeded its burst.
+ *
+ * @param proc VirtualProc
+ * @return boolean
+ */
+ boolean isShowOverSize(VirtualProc proc);
+
+ /**
+ * Return a SubscriptionDetail from its unique id
+ *
+ * @param id String
+ * @return SubscriptionEntity
+ */
+ SubscriptionEntity getSubscriptionDetail(String id);
+
+ /**
+ * Insert a new subscription
+ *
+ * @param detail SubscriptionEntity
+ */
+ void insertSubscription(SubscriptionEntity detail);
+
+ /**
+ * Delete specified subscription
+ *
+ * @param sub SubscriptionInterface
+ */
+ void deleteSubscription(SubscriptionInterface sub);
+
+ /**
+ * update the size of a subscription
+ *
+ * @param sub SubscriptionInterface
+ * @param size int
+ */
+ void updateSubscriptionSize(SubscriptionInterface sub, int size);
+
+ /**
+ * update the subscription burst
+ *
+ * @param sub SubscriptionInterface
+ * @param size int
+ */
+ void updateSubscriptionBurst(SubscriptionInterface sub, int size);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/TaskDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/TaskDao.java
index 20a4f72cd..d7a3d5e00 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/TaskDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/TaskDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import com.imageworks.spcue.DepartmentInterface;
@@ -28,104 +24,102 @@
public interface TaskDao {
- /**
- * Delete all tasks for the specified dept config
- *
- * @param d
- */
- void deleteTasks(PointInterface cdept);
-
- /**
- * Delete all tasks for the specified show and dept
- *
- * @param d
- */
- void deleteTasks(ShowInterface show, DepartmentInterface dept);
-
- /**
- * Inserts a new task. A task is a shot based department priority.
- *
- * @param task
- */
- void insertTask(TaskEntity task);
-
- /**
- * Remove specified task.
- *
- * @param task
- */
- void deleteTask(TaskInterface task);
-
- /**
- * Returns a task from its unique id
- *
- * @param id
- */
- TaskEntity getTaskDetail(String id);
-
- /**
- * Returns a job's task representation
- *
- * @param j
- * @return
- */
- TaskEntity getTaskDetail(JobInterface j);
-
- /**
- * Updates the specified tasks min procs
- *
- * @param t
- * @param value
- */
- void updateTaskMinCores(TaskInterface t, int value);
-
- /**
- * Inserts a task if if does not exist, otherwise its updated.
- *
- * @param t
- */
- void mergeTask(TaskEntity t);
-
- /**
- * Returns true if the task is ti-managed.
- */
- boolean isManaged(TaskInterface t);
-
- /**
- * Adjusts the specified task's min cores to value. Only use adjust when the
- * task is managed.
- *
- * @param t
- * @param value
- */
- void adjustTaskMinCores(TaskInterface t, int value);
-
- /**
- *
- * @param cdept
- */
- void clearTaskAdjustments(PointInterface cdept);
-
- /**
- *
- * @param t
- */
- void clearTaskAdjustment(TaskInterface t);
-
- /**
- * Returns a TaskDetail from a department id and shot name.
- *
- * @param d
- * @param shot
- * @return
- */
- TaskEntity getTaskDetail(DepartmentInterface d, String shot);
-
- /**
- * Returns true if the specified job is being managed by a task.
- *
- * @param Job
- */
- boolean isManaged(JobInterface j);
+ /**
+ * Delete all tasks for the specified dept config
+ *
+ * @param d
+ */
+ void deleteTasks(PointInterface cdept);
+
+ /**
+ * Delete all tasks for the specified show and dept
+ *
+ * @param d
+ */
+ void deleteTasks(ShowInterface show, DepartmentInterface dept);
+
+ /**
+ * Inserts a new task. A task is a shot based department priority.
+ *
+ * @param task
+ */
+ void insertTask(TaskEntity task);
+
+ /**
+ * Remove specified task.
+ *
+ * @param task
+ */
+ void deleteTask(TaskInterface task);
+
+ /**
+ * Returns a task from its unique id
+ *
+ * @param id
+ */
+ TaskEntity getTaskDetail(String id);
+
+ /**
+ * Returns a job's task representation
+ *
+ * @param j
+ * @return
+ */
+ TaskEntity getTaskDetail(JobInterface j);
+
+ /**
+ * Updates the specified tasks min procs
+ *
+ * @param t
+ * @param value
+ */
+ void updateTaskMinCores(TaskInterface t, int value);
+
+ /**
+ * Inserts a task if if does not exist, otherwise its updated.
+ *
+ * @param t
+ */
+ void mergeTask(TaskEntity t);
+
+ /**
+ * Returns true if the task is ti-managed.
+ */
+ boolean isManaged(TaskInterface t);
+
+ /**
+ * Adjusts the specified task's min cores to value. Only use adjust when the task is managed.
+ *
+ * @param t
+ * @param value
+ */
+ void adjustTaskMinCores(TaskInterface t, int value);
+
+ /**
+ *
+ * @param cdept
+ */
+ void clearTaskAdjustments(PointInterface cdept);
+
+ /**
+ *
+ * @param t
+ */
+ void clearTaskAdjustment(TaskInterface t);
+
+ /**
+ * Returns a TaskDetail from a department id and shot name.
+ *
+ * @param d
+ * @param shot
+ * @return
+ */
+ TaskEntity getTaskDetail(DepartmentInterface d, String shot);
+
+ /**
+ * Returns true if the specified job is being managed by a task.
+ *
+ * @param Job
+ */
+ boolean isManaged(JobInterface j);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/TrackitDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/TrackitDao.java
index 19c0e2784..545b87be5 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/TrackitDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/TrackitDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -25,15 +21,14 @@
public interface TrackitDao {
- /**
- * Downloads a list of all tasks for the specified department
- * and inserts them into the Task table.
- *
- * @param show
- * @param department
- * @return
- */
- List getTasks(String show, String dept);
+ /**
+ * Downloads a list of all tasks for the specified department and inserts them into the Task
+ * table.
+ *
+ * @param show
+ * @param department
+ * @return
+ */
+ List getTasks(String show, String dept);
}
-
diff --git a/cuebot/src/main/java/com/imageworks/spcue/dao/WhiteboardDao.java b/cuebot/src/main/java/com/imageworks/spcue/dao/WhiteboardDao.java
index f01709f0c..8b1f83ec2 100644
--- a/cuebot/src/main/java/com/imageworks/spcue/dao/WhiteboardDao.java
+++ b/cuebot/src/main/java/com/imageworks/spcue/dao/WhiteboardDao.java
@@ -2,21 +2,17 @@
/*
* Copyright Contributors to the OpenCue Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
-
-
package com.imageworks.spcue.dao;
import java.util.List;
@@ -91,614 +87,610 @@
*/
public interface WhiteboardDao {
- /**
- * Returns a list of hosts
- *
- * @param h HostInterface
- * @return ProcSeq
- */
- ProcSeq getProcs(HostInterface h);
-
- /**
- * Returns a list of hosts
- *
- * @param r HostSearchInterface
- * @return HostSeq
- */
- HostSeq getHosts(HostSearchInterface r);
-
- /**
- * Returns a list of jobs
- *
- * @param r JobSearchInterface
- * @return JobSeq
- */
- JobSeq getJobs(JobSearchInterface r);
-
- /**
- * Returns a list of job names
- *
- * @param r JobSearchInterface
- * @return List of Strings
- */
-
- List getJobNames(JobSearchInterface r);
-
- /**
- * Returns the comments for the specified job
- *
- * @param j JobInterface
- * @return CommentSeq
- */
- CommentSeq getComments(JobInterface j);
-
- /**
- * Returns the comments for the specified host
- *
- * @param h HostInterface
- * @return CommentSeq
- */
- CommentSeq getComments(HostInterface h);
-
- /**
- * returns the host a proc is part of
- *
- * @param id String
- * @return Host
- */
- Host getHost(String id);
-
- /**
- * returns the host by name
- *
- * @param name String
- * @return Host
- */
- Host findHost(String name);
-
- /**
- * Return a dependency by its unique id
- *
- * @param id String
- * @return Depend
- */
- Depend getDepend(String id);
-
- /**
- * Returns a list of all dependencies this job is involved with.
- *
- * @param job JobInterface
- * @return DependSeq
- */
- DependSeq getDepends(JobInterface job);
-
- /**
- * Returns an array of depends that depend on the specified job.
- *
- * @param job JobInterface
- * @return DependSeq
- */
- DependSeq getWhatDependsOnThis(JobInterface job);
-
- /**
- * Returns an array of depends that depend on the specified layer.
- *
- * @param layer LayerInterface
- * @return DependSeq
- */
- DependSeq getWhatDependsOnThis(LayerInterface layer);
-
- /**
- * Returns an array of depends that depend on the specified job.
- *
- * @param frame FrameInterface
- * @return DependSeq
- */
- DependSeq getWhatDependsOnThis(FrameInterface frame);
-
- /**
- * Returns an array of depends that the specified job is waiting on.
- *
- * @param job JobInterface
- * @return DependSeq
- */
- DependSeq getWhatThisDependsOn(JobInterface job);
-
- /**
- * Returns an array of depends that the specified layer is waiting on.
- *
- * @param layer LayerInterface
- * @return DependSeq
- */
- DependSeq getWhatThisDependsOn(LayerInterface layer);
-
- /**
- * Returns an array of depends that the specified frame is waiting on.
- *
- * @param frame FrameInterface
- * @return DependSeq
- */
- DependSeq getWhatThisDependsOn(FrameInterface frame);
-
- /**
- * Returns the specified dependency
- *
- * @param depend DependInterface
- * @return Depend
- */
- Depend getDepend(DependInterface depend);
-
- Filter findFilter(String show, String name);
-
- Filter findFilter(ShowInterface show, String name);
-
- Filter getFilter(FilterInterface filter);
-
- MatcherSeq getMatchers(FilterInterface filter);
-
- Matcher getMatcher(MatcherInterface matcher);
-
- ActionSeq getActions(FilterInterface filter);
-
- Action getAction(ActionInterface action);
-
- /**
- * Returns the frame by unique ID
- *
- * @param id String
- * @return Frame
- */
- Frame getFrame(String id);
-
- /**
- * Returns a list of filters by show
- *
- * @param show ShowInterface
- * @return FilterSeq
- */
-
- FilterSeq getFilters(ShowInterface show);
-
- /**
- * Frame search
- *
- * @param r FrameSearchInterface
- * @return FrameSeq
- */
- FrameSeq getFrames(FrameSearchInterface r);
-
- /**
- * Returns a list of layers for the specified job.
- *
- * @param job JobInterface
- * @return LayerSeq
- */
- LayerSeq getLayers(JobInterface job);
-
- /**
- * Returns a layer from its unique ID
- *
- * @param id String
- * @return Layer
- */
- Layer getLayer(String id);
-
- /**
- * Returns a list of limits for the specified layer.
- *
- * @param id String
- * @return Layer
- */
- List getLimits(LayerInterface layer);
-
- /**
- *
- * @param group GroupInterface
- * @return JobSeq
- */
- JobSeq getJobs(GroupInterface group);
-
- /**
- * Finds an active job record based on the name
- *
- * @param name String
- * @return Job
- */
- Job findJob(String name);
-
- /**
- * Gets an active job based on the Id
- *
- * @param id String
- * @return Job
- */
- Job getJob(String id);
-
- /**
- * returns a subscription by its id
- *
- * @return Subscription
- */
- Subscription getSubscription(String id);
-
- /**
- * Find subscription using the show, facility, and alloc name.
- *
- * @param show String
- * @param alloc String
- * @return Subscription
- */
- Subscription findSubscription(String show, String alloc);
-
- /**
- * returns a list of subscriptions
- *
- * @param show ShowInterface
- * @return SubscriptionSeq
- */
- SubscriptionSeq getSubscriptions(ShowInterface show);
-
- /**
- * returns all subscriptions on the specified allocation
- *
- * @param alloc AllocationInterface
- * @return SubscriptionSeq
- */
- SubscriptionSeq getSubscriptions(AllocationInterface alloc);
-
- /**
- * returns a show by Id.
- *
- * @param id String
- * @return Show
- */
- Show getShow(String id);
-
- /**
- * returns a show by its name.
- *
- * @param name String
- * @return Show
- */
- Show findShow(String name);
-
- /**
- *
- * return a list of shows from a whiteboard request
- *
- * @return ShowSeq
- */
- ShowSeq getShows();
-
- /**
- * returns an allocation by Id.
- *
- * @param id String
- * @return Allocation
- */
- Allocation getAllocation(String id);
-
- /**
- * returns a show by its name.
- *
- * @param name String
- * @return Allocation
- */
- Allocation findAllocation(String name);
-
- /**
- *
- * return the current list of allocations
- *
- * @return List of Allocations
- */
- AllocationSeq getAllocations();
-
- /**
- *
- * return the current list of allocations
- *
- * @param facility FacilityInterface
- * @return List of Allocations
- */
- AllocationSeq getAllocations(FacilityInterface facility);
-
-
- /**
- *
- * @param show ShowInterface
- * @return Group
- */
- Group getRootGroup(ShowInterface show);
-
- /**
- *
- * @param id String
- * @return Group
- */
- Group getGroup(String id);
-
- /**
- * Finds a group by show name and group name
- *
- * @param show String
- * @param group String
- * @return Group
- */
- Group findGroup(String show, String group);
-
- /**
- *
- *
- * @param show ShowInterface
- * @return GroupSeq
- */
- GroupSeq getGroups(ShowInterface show);
-
- /**
- *
- * @param group GroupInterface
- * @return GroupSeq
- */
- GroupSeq getGroups(GroupInterface group);
-
-
- /**
- *
- * @param job String
- * @param layer String
- * @return Layer
- */
- Layer findLayer(String job, String layer);
-
- /**
- *
- * @param job String
- * @param layer String
- * @param frame int
- * @return Frame
- */
- Frame findFrame(String job, String layer, int frame);
-
-
- /**
- * returns an UpdatedFrameCheckResult which contains an array of updated frames.
- *
- * @param job JobInterface
- * @param layers List of LayerInterfaces
- * @param lastUpdate int
- * @return UpdatedFrameCheckResult
- */
- UpdatedFrameCheckResult getUpdatedFrames(JobInterface job,
- List layers, int lastUpdate);
-
- /**
- *
- * @param show ShowInterface
- * @return DepartmentSeq
- */
- DepartmentSeq getDepartments (ShowInterface show);
-
- /**
- *
- * @param show ShowInterface
- * @param name String
- * @return Department
- */
- Department getDepartment(ShowInterface show, String name);
-
- /**
- * Returns a list of available department names
- *
- * @return List of Strings
- */
- List getDepartmentNames();
-
- /**
- *
- * @param show ShowInterface
- * @param dept DepartmentInterface
- * @param shot String
- * @return Task
- */
- Task getTask(ShowInterface show, DepartmentInterface dept, String shot);
-
- /**
- *
- * @param show ShowInterface
- * @param dept DepartmentInterface
- * @return List of Tasks
- */
- TaskSeq getTasks(ShowInterface show, DepartmentInterface dept);
-
- /**
- * Returns procs from a ProcSearchInterface criteria.
- *
- * @param p ProcSearchInterface
- * @return ProcSeq
- */
- ProcSeq getProcs(ProcSearchInterface p);
-
- /**
- * Return the grpc representation of the given AbstractDepend.
- *
- * @param depend AbstractDepend
- * @return Depend
- */
- Depend getDepend(AbstractDepend depend);
-
- /**
- * Return the Host record for the given Deed.
- *
- * @param deed DeedEntity
- * @return Host
- */
- Host getHost(DeedEntity deed);
-
- /**
- * Return the Owner of the given Deed.
- *
- * @param deed DeedEntity
- * @return Owner
- */
- Owner getOwner(DeedEntity deed);
-
- /**
- * Return a list of all Deeds controlled by the given Owner.
- *
- * @param owner OwnerEntity
- * @return DeedSeq
- */
- DeedSeq getDeeds(OwnerEntity owner);
-
- /**
- * Return a list of all Hosts controlled by the given Owner.
- *
- * @param owner OwnerEntity
- * @return HostSeq
- */
- HostSeq getHosts(OwnerEntity owner);
-
- /**
- * Return the Owner of the given host.
- *
- * @param host HostInterface
- * @return Owner
- */
- Owner getOwner(HostInterface host);
-
- /**
- * Return the Deed for the given Host.
- *
- * @param host HostInterface
- * @return Deed
- */
- Deed getDeed(HostInterface host);
-
- /**
- * Return the owner by name.
- *
- * @param name String
- * @return Owner
- */
- Owner getOwner(String name);
-
- /**
- * Return a list of owners by show.
- *
- * @param show ShowInterface
- * @return List of Owners
- */
- List getOwners(ShowInterface show);
-
- /**
- * Return a list of Deeds by show.
- *
- * @param show ShowInterface
- * @return DeedSeq
- */
- DeedSeq getDeeds(ShowInterface show);
-
- /**
- * Return a RenderPartion from its associated LocalHostAssignment.
- *
- * @param l LocalHostAssignment
- * @return RenderPartition
- */
- RenderPartition getRenderPartition(LocalHostAssignment l);
-
- /**
- * Return a list or RenderPartition for the given Host.
- *
- * @param host HostInterface
- * @return RenderPartitionSeq
- */
- RenderPartitionSeq getRenderPartitions(HostInterface host);
-
- /**
- * Return a facility by name or id.
- *
- * @param name String
- * @return Facility
- */
- Facility getFacility(String name);
-
- /**
- * Return the full list of facilities.
- *
- * @return List of Facilities
- */
- FacilitySeq getFacilities();
-
- /**
- * Return a list of all active shows.
- *
- * @return ShowSeq
- */
- ShowSeq getActiveShows();
-
- /**
- * Return the given service.
- *
- * @param id String
- * @return Service
- */
- Service getService(String id);
-
- /**
- * Return the list of cluster wide service defaults.
- *
- * @return ServiceSeq
- */
- ServiceSeq getDefaultServices();
-
- /**
- * Return the list of service overrides for a particular show.
- *
- * @param show ShowInterface
- * @return List of ServiceOverrides
- */
- ServiceOverrideSeq getServiceOverrides(ShowInterface show);
-
- /**
- * Return the given show override.
- *
- * @param show ShowInterface
- * @param name String
- * @return ServiceOverride
- */
- ServiceOverride getServiceOverride(ShowInterface show, String name);
-
- /**
- * Find a service by name.
- *
- * @param name String
- * @return Service
- */
- Service findService(String name);
-
- /**
- * Find a limit by name.
- *
- * @param name String
- * @return Service
- */
- Limit findLimit(String name);
-
- /**
- * Return a service by ID.
- *
- * @param id String
- * @return Limit
- */
- Limit getLimit(String id);
-
- /**
- * Returns a list of all limits.
- *
- * @param id String
- * @return Layer
- */
- List