You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2017/05/16 15:50:34 UTC
[45/50] [abbrv] airavata git commit: making database level changes
for supporting custom node/cpu/walltime configurations
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
index 36f1d9d..f3f6042 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
@@ -96,7 +96,8 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
private static final org.apache.thrift.protocol.TField DEFAULT_QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultQueueName", org.apache.thrift.protocol.TType.STRING, (short)13);
private static final org.apache.thrift.protocol.TField DEFAULT_NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultNodeCount", org.apache.thrift.protocol.TType.I32, (short)14);
private static final org.apache.thrift.protocol.TField DEFAULT_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultCPUCount", org.apache.thrift.protocol.TType.I32, (short)15);
- private static final org.apache.thrift.protocol.TField EDITABLE_BY_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("editableByUser", org.apache.thrift.protocol.TType.BOOL, (short)16);
+ private static final org.apache.thrift.protocol.TField DEFAULT_WALLTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultWalltime", org.apache.thrift.protocol.TType.I32, (short)16);
+ private static final org.apache.thrift.protocol.TField EDITABLE_BY_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("editableByUser", org.apache.thrift.protocol.TType.BOOL, (short)17);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -119,6 +120,7 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
private String defaultQueueName; // optional
private int defaultNodeCount; // optional
private int defaultCPUCount; // optional
+ private int defaultWalltime; // optional
private boolean editableByUser; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -142,7 +144,8 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
DEFAULT_QUEUE_NAME((short)13, "defaultQueueName"),
DEFAULT_NODE_COUNT((short)14, "defaultNodeCount"),
DEFAULT_CPUCOUNT((short)15, "defaultCPUCount"),
- EDITABLE_BY_USER((short)16, "editableByUser");
+ DEFAULT_WALLTIME((short)16, "defaultWalltime"),
+ EDITABLE_BY_USER((short)17, "editableByUser");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -187,7 +190,9 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
return DEFAULT_NODE_COUNT;
case 15: // DEFAULT_CPUCOUNT
return DEFAULT_CPUCOUNT;
- case 16: // EDITABLE_BY_USER
+ case 16: // DEFAULT_WALLTIME
+ return DEFAULT_WALLTIME;
+ case 17: // EDITABLE_BY_USER
return EDITABLE_BY_USER;
default:
return null;
@@ -231,9 +236,10 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
// isset id assignments
private static final int __DEFAULTNODECOUNT_ISSET_ID = 0;
private static final int __DEFAULTCPUCOUNT_ISSET_ID = 1;
- private static final int __EDITABLEBYUSER_ISSET_ID = 2;
+ private static final int __DEFAULTWALLTIME_ISSET_ID = 2;
+ private static final int __EDITABLEBYUSER_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS,_Fields.DEFAULT_QUEUE_NAME,_Fields.DEFAULT_NODE_COUNT,_Fields.DEFAULT_CPUCOUNT,_Fields.EDITABLE_BY_USER};
+ private static final _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS,_Fields.DEFAULT_QUEUE_NAME,_Fields.DEFAULT_NODE_COUNT,_Fields.DEFAULT_CPUCOUNT,_Fields.DEFAULT_WALLTIME,_Fields.EDITABLE_BY_USER};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -273,6 +279,8 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DEFAULT_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.DEFAULT_WALLTIME, new org.apache.thrift.meta_data.FieldMetaData("defaultWalltime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.EDITABLE_BY_USER, new org.apache.thrift.meta_data.FieldMetaData("editableByUser", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -371,6 +379,7 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
}
this.defaultNodeCount = other.defaultNodeCount;
this.defaultCPUCount = other.defaultCPUCount;
+ this.defaultWalltime = other.defaultWalltime;
this.editableByUser = other.editableByUser;
}
@@ -399,6 +408,8 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
this.defaultNodeCount = 0;
setDefaultCPUCountIsSet(false);
this.defaultCPUCount = 0;
+ setDefaultWalltimeIsSet(false);
+ this.defaultWalltime = 0;
setEditableByUserIsSet(false);
this.editableByUser = false;
}
@@ -844,6 +855,28 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID, value);
}
+ public int getDefaultWalltime() {
+ return this.defaultWalltime;
+ }
+
+ public void setDefaultWalltime(int defaultWalltime) {
+ this.defaultWalltime = defaultWalltime;
+ setDefaultWalltimeIsSet(true);
+ }
+
+ public void unsetDefaultWalltime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID);
+ }
+
+ /** Returns true if field defaultWalltime is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultWalltime() {
+ return EncodingUtils.testBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID);
+ }
+
+ public void setDefaultWalltimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID, value);
+ }
+
public boolean isEditableByUser() {
return this.editableByUser;
}
@@ -988,6 +1021,14 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
}
break;
+ case DEFAULT_WALLTIME:
+ if (value == null) {
+ unsetDefaultWalltime();
+ } else {
+ setDefaultWalltime((Integer)value);
+ }
+ break;
+
case EDITABLE_BY_USER:
if (value == null) {
unsetEditableByUser();
@@ -1046,6 +1087,9 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
case DEFAULT_CPUCOUNT:
return getDefaultCPUCount();
+ case DEFAULT_WALLTIME:
+ return getDefaultWalltime();
+
case EDITABLE_BY_USER:
return isEditableByUser();
@@ -1090,6 +1134,8 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
return isSetDefaultNodeCount();
case DEFAULT_CPUCOUNT:
return isSetDefaultCPUCount();
+ case DEFAULT_WALLTIME:
+ return isSetDefaultWalltime();
case EDITABLE_BY_USER:
return isSetEditableByUser();
}
@@ -1244,6 +1290,15 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
return false;
}
+ boolean this_present_defaultWalltime = true && this.isSetDefaultWalltime();
+ boolean that_present_defaultWalltime = true && that.isSetDefaultWalltime();
+ if (this_present_defaultWalltime || that_present_defaultWalltime) {
+ if (!(this_present_defaultWalltime && that_present_defaultWalltime))
+ return false;
+ if (this.defaultWalltime != that.defaultWalltime)
+ return false;
+ }
+
boolean this_present_editableByUser = true && this.isSetEditableByUser();
boolean that_present_editableByUser = true && that.isSetEditableByUser();
if (this_present_editableByUser || that_present_editableByUser) {
@@ -1335,6 +1390,11 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
if (present_defaultCPUCount)
list.add(defaultCPUCount);
+ boolean present_defaultWalltime = true && (isSetDefaultWalltime());
+ list.add(present_defaultWalltime);
+ if (present_defaultWalltime)
+ list.add(defaultWalltime);
+
boolean present_editableByUser = true && (isSetEditableByUser());
list.add(present_editableByUser);
if (present_editableByUser)
@@ -1501,6 +1561,16 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetDefaultWalltime()).compareTo(other.isSetDefaultWalltime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultWalltime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultWalltime, other.defaultWalltime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetEditableByUser()).compareTo(other.isSetEditableByUser());
if (lastComparison != 0) {
return lastComparison;
@@ -1662,6 +1732,12 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
sb.append(this.defaultCPUCount);
first = false;
}
+ if (isSetDefaultWalltime()) {
+ if (!first) sb.append(", ");
+ sb.append("defaultWalltime:");
+ sb.append(this.defaultWalltime);
+ first = false;
+ }
if (isSetEditableByUser()) {
if (!first) sb.append(", ");
sb.append("editableByUser:");
@@ -1919,7 +1995,15 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 16: // EDITABLE_BY_USER
+ case 16: // DEFAULT_WALLTIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.defaultWalltime = iprot.readI32();
+ struct.setDefaultWalltimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // EDITABLE_BY_USER
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.editableByUser = iprot.readBool();
struct.setEditableByUserIsSet(true);
@@ -2073,6 +2157,11 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
oprot.writeI32(struct.defaultCPUCount);
oprot.writeFieldEnd();
}
+ if (struct.isSetDefaultWalltime()) {
+ oprot.writeFieldBegin(DEFAULT_WALLTIME_FIELD_DESC);
+ oprot.writeI32(struct.defaultWalltime);
+ oprot.writeFieldEnd();
+ }
if (struct.isSetEditableByUser()) {
oprot.writeFieldBegin(EDITABLE_BY_USER_FIELD_DESC);
oprot.writeBool(struct.editableByUser);
@@ -2131,10 +2220,13 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
if (struct.isSetDefaultCPUCount()) {
optionals.set(9);
}
- if (struct.isSetEditableByUser()) {
+ if (struct.isSetDefaultWalltime()) {
optionals.set(10);
}
- oprot.writeBitSet(optionals, 11);
+ if (struct.isSetEditableByUser()) {
+ optionals.set(11);
+ }
+ oprot.writeBitSet(optionals, 12);
if (struct.isSetAppDeploymentDescription()) {
oprot.writeString(struct.appDeploymentDescription);
}
@@ -2201,6 +2293,9 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
if (struct.isSetDefaultCPUCount()) {
oprot.writeI32(struct.defaultCPUCount);
}
+ if (struct.isSetDefaultWalltime()) {
+ oprot.writeI32(struct.defaultWalltime);
+ }
if (struct.isSetEditableByUser()) {
oprot.writeBool(struct.editableByUser);
}
@@ -2219,7 +2314,7 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
struct.setExecutablePathIsSet(true);
struct.parallelism = org.apache.airavata.model.parallelism.ApplicationParallelismType.findByValue(iprot.readI32());
struct.setParallelismIsSet(true);
- BitSet incoming = iprot.readBitSet(11);
+ BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
struct.appDeploymentDescription = iprot.readString();
struct.setAppDeploymentDescriptionIsSet(true);
@@ -2321,6 +2416,10 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase
struct.setDefaultCPUCountIsSet(true);
}
if (incoming.get(10)) {
+ struct.defaultWalltime = iprot.readI32();
+ struct.setDefaultWalltimeIsSet(true);
+ }
+ if (incoming.get(11)) {
struct.editableByUser = iprot.readBool();
struct.setEditableByUserIsSet(true);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
index c1dd4f9..b10f8a8 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
@@ -98,6 +98,10 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
private static final org.apache.thrift.protocol.TField GATEWAY_USAGE_REPORTING_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayUsageReporting", org.apache.thrift.protocol.TType.BOOL, (short)12);
private static final org.apache.thrift.protocol.TField GATEWAY_USAGE_MODULE_LOAD_COMMAND_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayUsageModuleLoadCommand", org.apache.thrift.protocol.TType.STRING, (short)13);
private static final org.apache.thrift.protocol.TField GATEWAY_USAGE_EXECUTABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayUsageExecutable", org.apache.thrift.protocol.TType.STRING, (short)14);
+ private static final org.apache.thrift.protocol.TField CPUS_PER_NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("cpusPerNode", org.apache.thrift.protocol.TType.I32, (short)15);
+ private static final org.apache.thrift.protocol.TField DEFAULT_NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultNodeCount", org.apache.thrift.protocol.TType.I32, (short)16);
+ private static final org.apache.thrift.protocol.TField DEFAULT_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultCPUCount", org.apache.thrift.protocol.TType.I32, (short)17);
+ private static final org.apache.thrift.protocol.TField DEFAULT_WALLLTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultWallltime", org.apache.thrift.protocol.TType.I32, (short)18);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -119,6 +123,10 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
private boolean gatewayUsageReporting; // optional
private String gatewayUsageModuleLoadCommand; // optional
private String gatewayUsageExecutable; // optional
+ private int cpusPerNode; // optional
+ private int defaultNodeCount; // optional
+ private int defaultCPUCount; // optional
+ private int defaultWallltime; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -135,7 +143,11 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
MAX_MEMORY_PER_NODE((short)11, "maxMemoryPerNode"),
GATEWAY_USAGE_REPORTING((short)12, "gatewayUsageReporting"),
GATEWAY_USAGE_MODULE_LOAD_COMMAND((short)13, "gatewayUsageModuleLoadCommand"),
- GATEWAY_USAGE_EXECUTABLE((short)14, "gatewayUsageExecutable");
+ GATEWAY_USAGE_EXECUTABLE((short)14, "gatewayUsageExecutable"),
+ CPUS_PER_NODE((short)15, "cpusPerNode"),
+ DEFAULT_NODE_COUNT((short)16, "defaultNodeCount"),
+ DEFAULT_CPUCOUNT((short)17, "defaultCPUCount"),
+ DEFAULT_WALLLTIME((short)18, "defaultWallltime");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -178,6 +190,14 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
return GATEWAY_USAGE_MODULE_LOAD_COMMAND;
case 14: // GATEWAY_USAGE_EXECUTABLE
return GATEWAY_USAGE_EXECUTABLE;
+ case 15: // CPUS_PER_NODE
+ return CPUS_PER_NODE;
+ case 16: // DEFAULT_NODE_COUNT
+ return DEFAULT_NODE_COUNT;
+ case 17: // DEFAULT_CPUCOUNT
+ return DEFAULT_CPUCOUNT;
+ case 18: // DEFAULT_WALLLTIME
+ return DEFAULT_WALLLTIME;
default:
return null;
}
@@ -221,8 +241,12 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
private static final int __ENABLED_ISSET_ID = 0;
private static final int __MAXMEMORYPERNODE_ISSET_ID = 1;
private static final int __GATEWAYUSAGEREPORTING_ISSET_ID = 2;
+ private static final int __CPUSPERNODE_ISSET_ID = 3;
+ private static final int __DEFAULTNODECOUNT_ISSET_ID = 4;
+ private static final int __DEFAULTCPUCOUNT_ISSET_ID = 5;
+ private static final int __DEFAULTWALLLTIME_ISSET_ID = 6;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.HOST_ALIASES,_Fields.IP_ADDRESSES,_Fields.RESOURCE_DESCRIPTION,_Fields.ENABLED,_Fields.BATCH_QUEUES,_Fields.FILE_SYSTEMS,_Fields.JOB_SUBMISSION_INTERFACES,_Fields.DATA_MOVEMENT_INTERFACES,_Fields.MAX_MEMORY_PER_NODE,_Fields.GATEWAY_USAGE_REPORTING,_Fields.GATEWAY_USAGE_MODULE_LOAD_COMMAND,_Fields.GATEWAY_USAGE_EXECUTABLE};
+ private static final _Fields optionals[] = {_Fields.HOST_ALIASES,_Fields.IP_ADDRESSES,_Fields.RESOURCE_DESCRIPTION,_Fields.ENABLED,_Fields.BATCH_QUEUES,_Fields.FILE_SYSTEMS,_Fields.JOB_SUBMISSION_INTERFACES,_Fields.DATA_MOVEMENT_INTERFACES,_Fields.MAX_MEMORY_PER_NODE,_Fields.GATEWAY_USAGE_REPORTING,_Fields.GATEWAY_USAGE_MODULE_LOAD_COMMAND,_Fields.GATEWAY_USAGE_EXECUTABLE,_Fields.CPUS_PER_NODE,_Fields.DEFAULT_NODE_COUNT,_Fields.DEFAULT_CPUCOUNT,_Fields.DEFAULT_WALLLTIME};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -261,6 +285,14 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GATEWAY_USAGE_EXECUTABLE, new org.apache.thrift.meta_data.FieldMetaData("gatewayUsageExecutable", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CPUS_PER_NODE, new org.apache.thrift.meta_data.FieldMetaData("cpusPerNode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.DEFAULT_NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultNodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.DEFAULT_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.DEFAULT_WALLLTIME, new org.apache.thrift.meta_data.FieldMetaData("defaultWallltime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourceDescription.class, metaDataMap);
}
@@ -346,6 +378,10 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
if (other.isSetGatewayUsageExecutable()) {
this.gatewayUsageExecutable = other.gatewayUsageExecutable;
}
+ this.cpusPerNode = other.cpusPerNode;
+ this.defaultNodeCount = other.defaultNodeCount;
+ this.defaultCPUCount = other.defaultCPUCount;
+ this.defaultWallltime = other.defaultWallltime;
}
public ComputeResourceDescription deepCopy() {
@@ -372,6 +408,14 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
this.gatewayUsageReporting = false;
this.gatewayUsageModuleLoadCommand = null;
this.gatewayUsageExecutable = null;
+ setCpusPerNodeIsSet(false);
+ this.cpusPerNode = 0;
+ setDefaultNodeCountIsSet(false);
+ this.defaultNodeCount = 0;
+ setDefaultCPUCountIsSet(false);
+ this.defaultCPUCount = 0;
+ setDefaultWallltimeIsSet(false);
+ this.defaultWallltime = 0;
}
public String getComputeResourceId() {
@@ -779,6 +823,94 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
}
}
+ public int getCpusPerNode() {
+ return this.cpusPerNode;
+ }
+
+ public void setCpusPerNode(int cpusPerNode) {
+ this.cpusPerNode = cpusPerNode;
+ setCpusPerNodeIsSet(true);
+ }
+
+ public void unsetCpusPerNode() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUSPERNODE_ISSET_ID);
+ }
+
+ /** Returns true if field cpusPerNode is set (has been assigned a value) and false otherwise */
+ public boolean isSetCpusPerNode() {
+ return EncodingUtils.testBit(__isset_bitfield, __CPUSPERNODE_ISSET_ID);
+ }
+
+ public void setCpusPerNodeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUSPERNODE_ISSET_ID, value);
+ }
+
+ public int getDefaultNodeCount() {
+ return this.defaultNodeCount;
+ }
+
+ public void setDefaultNodeCount(int defaultNodeCount) {
+ this.defaultNodeCount = defaultNodeCount;
+ setDefaultNodeCountIsSet(true);
+ }
+
+ public void unsetDefaultNodeCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field defaultNodeCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultNodeCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID);
+ }
+
+ public void setDefaultNodeCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID, value);
+ }
+
+ public int getDefaultCPUCount() {
+ return this.defaultCPUCount;
+ }
+
+ public void setDefaultCPUCount(int defaultCPUCount) {
+ this.defaultCPUCount = defaultCPUCount;
+ setDefaultCPUCountIsSet(true);
+ }
+
+ public void unsetDefaultCPUCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field defaultCPUCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultCPUCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID);
+ }
+
+ public void setDefaultCPUCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID, value);
+ }
+
+ public int getDefaultWallltime() {
+ return this.defaultWallltime;
+ }
+
+ public void setDefaultWallltime(int defaultWallltime) {
+ this.defaultWallltime = defaultWallltime;
+ setDefaultWallltimeIsSet(true);
+ }
+
+ public void unsetDefaultWallltime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTWALLLTIME_ISSET_ID);
+ }
+
+ /** Returns true if field defaultWallltime is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultWallltime() {
+ return EncodingUtils.testBit(__isset_bitfield, __DEFAULTWALLLTIME_ISSET_ID);
+ }
+
+ public void setDefaultWallltimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTWALLLTIME_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case COMPUTE_RESOURCE_ID:
@@ -893,6 +1025,38 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
}
break;
+ case CPUS_PER_NODE:
+ if (value == null) {
+ unsetCpusPerNode();
+ } else {
+ setCpusPerNode((Integer)value);
+ }
+ break;
+
+ case DEFAULT_NODE_COUNT:
+ if (value == null) {
+ unsetDefaultNodeCount();
+ } else {
+ setDefaultNodeCount((Integer)value);
+ }
+ break;
+
+ case DEFAULT_CPUCOUNT:
+ if (value == null) {
+ unsetDefaultCPUCount();
+ } else {
+ setDefaultCPUCount((Integer)value);
+ }
+ break;
+
+ case DEFAULT_WALLLTIME:
+ if (value == null) {
+ unsetDefaultWallltime();
+ } else {
+ setDefaultWallltime((Integer)value);
+ }
+ break;
+
}
}
@@ -940,6 +1104,18 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
case GATEWAY_USAGE_EXECUTABLE:
return getGatewayUsageExecutable();
+ case CPUS_PER_NODE:
+ return getCpusPerNode();
+
+ case DEFAULT_NODE_COUNT:
+ return getDefaultNodeCount();
+
+ case DEFAULT_CPUCOUNT:
+ return getDefaultCPUCount();
+
+ case DEFAULT_WALLLTIME:
+ return getDefaultWallltime();
+
}
throw new IllegalStateException();
}
@@ -979,6 +1155,14 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
return isSetGatewayUsageModuleLoadCommand();
case GATEWAY_USAGE_EXECUTABLE:
return isSetGatewayUsageExecutable();
+ case CPUS_PER_NODE:
+ return isSetCpusPerNode();
+ case DEFAULT_NODE_COUNT:
+ return isSetDefaultNodeCount();
+ case DEFAULT_CPUCOUNT:
+ return isSetDefaultCPUCount();
+ case DEFAULT_WALLLTIME:
+ return isSetDefaultWallltime();
}
throw new IllegalStateException();
}
@@ -1122,6 +1306,42 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
return false;
}
+ boolean this_present_cpusPerNode = true && this.isSetCpusPerNode();
+ boolean that_present_cpusPerNode = true && that.isSetCpusPerNode();
+ if (this_present_cpusPerNode || that_present_cpusPerNode) {
+ if (!(this_present_cpusPerNode && that_present_cpusPerNode))
+ return false;
+ if (this.cpusPerNode != that.cpusPerNode)
+ return false;
+ }
+
+ boolean this_present_defaultNodeCount = true && this.isSetDefaultNodeCount();
+ boolean that_present_defaultNodeCount = true && that.isSetDefaultNodeCount();
+ if (this_present_defaultNodeCount || that_present_defaultNodeCount) {
+ if (!(this_present_defaultNodeCount && that_present_defaultNodeCount))
+ return false;
+ if (this.defaultNodeCount != that.defaultNodeCount)
+ return false;
+ }
+
+ boolean this_present_defaultCPUCount = true && this.isSetDefaultCPUCount();
+ boolean that_present_defaultCPUCount = true && that.isSetDefaultCPUCount();
+ if (this_present_defaultCPUCount || that_present_defaultCPUCount) {
+ if (!(this_present_defaultCPUCount && that_present_defaultCPUCount))
+ return false;
+ if (this.defaultCPUCount != that.defaultCPUCount)
+ return false;
+ }
+
+ boolean this_present_defaultWallltime = true && this.isSetDefaultWallltime();
+ boolean that_present_defaultWallltime = true && that.isSetDefaultWallltime();
+ if (this_present_defaultWallltime || that_present_defaultWallltime) {
+ if (!(this_present_defaultWallltime && that_present_defaultWallltime))
+ return false;
+ if (this.defaultWallltime != that.defaultWallltime)
+ return false;
+ }
+
return true;
}
@@ -1199,6 +1419,26 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
if (present_gatewayUsageExecutable)
list.add(gatewayUsageExecutable);
+ boolean present_cpusPerNode = true && (isSetCpusPerNode());
+ list.add(present_cpusPerNode);
+ if (present_cpusPerNode)
+ list.add(cpusPerNode);
+
+ boolean present_defaultNodeCount = true && (isSetDefaultNodeCount());
+ list.add(present_defaultNodeCount);
+ if (present_defaultNodeCount)
+ list.add(defaultNodeCount);
+
+ boolean present_defaultCPUCount = true && (isSetDefaultCPUCount());
+ list.add(present_defaultCPUCount);
+ if (present_defaultCPUCount)
+ list.add(defaultCPUCount);
+
+ boolean present_defaultWallltime = true && (isSetDefaultWallltime());
+ list.add(present_defaultWallltime);
+ if (present_defaultWallltime)
+ list.add(defaultWallltime);
+
return list.hashCode();
}
@@ -1350,6 +1590,46 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetCpusPerNode()).compareTo(other.isSetCpusPerNode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCpusPerNode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpusPerNode, other.cpusPerNode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultNodeCount()).compareTo(other.isSetDefaultNodeCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultNodeCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultNodeCount, other.defaultNodeCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultCPUCount()).compareTo(other.isSetDefaultCPUCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultCPUCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultCPUCount, other.defaultCPUCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultWallltime()).compareTo(other.isSetDefaultWallltime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultWallltime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultWallltime, other.defaultWallltime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -1493,6 +1773,30 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
}
first = false;
}
+ if (isSetCpusPerNode()) {
+ if (!first) sb.append(", ");
+ sb.append("cpusPerNode:");
+ sb.append(this.cpusPerNode);
+ first = false;
+ }
+ if (isSetDefaultNodeCount()) {
+ if (!first) sb.append(", ");
+ sb.append("defaultNodeCount:");
+ sb.append(this.defaultNodeCount);
+ first = false;
+ }
+ if (isSetDefaultCPUCount()) {
+ if (!first) sb.append(", ");
+ sb.append("defaultCPUCount:");
+ sb.append(this.defaultCPUCount);
+ first = false;
+ }
+ if (isSetDefaultWallltime()) {
+ if (!first) sb.append(", ");
+ sb.append("defaultWallltime:");
+ sb.append(this.defaultWallltime);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -1723,6 +2027,38 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 15: // CPUS_PER_NODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.cpusPerNode = iprot.readI32();
+ struct.setCpusPerNodeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // DEFAULT_NODE_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.defaultNodeCount = iprot.readI32();
+ struct.setDefaultNodeCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // DEFAULT_CPUCOUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.defaultCPUCount = iprot.readI32();
+ struct.setDefaultCPUCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 18: // DEFAULT_WALLLTIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.defaultWallltime = iprot.readI32();
+ struct.setDefaultWallltimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1867,6 +2203,26 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
oprot.writeFieldEnd();
}
}
+ if (struct.isSetCpusPerNode()) {
+ oprot.writeFieldBegin(CPUS_PER_NODE_FIELD_DESC);
+ oprot.writeI32(struct.cpusPerNode);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetDefaultNodeCount()) {
+ oprot.writeFieldBegin(DEFAULT_NODE_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.defaultNodeCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetDefaultCPUCount()) {
+ oprot.writeFieldBegin(DEFAULT_CPUCOUNT_FIELD_DESC);
+ oprot.writeI32(struct.defaultCPUCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetDefaultWallltime()) {
+ oprot.writeFieldBegin(DEFAULT_WALLLTIME_FIELD_DESC);
+ oprot.writeI32(struct.defaultWallltime);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1923,7 +2279,19 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
if (struct.isSetGatewayUsageExecutable()) {
optionals.set(11);
}
- oprot.writeBitSet(optionals, 12);
+ if (struct.isSetCpusPerNode()) {
+ optionals.set(12);
+ }
+ if (struct.isSetDefaultNodeCount()) {
+ optionals.set(13);
+ }
+ if (struct.isSetDefaultCPUCount()) {
+ optionals.set(14);
+ }
+ if (struct.isSetDefaultWallltime()) {
+ optionals.set(15);
+ }
+ oprot.writeBitSet(optionals, 16);
if (struct.isSetHostAliases()) {
{
oprot.writeI32(struct.hostAliases.size());
@@ -1997,6 +2365,18 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
if (struct.isSetGatewayUsageExecutable()) {
oprot.writeString(struct.gatewayUsageExecutable);
}
+ if (struct.isSetCpusPerNode()) {
+ oprot.writeI32(struct.cpusPerNode);
+ }
+ if (struct.isSetDefaultNodeCount()) {
+ oprot.writeI32(struct.defaultNodeCount);
+ }
+ if (struct.isSetDefaultCPUCount()) {
+ oprot.writeI32(struct.defaultCPUCount);
+ }
+ if (struct.isSetDefaultWallltime()) {
+ oprot.writeI32(struct.defaultWallltime);
+ }
}
@Override
@@ -2006,7 +2386,7 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
struct.setComputeResourceIdIsSet(true);
struct.hostName = iprot.readString();
struct.setHostNameIsSet(true);
- BitSet incoming = iprot.readBitSet(12);
+ BitSet incoming = iprot.readBitSet(16);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
@@ -2114,6 +2494,22 @@ public class ComputeResourceDescription implements org.apache.thrift.TBase<Compu
struct.gatewayUsageExecutable = iprot.readString();
struct.setGatewayUsageExecutableIsSet(true);
}
+ if (incoming.get(12)) {
+ struct.cpusPerNode = iprot.readI32();
+ struct.setCpusPerNodeIsSet(true);
+ }
+ if (incoming.get(13)) {
+ struct.defaultNodeCount = iprot.readI32();
+ struct.setDefaultNodeCountIsSet(true);
+ }
+ if (incoming.get(14)) {
+ struct.defaultCPUCount = iprot.readI32();
+ struct.setDefaultCPUCountIsSet(true);
+ }
+ if (incoming.get(15)) {
+ struct.defaultWallltime = iprot.readI32();
+ struct.setDefaultWallltimeIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationDeployment.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationDeployment.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationDeployment.java
index 571011a..6e6f6fa 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationDeployment.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationDeployment.java
@@ -47,6 +47,8 @@ public class ApplicationDeployment implements Serializable {
private int defaultNodeCount;
@Column(name = "DEFAULT_CPU_COUNT")
private int defaultCPUCount;
+ @Column(name = "DEFAULT_WALLTIME")
+ private int defaultWalltime;
@Column(name = "EDITABLE_BY_USER")
private boolean editableByUser;
@@ -176,6 +178,14 @@ public class ApplicationDeployment implements Serializable {
this.defaultCPUCount = defaultCPUCount;
}
+ public int getDefaultWalltime() {
+ return defaultWalltime;
+ }
+
+ public void setDefaultWalltime(int defaultWalltime) {
+ this.defaultWalltime = defaultWalltime;
+ }
+
public boolean isEditableByUser() {
return editableByUser;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResource.java
index c4a02e3..0ea0cea 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ComputeResource.java
@@ -61,6 +61,18 @@ public class ComputeResource implements Serializable {
@Column(name = "GATEWAY_USAGE_EXECUTABLE")
private String gatewayUsageExec;
+ @Column(name = "CPUS_PER_NODE")
+ private Integer cpusPerNode;
+
+ @Column(name = "DEFAULT_NODE_COUNT")
+ private Integer defaultNodeCount;
+
+ @Column(name = "DEFAULT_CPU_COUNT")
+ private Integer defaultCPUCount;
+
+ @Column(name = "DEFAULT_WALLTIME")
+ private Integer defaultWalltime;
+
public Timestamp getCreationTime() {
return creationTime;
}
@@ -140,4 +152,36 @@ public class ComputeResource implements Serializable {
public void setGatewayUsageExec(String gatewayUsageExec) {
this.gatewayUsageExec = gatewayUsageExec;
}
+
+ public Integer getCpusPerNode() {
+ return cpusPerNode;
+ }
+
+ public void setCpusPerNode(Integer cpusPerNode) {
+ this.cpusPerNode = cpusPerNode;
+ }
+
+ public Integer getDefaultNodeCount() {
+ return defaultNodeCount;
+ }
+
+ public void setDefaultNodeCount(Integer defaultNodeCount) {
+ this.defaultNodeCount = defaultNodeCount;
+ }
+
+ public Integer getDefaultCPUCount() {
+ return defaultCPUCount;
+ }
+
+ public void setDefaultCPUCount(Integer defaultCPUCount) {
+ this.defaultCPUCount = defaultCPUCount;
+ }
+
+ public Integer getDefaultWalltime() {
+ return defaultWalltime;
+ }
+
+ public void setDefaultWalltime(Integer defaultWalltime) {
+ this.defaultWalltime = defaultWalltime;
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppDeploymentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppDeploymentResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppDeploymentResource.java
index 54d75b7..889341b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppDeploymentResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppDeploymentResource.java
@@ -49,6 +49,7 @@ public class AppDeploymentResource extends AppCatAbstractResource {
private String defaultQueueName;
private int defaultNodeCount;
private int defaultCPUCount;
+ private int defaultWalltime;
private boolean editableByUser;
private ComputeResourceResource hostResource;
private AppModuleResource moduleResource;
@@ -167,6 +168,14 @@ public class AppDeploymentResource extends AppCatAbstractResource {
this.editableByUser = editableByUser;
}
+ public int getDefaultWalltime() {
+ return defaultWalltime;
+ }
+
+ public void setDefaultWalltime(int defaultWalltime) {
+ this.defaultWalltime = defaultWalltime;
+ }
+
@Override
public void remove(Object identifier) throws AppCatalogException {
EntityManager em = null;
@@ -460,6 +469,7 @@ public class AppDeploymentResource extends AppCatAbstractResource {
existingDeployment.setDefaultQueueName(defaultQueueName);
existingDeployment.setDefaultCPUCount(defaultCPUCount);
existingDeployment.setDefaultNodeCount(defaultNodeCount);
+ existingDeployment.setDefaultWalltime(defaultWalltime);
existingDeployment.setEditableByUser(editableByUser);
existingDeployment.setUpdateTime(AiravataUtils.getCurrentTimestamp());
em.merge(existingDeployment);
@@ -477,6 +487,7 @@ public class AppDeploymentResource extends AppCatAbstractResource {
deployment.setDefaultQueueName(defaultQueueName);
deployment.setDefaultCPUCount(defaultCPUCount);
deployment.setDefaultNodeCount(defaultNodeCount);
+ deployment.setDefaultWalltime(defaultWalltime);
deployment.setEditableByUser(editableByUser);
deployment.setCreationTime(AiravataUtils.getCurrentTimestamp());
em.persist(deployment);
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeResourceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeResourceResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeResourceResource.java
index 7fd2e46..fd96ad5 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeResourceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/ComputeResourceResource.java
@@ -43,6 +43,10 @@ public class ComputeResourceResource extends AppCatAbstractResource {
private Timestamp createdTime;
private Timestamp updatedTime;
private int maxMemoryPerNode;
+ private int cpusPerNode;
+ private int defaultNodeCount;
+ private int defaultCPUCount;
+ private int defaultWalltime;
private boolean enabled;
private boolean gatewayUsageReporting;
private String gatewayUsageModLoadCMD;
@@ -79,7 +83,39 @@ public class ComputeResourceResource extends AppCatAbstractResource {
this.enabled = enabled;
}
- @Override
+ public int getCpusPerNode() {
+ return cpusPerNode;
+ }
+
+ public void setCpusPerNode(int cpusPerNode) {
+ this.cpusPerNode = cpusPerNode;
+ }
+
+ public int getDefaultNodeCount() {
+ return defaultNodeCount;
+ }
+
+ public void setDefaultNodeCount(int defaultNodeCount) {
+ this.defaultNodeCount = defaultNodeCount;
+ }
+
+ public int getDefaultCPUCount() {
+ return defaultCPUCount;
+ }
+
+ public void setDefaultCPUCount(int defaultCPUCount) {
+ this.defaultCPUCount = defaultCPUCount;
+ }
+
+ public int getDefaultWalltime() {
+ return defaultWalltime;
+ }
+
+ public void setDefaultWalltime(int defaultWalltime) {
+ this.defaultWalltime = defaultWalltime;
+ }
+
+ @Override
public void remove(Object identifier) throws AppCatalogException {
EntityManager em = null;
try {
@@ -339,6 +375,10 @@ public class ComputeResourceResource extends AppCatAbstractResource {
computeResource.setHostName(getHostName());
computeResource.setEnabled(isEnabled());
computeResource.setMaxMemoryPerNode(getMaxMemoryPerNode());
+ computeResource.setCpusPerNode(cpusPerNode);
+ computeResource.setDefaultNodeCount(defaultNodeCount);
+ computeResource.setDefaultCPUCount(defaultCPUCount);
+ computeResource.setDefaultWalltime(defaultWalltime);
computeResource.setGatewayUsageReporting(gatewayUsageReporting);
computeResource.setGatewayUsageModLoadCMD(gatewayUsageModLoadCMD);
computeResource.setGatewayUsageExec(gatewayUsageExec);
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index 1f744ee..8014ccf 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -27,6 +27,10 @@ CREATE TABLE COMPUTE_RESOURCE
CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
MAX_MEMORY_NODE INTEGER,
+ CPUS_PER_NODE INTEGER,
+ DEFAULT_NODE_COUNT INTEGER,
+ DEFAULT_CPU_COUNT INTEGER,
+ DEFAULT_WALLTIME INTEGER,
ENABLED SMALLINT,
GATEWAY_USAGE_REPORTING SMALLINT,
GATEWAY_USAGE_MODULE_LOAD_CMD VARCHAR(500),
@@ -209,6 +213,7 @@ CREATE TABLE APPLICATION_DEPLOYMENT
DEFAULT_QUEUE_NAME VARCHAR(255),
DEFAULT_NODE_COUNT INTEGER,
DEFAULT_CPU_COUNT INTEGER,
+ DEFAULT_WALLTIME INTEGER,
EDITABLE_BY_USER BOOLEAN,
PRIMARY KEY(DEPLOYMENT_ID),
FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 12a1953..5de9ebf 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -26,6 +26,10 @@ CREATE TABLE COMPUTE_RESOURCE
CREATION_TIME TIMESTAMP DEFAULT NOW(),
UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
MAX_MEMORY_NODE INTEGER,
+ CPUS_PER_NODE INTEGER,
+ DEFAULT_NODE_COUNT INTEGER,
+ DEFAULT_CPU_COUNT INTEGER,
+ DEFAULT_WALLTIME INTEGER,
ENABLED SMALLINT,
GATEWAY_USAGE_REPORTING SMALLINT,
GATEWAY_USAGE_MODULE_LOAD_CMD VARCHAR(500),
@@ -216,6 +220,7 @@ CREATE TABLE APPLICATION_DEPLOYMENT
DEFAULT_QUEUE_NAME VARCHAR(255),
DEFAULT_NODE_COUNT INTEGER,
DEFAULT_CPU_COUNT INTEGER,
+ DEFAULT_WALLTIME INTEGER,
EDITABLE_BY_USER TINYINT(1),
PRIMARY KEY(DEPLOYMENT_ID),
FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/thrift-interface-descriptions/data-models/app-catalog-models/application_deployment_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/app-catalog-models/application_deployment_model.thrift b/thrift-interface-descriptions/data-models/app-catalog-models/application_deployment_model.thrift
index 7dcf1fe..b28f310 100644
--- a/thrift-interface-descriptions/data-models/app-catalog-models/application_deployment_model.thrift
+++ b/thrift-interface-descriptions/data-models/app-catalog-models/application_deployment_model.thrift
@@ -129,5 +129,6 @@ struct ApplicationDeploymentDescription {
13: optional string defaultQueueName,
14: optional i32 defaultNodeCount,
15: optional i32 defaultCPUCount,
- 16: optional bool editableByUser
+ 16: optional i32 defaultWalltime,
+ 17: optional bool editableByUser,
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/56bc4bee/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
index 076e5c1..aaa3dbe 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
@@ -357,5 +357,9 @@ struct ComputeResourceDescription {
11: optional i32 maxMemoryPerNode,
12: optional bool gatewayUsageReporting,
13: optional string gatewayUsageModuleLoadCommand,
- 14: optional string gatewayUsageExecutable
+ 14: optional string gatewayUsageExecutable,
+ 15: optional i32 cpusPerNode,
+ 16: optional i32 defaultNodeCount,
+ 17: optional i32 defaultCPUCount,
+ 18: optional i32 defaultWallltime,
}