Repository: airavata Updated Branches: refs/heads/master a9136101c -> 842004ee4
http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/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 90c4a37..47de5a7 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 @@ -90,6 +90,7 @@ import org.slf4j.LoggerFactory; private static final org.apache.thrift.protocol.TField FILE_SYSTEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSystems", org.apache.thrift.protocol.TType.MAP, (short)7); private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACES_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaces", org.apache.thrift.protocol.TType.LIST, (short)8); private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaces", org.apache.thrift.protocol.TType.LIST, (short)9); + private static final org.apache.thrift.protocol.TField MAX_MEMORY_PER_NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMemoryPerNode", org.apache.thrift.protocol.TType.I32, (short)10); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -106,6 +107,7 @@ import org.slf4j.LoggerFactory; private Map<FileSystems,String> fileSystems; // optional private List<JobSubmissionInterface> jobSubmissionInterfaces; // optional private List<DataMovementInterface> dataMovementInterfaces; // optional + private int maxMemoryPerNode; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -117,7 +119,8 @@ import org.slf4j.LoggerFactory; BATCH_QUEUES((short)6, "batchQueues"), FILE_SYSTEMS((short)7, "fileSystems"), JOB_SUBMISSION_INTERFACES((short)8, "jobSubmissionInterfaces"), - DATA_MOVEMENT_INTERFACES((short)9, "dataMovementInterfaces"); + DATA_MOVEMENT_INTERFACES((short)9, "dataMovementInterfaces"), + MAX_MEMORY_PER_NODE((short)10, "maxMemoryPerNode"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -150,6 +153,8 @@ import org.slf4j.LoggerFactory; return JOB_SUBMISSION_INTERFACES; case 9: // DATA_MOVEMENT_INTERFACES return DATA_MOVEMENT_INTERFACES; + case 10: // MAX_MEMORY_PER_NODE + return MAX_MEMORY_PER_NODE; default: return null; } @@ -190,7 +195,9 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private _Fields optionals[] = {_Fields.HOST_ALIASES,_Fields.IP_ADDRESSES,_Fields.RESOURCE_DESCRIPTION,_Fields.BATCH_QUEUES,_Fields.FILE_SYSTEMS,_Fields.JOB_SUBMISSION_INTERFACES,_Fields.DATA_MOVEMENT_INTERFACES}; + private static final int __MAXMEMORYPERNODE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.HOST_ALIASES,_Fields.IP_ADDRESSES,_Fields.RESOURCE_DESCRIPTION,_Fields.BATCH_QUEUES,_Fields.FILE_SYSTEMS,_Fields.JOB_SUBMISSION_INTERFACES,_Fields.DATA_MOVEMENT_INTERFACES,_Fields.MAX_MEMORY_PER_NODE}; 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); @@ -219,6 +226,8 @@ import org.slf4j.LoggerFactory; tmpMap.put(_Fields.DATA_MOVEMENT_INTERFACES, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaces", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DataMovementInterface.class)))); + tmpMap.put(_Fields.MAX_MEMORY_PER_NODE, new org.apache.thrift.meta_data.FieldMetaData("maxMemoryPerNode", 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); } @@ -241,6 +250,7 @@ import org.slf4j.LoggerFactory; * Performs a deep copy on <i>other</i>. */ public ComputeResourceDescription(ComputeResourceDescription other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetComputeResourceId()) { this.computeResourceId = other.computeResourceId; } @@ -294,6 +304,7 @@ import org.slf4j.LoggerFactory; } this.dataMovementInterfaces = __this__dataMovementInterfaces; } + this.maxMemoryPerNode = other.maxMemoryPerNode; } public ComputeResourceDescription deepCopy() { @@ -312,6 +323,8 @@ import org.slf4j.LoggerFactory; this.fileSystems = null; this.jobSubmissionInterfaces = null; this.dataMovementInterfaces = null; + setMaxMemoryPerNodeIsSet(false); + this.maxMemoryPerNode = 0; } public String getComputeResourceId() { @@ -607,6 +620,28 @@ import org.slf4j.LoggerFactory; } } + public int getMaxMemoryPerNode() { + return this.maxMemoryPerNode; + } + + public void setMaxMemoryPerNode(int maxMemoryPerNode) { + this.maxMemoryPerNode = maxMemoryPerNode; + setMaxMemoryPerNodeIsSet(true); + } + + public void unsetMaxMemoryPerNode() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORYPERNODE_ISSET_ID); + } + + /** Returns true if field maxMemoryPerNode is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxMemoryPerNode() { + return EncodingUtils.testBit(__isset_bitfield, __MAXMEMORYPERNODE_ISSET_ID); + } + + public void setMaxMemoryPerNodeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMEMORYPERNODE_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case COMPUTE_RESOURCE_ID: @@ -681,6 +716,14 @@ import org.slf4j.LoggerFactory; } break; + case MAX_MEMORY_PER_NODE: + if (value == null) { + unsetMaxMemoryPerNode(); + } else { + setMaxMemoryPerNode((Integer)value); + } + break; + } } @@ -713,6 +756,9 @@ import org.slf4j.LoggerFactory; case DATA_MOVEMENT_INTERFACES: return getDataMovementInterfaces(); + case MAX_MEMORY_PER_NODE: + return Integer.valueOf(getMaxMemoryPerNode()); + } throw new IllegalStateException(); } @@ -742,6 +788,8 @@ import org.slf4j.LoggerFactory; return isSetJobSubmissionInterfaces(); case DATA_MOVEMENT_INTERFACES: return isSetDataMovementInterfaces(); + case MAX_MEMORY_PER_NODE: + return isSetMaxMemoryPerNode(); } throw new IllegalStateException(); } @@ -840,6 +888,15 @@ import org.slf4j.LoggerFactory; return false; } + boolean this_present_maxMemoryPerNode = true && this.isSetMaxMemoryPerNode(); + boolean that_present_maxMemoryPerNode = true && that.isSetMaxMemoryPerNode(); + if (this_present_maxMemoryPerNode || that_present_maxMemoryPerNode) { + if (!(this_present_maxMemoryPerNode && that_present_maxMemoryPerNode)) + return false; + if (this.maxMemoryPerNode != that.maxMemoryPerNode) + return false; + } + return true; } @@ -946,6 +1003,16 @@ import org.slf4j.LoggerFactory; return lastComparison; } } + lastComparison = Boolean.valueOf(isSetMaxMemoryPerNode()).compareTo(other.isSetMaxMemoryPerNode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxMemoryPerNode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMemoryPerNode, other.maxMemoryPerNode); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1051,6 +1118,12 @@ import org.slf4j.LoggerFactory; } first = false; } + if (isSetMaxMemoryPerNode()) { + if (!first) sb.append(", "); + sb.append("maxMemoryPerNode:"); + sb.append(this.maxMemoryPerNode); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1078,6 +1151,8 @@ import org.slf4j.LoggerFactory; private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -1239,6 +1314,14 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 10: // MAX_MEMORY_PER_NODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxMemoryPerNode = iprot.readI32(); + struct.setMaxMemoryPerNodeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1354,6 +1437,11 @@ import org.slf4j.LoggerFactory; oprot.writeFieldEnd(); } } + if (struct.isSetMaxMemoryPerNode()) { + oprot.writeFieldBegin(MAX_MEMORY_PER_NODE_FIELD_DESC); + oprot.writeI32(struct.maxMemoryPerNode); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1395,7 +1483,10 @@ import org.slf4j.LoggerFactory; if (struct.isSetDataMovementInterfaces()) { optionals.set(6); } - oprot.writeBitSet(optionals, 7); + if (struct.isSetMaxMemoryPerNode()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); if (struct.isSetHostAliases()) { { oprot.writeI32(struct.hostAliases.size()); @@ -1454,6 +1545,9 @@ import org.slf4j.LoggerFactory; } } } + if (struct.isSetMaxMemoryPerNode()) { + oprot.writeI32(struct.maxMemoryPerNode); + } } @Override @@ -1463,7 +1557,7 @@ import org.slf4j.LoggerFactory; struct.setComputeResourceIdIsSet(true); struct.hostName = iprot.readString(); struct.setHostNameIsSet(true); - BitSet incoming = iprot.readBitSet(7); + BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list57 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); @@ -1551,6 +1645,10 @@ import org.slf4j.LoggerFactory; } struct.setDataMovementInterfacesIsSet(true); } + if (incoming.get(7)) { + struct.maxMemoryPerNode = iprot.readI32(); + struct.setMaxMemoryPerNodeIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift b/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift index 8e6c896..f287e22 100644 --- a/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift +++ b/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift @@ -130,8 +130,9 @@ struct OutputDataObjectType { 2: optional string value, 3: optional DataType type, 4: optional ValidityType validityType, - 5: optional bool dataMovement, - 6: optional string dataNameLocation + 5: optional CommandLineType addedToCommandLine, + 6: optional bool dataMovement, + 7: optional string dataNameLocation } /** http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift index 3d0472d..525e1b9 100644 --- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift +++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift @@ -144,7 +144,8 @@ struct BatchQueue { 3: optional i32 maxRunTime, 4: optional i32 maxNodes, 5: optional i32 maxProcessors, - 6: optional i32 maxJobsInQueue + 6: optional i32 maxJobsInQueue, + 7: optional i32 maxMemory } /** @@ -434,5 +435,6 @@ struct ComputeResourceDescription { 6: optional list<BatchQueue> batchQueues, 7: optional map<FileSystems, string> fileSystems, 8: optional list<JobSubmissionInterface> jobSubmissionInterfaces, - 9: optional list<DataMovementInterface> dataMovementInterfaces + 9: optional list<DataMovementInterface> dataMovementInterfaces, + 10: optional i32 maxMemoryPerNode } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationOutput.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationOutput.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationOutput.java index c13e7d3..861698d 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationOutput.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/model/ApplicationOutput.java @@ -41,6 +41,8 @@ public class ApplicationOutput implements Serializable { private String dataType; @Column(name = "VALIDITY_TYPE") private String validityType; + @Column(name="COMMANDLINE_TYPE") + private String commandLineType; @Column(name = "DATA_MOVEMENT") private boolean dataMovement; @Column(name = "DATA_NAME_LOCATION") @@ -50,6 +52,13 @@ public class ApplicationOutput implements Serializable { @JoinColumn(name = "INTERFACE_ID") private ApplicationInterface applicationInterface; + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } public String getInterfaceID() { return interfaceID; } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/ApplicationOutputResource.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/ApplicationOutputResource.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/ApplicationOutputResource.java index e3d97c2..f61f124 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/ApplicationOutputResource.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/ApplicationOutputResource.java @@ -47,6 +47,7 @@ public class ApplicationOutputResource extends AbstractResource { private String validityType; private boolean dataMovement; private String dataNameLocation; + private String commandLineType; private AppInterfaceResource appInterfaceResource; @@ -287,6 +288,7 @@ public class ApplicationOutputResource extends AbstractResource { applicationOutput.setOutputKey(outputKey); applicationOutput.setOutputVal(outputVal); applicationOutput.setValidityType(validityType); + applicationOutput.setCommandLineType(commandLineType); applicationOutput.setDataMovement(dataMovement); applicationOutput.setDataNameLocation(dataNameLocation); em.merge(applicationOutput); @@ -399,4 +401,12 @@ public class ApplicationOutputResource extends AbstractResource { public void setDataNameLocation(String dataNameLocation) { this.dataNameLocation = dataNameLocation; } + + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java index 4c9d257..9d0cff1 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java @@ -800,6 +800,7 @@ public class AppCatalogJPAUtils { resource.setOutputVal(o.getOutputVal()); resource.setDataType(o.getDataType()); resource.setValidityType(o.getValidityType()); + resource.setCommandLineType(o.getCommandLineType()); resource.setDataMovement(o.isDataMovement()); resource.setDataNameLocation(o.getDataNameLocation()); resource.setAppInterfaceResource((AppInterfaceResource)createAppInterfaceResource(o.getApplicationInterface())); http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java index de9d577..1516b26 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java @@ -583,6 +583,9 @@ public class AppCatalogThriftConversion { if (output.getValidityType() != null){ outputDataObjectType.setValidityType(ValidityType.valueOf(output.getValidityType())); } + if (output.getCommandLineType() != null){ + outputDataObjectType.setAddedToCommandLine(CommandLineType.valueOf(output.getCommandLineType())); + } outputDataObjectType.setDataMovement(output.isDataMovement()); outputDataObjectType.setDataNameLocation(output.getDataNameLocation()); return outputDataObjectType; http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql index a98fef6..e4882d0 100644 --- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql +++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql @@ -286,6 +286,7 @@ CREATE TABLE APPLICATION_OUTPUT OUTPUT_VALUE VARCHAR(255), DATA_TYPE VARCHAR(255), VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(INTERFACE_ID,OUTPUT_KEY), http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql index 5a4d239..5c68bc9 100644 --- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql +++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql @@ -271,6 +271,7 @@ CREATE TABLE APPLICATION_OUTPUT OUTPUT_VALUE VARCHAR(255), DATA_TYPE VARCHAR(255), VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(INTERFACE_ID,OUTPUT_KEY), http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java index b13c842..b865eb3 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java @@ -45,6 +45,8 @@ public class ApplicationOutput implements Serializable { @Column(name = "VALIDITY_TYPE") private String validityType; + @Column(name="COMMANDLINE_TYPE") + private String commandLineType; @Column(name = "DATA_MOVEMENT") private boolean dataMovement; @Column(name = "DATA_NAME_LOCATION") @@ -54,6 +56,14 @@ public class ApplicationOutput implements Serializable { @JoinColumn(name = "TASK_ID") private TaskDetail task; + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } + public String getTaskId() { return taskId; } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java index c40a5ff..fdb6469 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java @@ -46,6 +46,8 @@ public class Experiment_Output implements Serializable { @Column(name = "VALIDITY_TYPE") private String validityType; + @Column(name="COMMANDLINE_TYPE") + private String commandLineType; @Column(name = "DATA_MOVEMENT") private boolean dataMovement; @Column(name = "DATA_NAME_LOCATION") @@ -55,6 +57,13 @@ public class Experiment_Output implements Serializable { @JoinColumn(name = "EXPERIMENT_ID") private Experiment experiment; + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } public String getExperiment_id() { return experiment_id; } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java index bca1e33..7ec37c4 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java @@ -43,6 +43,8 @@ public class NodeOutput implements Serializable { private String value; @Column(name = "VALIDITY_TYPE") private String validityType; + @Column(name="COMMANDLINE_TYPE") + private String commandLineType; @Column(name = "DATA_MOVEMENT") private boolean dataMovement; @Column(name = "DATA_NAME_LOCATION") @@ -53,6 +55,14 @@ public class NodeOutput implements Serializable { @JoinColumn(name = "NODE_INSTANCE_ID") private WorkflowNodeDetail node; + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } + public String getNodeId() { return nodeId; } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java index 4209f87..a497b40 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java @@ -44,6 +44,15 @@ public class ApplicationOutputResource extends AbstractResource { private String validityType; private boolean dataMovement; private String dataNameLocation; + private String commandLineType; + + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } public String getValidityType() { return validityType; @@ -142,6 +151,7 @@ public class ApplicationOutputResource extends AbstractResource { applicationOutput.setOutputKey(outputKey); applicationOutput.setDataType(dataType); applicationOutput.setValidityType(validityType); + applicationOutput.setCommandLineType(commandLineType); applicationOutput.setDataMovement(dataMovement); applicationOutput.setDataNameLocation(dataNameLocation); if (value != null){ @@ -154,6 +164,7 @@ public class ApplicationOutputResource extends AbstractResource { existingOutput.setOutputKey(outputKey); existingOutput.setDataType(dataType); existingOutput.setValidityType(validityType); + existingOutput.setCommandLineType(commandLineType); existingOutput.setDataMovement(dataMovement); existingOutput.setDataNameLocation(dataNameLocation); if (value != null){ http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java index 983ff8b..92cd02c 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java @@ -44,6 +44,15 @@ public class ExperimentOutputResource extends AbstractResource { private String validityType; private boolean dataMovement; private String dataNameLocation; + private String commandLineType; + + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } public String getValidityType() { return validityType; @@ -140,6 +149,7 @@ public class ExperimentOutputResource extends AbstractResource { } exOutput.setDataType(dataType); exOutput.setValidityType(validityType); + exOutput.setCommandLineType(commandLineType); exOutput.setDataMovement(dataMovement); exOutput.setDataNameLocation(dataNameLocation); @@ -152,6 +162,7 @@ public class ExperimentOutputResource extends AbstractResource { existingOutput.setExperiment_id(experiment.getExpId()); existingOutput.setDataType(dataType); existingOutput.setValidityType(validityType); + existingOutput.setCommandLineType(commandLineType); existingOutput.setDataMovement(dataMovement); existingOutput.setDataNameLocation(dataNameLocation); exOutput = em.merge(existingOutput); http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java index caeae7e..acdf1dc 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java @@ -45,6 +45,15 @@ public class NodeOutputResource extends AbstractResource { private String validityType; private boolean dataMovement; private String dataNameLocation; + private String commandLineType; + + public String getCommandLineType() { + return commandLineType; + } + + public void setCommandLineType(String commandLineType) { + this.commandLineType = commandLineType; + } public String getValidityType() { return validityType; @@ -144,6 +153,7 @@ public class NodeOutputResource extends AbstractResource { nodeOutput.setDataType(dataType); nodeOutput.setValue(value); nodeOutput.setValidityType(validityType); + nodeOutput.setCommandLineType(commandLineType); nodeOutput.setDataMovement(dataMovement); nodeOutput.setDataNameLocation(dataNameLocation); @@ -154,6 +164,7 @@ public class NodeOutputResource extends AbstractResource { existingOutput.setDataType(dataType); existingOutput.setValue(value); existingOutput.setValidityType(validityType); + existingOutput.setCommandLineType(commandLineType); existingOutput.setDataMovement(dataMovement); existingOutput.setDataNameLocation(dataNameLocation); nodeOutput = em.merge(existingOutput); http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java index e131a47..b61a19a 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java @@ -543,6 +543,7 @@ public class Utils { } eOutputResource.setDataType(o.getDataType()); eOutputResource.setValidityType(o.getValidityType()); + eOutputResource.setCommandLineType(o.getCommandLineType()); eOutputResource.setDataMovement(o.isDataMovement()); eOutputResource.setDataNameLocation(o.getDataNameLocation()); } @@ -638,6 +639,7 @@ public class Utils { outputResource.setValue(new String(o.getValue())); } outputResource.setValidityType(o.getValidityType()); + outputResource.setCommandLineType(o.getCommandLineType()); outputResource.setDataMovement(o.isDataMovement()); outputResource.setDataNameLocation(o.getDataNameLocation()); } @@ -673,6 +675,7 @@ public class Utils { outputResource.setOutputKey(o.getOutputKey()); outputResource.setValue(o.getValue()); outputResource.setValidityType(o.getValidityType()); + outputResource.setCommandLineType(o.getCommandLineType()); outputResource.setDataMovement(o.isDataMovement()); outputResource.setDataNameLocation(o.getDataNameLocation()); } http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java index 9818e6f..0f87863 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java @@ -260,6 +260,9 @@ public class ThriftDataModelConversion { if (expOutput.getValidityType() != null){ dataObjectType.setValidityType(ValidityType.valueOf(expOutput.getValidityType())); } + if (expOutput.getCommandLineType() != null){ + dataObjectType.setAddedToCommandLine(CommandLineType.valueOf(expOutput.getCommandLineType())); + } dataObjectType.setDataMovement(expOutput.isDataMovement()); dataObjectType.setDataNameLocation(expOutput.getDataNameLocation()); return dataObjectType; @@ -273,6 +276,9 @@ public class ThriftDataModelConversion { if (nodeOutputResource.getValidityType() != null){ dataObjectType.setValidityType(ValidityType.valueOf(nodeOutputResource.getValidityType())); } + if (nodeOutputResource.getCommandLineType() != null){ + dataObjectType.setAddedToCommandLine(CommandLineType.valueOf(nodeOutputResource.getCommandLineType())); + } dataObjectType.setDataMovement(nodeOutputResource.isDataMovement()); dataObjectType.setDataNameLocation(nodeOutputResource.getDataNameLocation()); return dataObjectType; @@ -286,6 +292,9 @@ public class ThriftDataModelConversion { if (outputResource.getValidityType() != null){ dataObjectType.setValidityType(ValidityType.valueOf(outputResource.getValidityType())); } + if (outputResource.getCommandLineType() != null){ + dataObjectType.setAddedToCommandLine(CommandLineType.valueOf(outputResource.getCommandLineType())); + } dataObjectType.setDataMovement(outputResource.isDataMovement()); dataObjectType.setDataNameLocation(outputResource.getDataNameLocation()); return dataObjectType; http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql index c1bd458..ca78551 100644 --- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql +++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql @@ -146,6 +146,7 @@ CREATE TABLE EXPERIMENT_OUTPUT DATA_TYPE VARCHAR(255), VALUE CLOB, VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY), @@ -222,6 +223,7 @@ CREATE TABLE APPLICATION_OUTPUT DATA_TYPE VARCHAR(255), VALUE CLOB, VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(TASK_ID,OUTPUT_KEY), @@ -253,6 +255,7 @@ CREATE TABLE NODE_OUTPUT DATA_TYPE VARCHAR(255), VALUE VARCHAR(255), VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY), http://git-wip-us.apache.org/repos/asf/airavata/blob/842004ee/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql index 7f7dfab..ccc82ff 100644 --- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql +++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql @@ -146,6 +146,7 @@ CREATE TABLE EXPERIMENT_OUTPUT DATA_TYPE VARCHAR(255), VALUE LONGTEXT, VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY), @@ -204,6 +205,7 @@ CREATE TABLE APPLICATION_OUTPUT VALUE LONGTEXT, VALIDITY_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, + COMMANDLINE_TYPE VARCHAR(255), DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(TASK_ID,OUTPUT_KEY), FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE @@ -234,6 +236,7 @@ CREATE TABLE NODE_OUTPUT DATA_TYPE VARCHAR(255), VALUE VARCHAR(255), VALIDITY_TYPE VARCHAR(255), + COMMANDLINE_TYPE VARCHAR(255), DATA_MOVEMENT SMALLINT, DATA_NAME_LOCATION VARCHAR(255), PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY),
