Repository: airavata Updated Branches: refs/heads/master 3630458b2 -> 9c5d4bf24
http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/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 bc2af43..04ca862 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 @@ -80,16 +80,15 @@ import org.slf4j.LoggerFactory; @SuppressWarnings("all") public class ComputeResourceDescription implements org.apache.thrift.TBase<ComputeResourceDescription, ComputeResourceDescription._Fields>, java.io.Serializable, Cloneable, Comparable<ComputeResourceDescription> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputeResourceDescription"); - private static final org.apache.thrift.protocol.TField IS_EMPTY_FIELD_DESC = new org.apache.thrift.protocol.TField("isEmpty", org.apache.thrift.protocol.TType.BOOL, (short)1); - private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField HOST_ALIASES_FIELD_DESC = new org.apache.thrift.protocol.TField("hostAliases", org.apache.thrift.protocol.TType.SET, (short)4); - private static final org.apache.thrift.protocol.TField IP_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddresses", org.apache.thrift.protocol.TType.SET, (short)5); - private static final org.apache.thrift.protocol.TField RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceDescription", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField BATCH_QUEUES_FIELD_DESC = new org.apache.thrift.protocol.TField("batchQueues", org.apache.thrift.protocol.TType.LIST, (short)7); - 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)8); - 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)9); - 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)10); + private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField HOST_ALIASES_FIELD_DESC = new org.apache.thrift.protocol.TField("hostAliases", org.apache.thrift.protocol.TType.SET, (short)3); + private static final org.apache.thrift.protocol.TField IP_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddresses", org.apache.thrift.protocol.TType.SET, (short)4); + private static final org.apache.thrift.protocol.TField RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceDescription", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField BATCH_QUEUES_FIELD_DESC = new org.apache.thrift.protocol.TField("batchQueues", org.apache.thrift.protocol.TType.LIST, (short)6); + 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -97,7 +96,6 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new ComputeResourceDescriptionTupleSchemeFactory()); } - private boolean isEmpty; // required private String computeResourceId; // required private String hostName; // required private Set<String> hostAliases; // optional @@ -110,16 +108,15 @@ import org.slf4j.LoggerFactory; /** 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 { - IS_EMPTY((short)1, "isEmpty"), - COMPUTE_RESOURCE_ID((short)2, "computeResourceId"), - HOST_NAME((short)3, "hostName"), - HOST_ALIASES((short)4, "hostAliases"), - IP_ADDRESSES((short)5, "ipAddresses"), - RESOURCE_DESCRIPTION((short)6, "resourceDescription"), - BATCH_QUEUES((short)7, "batchQueues"), - FILE_SYSTEMS((short)8, "fileSystems"), - JOB_SUBMISSION_INTERFACES((short)9, "jobSubmissionInterfaces"), - DATA_MOVEMENT_INTERFACES((short)10, "dataMovementInterfaces"); + COMPUTE_RESOURCE_ID((short)1, "computeResourceId"), + HOST_NAME((short)2, "hostName"), + HOST_ALIASES((short)3, "hostAliases"), + IP_ADDRESSES((short)4, "ipAddresses"), + RESOURCE_DESCRIPTION((short)5, "resourceDescription"), + BATCH_QUEUES((short)6, "batchQueues"), + FILE_SYSTEMS((short)7, "fileSystems"), + JOB_SUBMISSION_INTERFACES((short)8, "jobSubmissionInterfaces"), + DATA_MOVEMENT_INTERFACES((short)9, "dataMovementInterfaces"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -134,25 +131,23 @@ import org.slf4j.LoggerFactory; */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // IS_EMPTY - return IS_EMPTY; - case 2: // COMPUTE_RESOURCE_ID + case 1: // COMPUTE_RESOURCE_ID return COMPUTE_RESOURCE_ID; - case 3: // HOST_NAME + case 2: // HOST_NAME return HOST_NAME; - case 4: // HOST_ALIASES + case 3: // HOST_ALIASES return HOST_ALIASES; - case 5: // IP_ADDRESSES + case 4: // IP_ADDRESSES return IP_ADDRESSES; - case 6: // RESOURCE_DESCRIPTION + case 5: // RESOURCE_DESCRIPTION return RESOURCE_DESCRIPTION; - case 7: // BATCH_QUEUES + case 6: // BATCH_QUEUES return BATCH_QUEUES; - case 8: // FILE_SYSTEMS + case 7: // FILE_SYSTEMS return FILE_SYSTEMS; - case 9: // JOB_SUBMISSION_INTERFACES + case 8: // JOB_SUBMISSION_INTERFACES return JOB_SUBMISSION_INTERFACES; - case 10: // DATA_MOVEMENT_INTERFACES + case 9: // DATA_MOVEMENT_INTERFACES return DATA_MOVEMENT_INTERFACES; default: return null; @@ -194,14 +189,10 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private static final int __ISEMPTY_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}; 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); - tmpMap.put(_Fields.IS_EMPTY, new org.apache.thrift.meta_data.FieldMetaData("isEmpty", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -232,20 +223,15 @@ import org.slf4j.LoggerFactory; } public ComputeResourceDescription() { - this.isEmpty = false; - this.computeResourceId = "DO_NOT_SET_AT_CLIENTS"; } public ComputeResourceDescription( - boolean isEmpty, String computeResourceId, String hostName) { this(); - this.isEmpty = isEmpty; - setIsEmptyIsSet(true); this.computeResourceId = computeResourceId; this.hostName = hostName; } @@ -254,8 +240,6 @@ import org.slf4j.LoggerFactory; * Performs a deep copy on <i>other</i>. */ public ComputeResourceDescription(ComputeResourceDescription other) { - __isset_bitfield = other.__isset_bitfield; - this.isEmpty = other.isEmpty; if (other.isSetComputeResourceId()) { this.computeResourceId = other.computeResourceId; } @@ -317,8 +301,6 @@ import org.slf4j.LoggerFactory; @Override public void clear() { - this.isEmpty = false; - this.computeResourceId = "DO_NOT_SET_AT_CLIENTS"; this.hostName = null; @@ -331,28 +313,6 @@ import org.slf4j.LoggerFactory; this.dataMovementInterfaces = null; } - public boolean isIsEmpty() { - return this.isEmpty; - } - - public void setIsEmpty(boolean isEmpty) { - this.isEmpty = isEmpty; - setIsEmptyIsSet(true); - } - - public void unsetIsEmpty() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEMPTY_ISSET_ID); - } - - /** Returns true if field isEmpty is set (has been assigned a value) and false otherwise */ - public boolean isSetIsEmpty() { - return EncodingUtils.testBit(__isset_bitfield, __ISEMPTY_ISSET_ID); - } - - public void setIsEmptyIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEMPTY_ISSET_ID, value); - } - public String getComputeResourceId() { return this.computeResourceId; } @@ -648,14 +608,6 @@ import org.slf4j.LoggerFactory; public void setFieldValue(_Fields field, Object value) { switch (field) { - case IS_EMPTY: - if (value == null) { - unsetIsEmpty(); - } else { - setIsEmpty((Boolean)value); - } - break; - case COMPUTE_RESOURCE_ID: if (value == null) { unsetComputeResourceId(); @@ -733,9 +685,6 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { - case IS_EMPTY: - return Boolean.valueOf(isIsEmpty()); - case COMPUTE_RESOURCE_ID: return getComputeResourceId(); @@ -774,8 +723,6 @@ import org.slf4j.LoggerFactory; } switch (field) { - case IS_EMPTY: - return isSetIsEmpty(); case COMPUTE_RESOURCE_ID: return isSetComputeResourceId(); case HOST_NAME: @@ -811,15 +758,6 @@ import org.slf4j.LoggerFactory; if (that == null) return false; - boolean this_present_isEmpty = true; - boolean that_present_isEmpty = true; - if (this_present_isEmpty || that_present_isEmpty) { - if (!(this_present_isEmpty && that_present_isEmpty)) - return false; - if (this.isEmpty != that.isEmpty) - return false; - } - boolean this_present_computeResourceId = true && this.isSetComputeResourceId(); boolean that_present_computeResourceId = true && that.isSetComputeResourceId(); if (this_present_computeResourceId || that_present_computeResourceId) { @@ -917,16 +855,6 @@ import org.slf4j.LoggerFactory; int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetIsEmpty()).compareTo(other.isSetIsEmpty()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsEmpty()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEmpty, other.isEmpty); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId()); if (lastComparison != 0) { return lastComparison; @@ -1037,10 +965,6 @@ import org.slf4j.LoggerFactory; StringBuilder sb = new StringBuilder("ComputeResourceDescription("); boolean first = true; - sb.append("isEmpty:"); - sb.append(this.isEmpty); - first = false; - if (!first) sb.append(", "); sb.append("computeResourceId:"); if (this.computeResourceId == null) { sb.append("null"); @@ -1132,10 +1056,6 @@ import org.slf4j.LoggerFactory; public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetIsEmpty()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'isEmpty' is unset! Struct:" + toString()); - } - if (!isSetComputeResourceId()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'computeResourceId' is unset! Struct:" + toString()); } @@ -1157,8 +1077,6 @@ 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); @@ -1183,15 +1101,7 @@ import org.slf4j.LoggerFactory; break; } switch (schemeField.id) { - case 1: // IS_EMPTY - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isEmpty = iprot.readBool(); - struct.setIsEmptyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // COMPUTE_RESOURCE_ID + case 1: // COMPUTE_RESOURCE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.computeResourceId = iprot.readString(); struct.setComputeResourceIdIsSet(true); @@ -1199,7 +1109,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // HOST_NAME + case 2: // HOST_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.hostName = iprot.readString(); struct.setHostNameIsSet(true); @@ -1207,7 +1117,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // HOST_ALIASES + case 3: // HOST_ALIASES if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set26 = iprot.readSetBegin(); @@ -1225,7 +1135,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // IP_ADDRESSES + case 4: // IP_ADDRESSES if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set29 = iprot.readSetBegin(); @@ -1243,7 +1153,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // RESOURCE_DESCRIPTION + case 5: // RESOURCE_DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.resourceDescription = iprot.readString(); struct.setResourceDescriptionIsSet(true); @@ -1251,7 +1161,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // BATCH_QUEUES + case 6: // BATCH_QUEUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); @@ -1270,7 +1180,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // FILE_SYSTEMS + case 7: // FILE_SYSTEMS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map35 = iprot.readMapBegin(); @@ -1290,7 +1200,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // JOB_SUBMISSION_INTERFACES + case 8: // JOB_SUBMISSION_INTERFACES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list39 = iprot.readListBegin(); @@ -1309,7 +1219,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // DATA_MOVEMENT_INTERFACES + case 9: // DATA_MOVEMENT_INTERFACES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); @@ -1341,9 +1251,6 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(IS_EMPTY_FIELD_DESC); - oprot.writeBool(struct.isEmpty); - oprot.writeFieldEnd(); if (struct.computeResourceId != null) { oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC); oprot.writeString(struct.computeResourceId); @@ -1463,7 +1370,6 @@ import org.slf4j.LoggerFactory; @Override public void write(org.apache.thrift.protocol.TProtocol prot, ComputeResourceDescription struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeBool(struct.isEmpty); oprot.writeString(struct.computeResourceId); oprot.writeString(struct.hostName); BitSet optionals = new BitSet(); @@ -1552,8 +1458,6 @@ import org.slf4j.LoggerFactory; @Override public void read(org.apache.thrift.protocol.TProtocol prot, ComputeResourceDescription struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.isEmpty = iprot.readBool(); - struct.setIsEmptyIsSet(true); struct.computeResourceId = iprot.readString(); struct.setComputeResourceIdIsSet(true); struct.hostName = iprot.readString(); http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/airavata-api/thrift-interface-descriptions/airavataAPI.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift index f4b5478..971ebd7 100644 --- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift +++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift @@ -1188,7 +1188,7 @@ service Airavata { * Returns a success/failure of the update. * */ - bool registerGatewayResourceProfile( + string registerGatewayResourceProfile( 1: required gatewayResourceProfileModel.GatewayResourceProfile gatewayResourceProfile) throws (1: airavataErrors.InvalidRequestException ire, 2: airavataErrors.AiravataClientException ace, http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift b/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift index fa7ed01..799f672 100644 --- a/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift +++ b/airavata-api/thrift-interface-descriptions/applicationDeploymentModel.thrift @@ -115,15 +115,15 @@ enum ApplicationParallelismType { * */ struct ApplicationDeploymentDescription { - 1: required bool isEmpty = 0, - 2: required string appDeploymentId = DEFAULT_ID, - 3: required string appModuleId, - 4: required string computeHostId, - 5: required string executablePath, - 6: required ApplicationParallelismType parallelism = ApplicationParallelismType.SERIAL , - 7: optional string appDeploymentDescription, - 8: optional list<string> moduleLoadCmds, - 9: optional list<SetEnvPaths> libPrependPaths, - 10: optional list<SetEnvPaths> libAppendPaths, - 11: optional list<SetEnvPaths> setEnvironment, +// 1: required bool isEmpty = 0, + 1: required string appDeploymentId = DEFAULT_ID, + 2: required string appModuleId, + 3: required string computeHostId, + 4: required string executablePath, + 5: required ApplicationParallelismType parallelism = ApplicationParallelismType.SERIAL , + 6: optional string appDeploymentDescription, + 7: optional list<string> moduleLoadCmds, + 8: optional list<SetEnvPaths> libPrependPaths, + 9: optional list<SetEnvPaths> libAppendPaths, + 10: optional list<SetEnvPaths> setEnvironment, } http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/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 d5ead5b..df29cc1 100644 --- a/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift +++ b/airavata-api/thrift-interface-descriptions/applicationInterfaceModel.thrift @@ -67,14 +67,14 @@ enum DataType{ * */ struct InputDataObjectType { - 1: required bool isEmpty = 0, - 2: required string name, - 3: optional string value, - 4: optional DataType type, - 5: optional string applicationArgument, - 6: optional bool standardInput = 0, - 7: optional string userFriendlyDescription, - 8: optional string metaData +// 1: required bool isEmpty = 0, + 1: required string name, + 2: optional string value, + 3: optional DataType type, + 4: optional string applicationArgument, + 5: optional bool standardInput = 0, + 6: optional string userFriendlyDescription, + 7: optional string metaData } /** @@ -124,11 +124,11 @@ struct OutputDataObjectType { * */ struct ApplicationInterfaceDescription { - 1: required bool isEmpty = 0, - 2: required string applicationInterfaceId = DEFAULT_ID, - 3: required string applicationName, - 4: optional string applicationDesription, - 5: optional list<string> applicationModules, - 6: optional list<InputDataObjectType> applicationInputs, - 7: optional list<OutputDataObjectType> applicationOutputs +// 1: required bool isEmpty = 0, + 1: required string applicationInterfaceId = DEFAULT_ID, + 2: required string applicationName, + 3: optional string applicationDesription, + 4: optional list<string> applicationModules, + 5: optional list<InputDataObjectType> applicationInputs, + 6: optional list<OutputDataObjectType> applicationOutputs } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/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 9e43cdb..10b813c 100644 --- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift +++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift @@ -352,14 +352,14 @@ struct DataMovementInterface { * */ struct ComputeResourceDescription { - 1: required bool isEmpty = 0, - 2: required string computeResourceId = DEFAULT_ID, - 3: required string hostName, - 4: optional set<string> hostAliases, - 5: optional set<string> ipAddresses, - 6: optional string resourceDescription, - 7: optional list<BatchQueue> batchQueues, - 8: optional map<FileSystems, string> fileSystems, - 9: optional list<JobSubmissionInterface> jobSubmissionInterfaces, - 10: optional list<DataMovementInterface> dataMovementInterfaces +// 1: required bool isEmpty = 0, + 1: required string computeResourceId = DEFAULT_ID, + 2: required string hostName, + 3: optional set<string> hostAliases, + 4: optional set<string> ipAddresses, + 5: optional string resourceDescription, + 6: optional list<BatchQueue> batchQueues, + 7: optional map<FileSystems, string> fileSystems, + 8: optional list<JobSubmissionInterface> jobSubmissionInterfaces, + 9: optional list<DataMovementInterface> dataMovementInterfaces } http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java ---------------------------------------------------------------------- diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java index 4f7f37d..eceac93 100644 --- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java +++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorNew.java @@ -65,7 +65,7 @@ public class DocumentCreatorNew { //Define compute resource host ComputeResourceDescription host = DocumentCreatorUtils.createComputeResourceDescription( "localhost", new HashSet<String>(Arrays.asList(new String[]{"127.0.0.1"})), new HashSet<String>(Arrays.asList(new String[]{"127.0.0.1"}))); - host.setIsEmpty(false); +// host.setIsEmpty(true); host.setComputeResourceId(client.registerComputeResource(host)); LOCALSubmission localSubmission = new LOCALSubmission(); @@ -82,7 +82,7 @@ public class DocumentCreatorNew { //Define application interfaces ApplicationInterfaceDescription application = new ApplicationInterfaceDescription(); - application.setIsEmpty(false); +// application.setIsEmpty(false); application.setApplicationName("SimpleEcho0"); application.addToApplicationModules(module.getAppModuleId()); application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input","echo_input","Echo Input Data",null,DataType.STRING)); @@ -98,29 +98,30 @@ public class DocumentCreatorNew { host.getComputeResourceId(), "/tmp", null, false, null, null, null); -// gatewayResourceProfile = new GatewayResourceProfile(); + gatewayResourceProfile = new GatewayResourceProfile(); // gatewayResourceProfile.setGatewayID("default"); -// gatewayResourceProfile.setGatewayName("default"); -// gatewayResourceProfile.addToComputeResourcePreferences(computeResourcePreference); -// client.registerGatewayResourceProfile(gatewayResourceProfile); - client.addGatewayComputeResourcePreference(getGatewayResourceProfile().getGatewayID(), host.getComputeResourceId(), computeResourcePreference); + gatewayResourceProfile.setGatewayName("default"); + gatewayResourceProfile.addToComputeResourcePreferences(computeResourcePreference); + String gatewayId = client.registerGatewayResourceProfile(gatewayResourceProfile); + gatewayResourceProfile.setGatewayID(gatewayId); + client.addGatewayComputeResourcePreference(gatewayResourceProfile.getGatewayID(), host.getComputeResourceId(), computeResourcePreference); } - private GatewayResourceProfile getGatewayResourceProfile() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException{ - if (gatewayResourceProfile==null){ - try { - gatewayResourceProfile = client.getGatewayResourceProfile("default"); - } catch (Exception e) { - - } - if (gatewayResourceProfile==null) { - gatewayResourceProfile = new GatewayResourceProfile(); - gatewayResourceProfile.setGatewayID("default"); - gatewayResourceProfile.setGatewayName("default"); - client.registerGatewayResourceProfile(gatewayResourceProfile); - } - } - return gatewayResourceProfile; + private GatewayResourceProfile getGatewayResourceProfile() throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { +// if (gatewayResourceProfile==null){ +// try { +// gatewayResourceProfile = client.getGatewayResourceProfile(ga); +// } catch (Exception e) { +// +// } + if (gatewayResourceProfile == null) { + gatewayResourceProfile = new GatewayResourceProfile(); +// gatewayResourceProfile.setGatewayID("default"); + gatewayResourceProfile.setGatewayName("default"); + gatewayResourceProfile.setGatewayID(client.registerGatewayResourceProfile(gatewayResourceProfile)); + } +// } + return gatewayResourceProfile; } public void createSSHHostDocs() throws AppCatalogException, InvalidRequestException, AiravataClientException, AiravataSystemException, TException { @@ -132,6 +133,7 @@ public class DocumentCreatorNew { SSHJobSubmission jobSubmission = new SSHJobSubmission(); jobSubmission.setSshPort(22); + jobSubmission.setSecurityProtocol(SecurityProtocol.SSH_KEYS); ResourceJobManager resourceJobManager = DocumentCreatorUtils.createResourceJobManager(ResourceJobManagerType.FORK, null, null, null); jobSubmission.setResourceJobManager(resourceJobManager); client.addSSHJobSubmissionDetails(host.getComputeResourceId(), 1, jobSubmission); @@ -148,7 +150,7 @@ public class DocumentCreatorNew { client.registerApplicationDeployment(deployment); ApplicationInterfaceDescription application = new ApplicationInterfaceDescription(); - application.setIsEmpty(false); +// application.setIsEmpty(false); application.setApplicationName("SSHEcho1"); application.addToApplicationModules(module.getAppModuleId()); application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input","echo_input", null, null, DataType.STRING)); @@ -273,7 +275,7 @@ public class DocumentCreatorNew { module1.setAppModuleId(client.registerApplicationModule(module1)); ApplicationInterfaceDescription application = new ApplicationInterfaceDescription(); - application.setIsEmpty(false); +// application.setIsEmpty(false); application.setApplicationName("SimpleEcho2"); application.addToApplicationModules(module1.getAppModuleId()); application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", "echo_input", null, DataType.STRING)); @@ -290,7 +292,7 @@ public class DocumentCreatorNew { ApplicationModule module2 = DocumentCreatorUtils.createApplicationModule("wrf", "1.0.0", null); module2.setAppModuleId(client.registerApplicationModule(module2)); ApplicationInterfaceDescription application2 = new ApplicationInterfaceDescription(); - application2.setIsEmpty(false); +// application2.setIsEmpty(false); application2.setApplicationName("WRF"); application2.addToApplicationModules(module2.getAppModuleId()); application2.addToApplicationInputs(DocumentCreatorUtils.createAppInput("WRF_Namelist", "WRF_Namelist", null, null, DataType.URI)); @@ -327,7 +329,7 @@ public class DocumentCreatorNew { module.setAppModuleId(client.registerApplicationModule(module)); ApplicationInterfaceDescription application = new ApplicationInterfaceDescription(); - application.setIsEmpty(false); +// application.setIsEmpty(false); application.setApplicationName("SimpleEcho3"); application.addToApplicationModules(module.getAppModuleId()); application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING)); @@ -363,7 +365,7 @@ public class DocumentCreatorNew { module.setAppModuleId(client.registerApplicationModule(module)); ApplicationInterfaceDescription application = new ApplicationInterfaceDescription(); - application.setIsEmpty(false); +// application.setIsEmpty(false); application.setApplicationName("SimpleEcho4"); application.addToApplicationModules(module.getAppModuleId()); application.addToApplicationInputs(DocumentCreatorUtils.createAppInput("echo_input", "echo_input", null, null, DataType.STRING)); http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java ---------------------------------------------------------------------- diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java index 1ee3160..6f7d3ab 100644 --- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java +++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreatorUtils.java @@ -61,7 +61,7 @@ public class DocumentCreatorUtils { String computeResourceId, String appModuleId, String executablePath, ApplicationParallelismType parallelism, String appDeploymentDescription) { ApplicationDeploymentDescription deployment = new ApplicationDeploymentDescription(); - deployment.setIsEmpty(false); +// deployment.setIsEmpty(false); deployment.setAppDeploymentDescription(appDeploymentDescription); deployment.setAppModuleId(appModuleId); deployment.setComputeHostId(computeResourceId); @@ -124,7 +124,7 @@ public class DocumentCreatorUtils { public static InputDataObjectType createAppInput (String inputName, String argumentName, String description, String value, org.apache.airavata.model.appcatalog.appinterface.DataType type ){ InputDataObjectType input = new InputDataObjectType(); - input.setIsEmpty(false); +// input.setIsEmpty(false); if (inputName!=null) { input.setName(inputName); } http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java ---------------------------------------------------------------------- diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java index c4eb791..4ce597a 100644 --- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java +++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java @@ -31,6 +31,7 @@ import org.apache.aiaravata.application.catalog.data.resources.ComputeResourceRe import org.apache.aiaravata.application.catalog.data.resources.GatewayProfileResource; import org.apache.aiaravata.application.catalog.data.resources.Resource; import org.apache.aiaravata.application.catalog.data.util.AppCatalogThriftConversion; +import org.apache.aiaravata.application.catalog.data.util.AppCatalogUtils; import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference; import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile; import org.slf4j.Logger; @@ -44,7 +45,7 @@ public class GwyResourceProfileImpl implements GwyResourceProfile { try { GatewayProfileResource profileResource = new GatewayProfileResource(); profileResource.setGatewayName(gatewayProfile.getGatewayName()); - profileResource.setGatewayID(gatewayProfile.getGatewayName()); + profileResource.setGatewayID(AppCatalogUtils.getID(gatewayProfile.getGatewayName())); profileResource.setGatewayDesc(gatewayProfile.getGatewayDescription()); profileResource.save(); gatewayProfile.setGatewayID(profileResource.getGatewayID()); http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/modules/configuration/server/src/main/resources/airavata-server.properties ---------------------------------------------------------------------- diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties index 23a7af9..de42f19 100644 --- a/modules/configuration/server/src/main/resources/airavata-server.properties +++ b/modules/configuration/server/src/main/resources/airavata-server.properties @@ -327,14 +327,14 @@ gateway_id=php_reference_gateway apiserver.server.host=localhost apiserver.server.port=8930 -apiserver.server.min.threads=30 +apiserver.server.min.threads=50 #app.catalog.server.host=localhost #app.catalog.server.port=8931 orchestrator.server.host=localhost orchestrator.server.port=8940 gfac.server.host=localhost gfac.server.port=8950 -orchestrator.server.min.threads=30 +orchestrator.server.min.threads=50 ##----------------------------- Zookeeper Server Configurations ----------------------### http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java index 07c80b5..2e4d2b2 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java @@ -43,7 +43,7 @@ public class ApplicationInput implements Serializable { private String metadata; @Lob @Column(name = "VALUE") - private String value; + private char[] value; @ManyToOne(cascade= CascadeType.MERGE) @JoinColumn(name = "TASK_ID") @@ -81,11 +81,11 @@ public class ApplicationInput implements Serializable { this.metadata = metadata; } - public String getValue() { + public char[] getValue() { return value; } - public void setValue(String value) { + public void setValue(char[] value) { this.value = value; } http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/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 cb983e3..e6f9efa 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 @@ -43,7 +43,7 @@ public class ApplicationOutput implements Serializable { private String metadata; @Lob @Column(name = "VALUE") - private String value; + private char[] value; @ManyToOne(cascade= CascadeType.MERGE) @JoinColumn(name = "TASK_ID") @@ -65,11 +65,11 @@ public class ApplicationOutput implements Serializable { this.metadata = metadata; } - public String getValue() { + public char[] getValue() { return value; } - public void setValue(String value) { + public void setValue(char[] value) { this.value = value; } http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java index 4f9aea1..aa2271e 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java @@ -123,7 +123,10 @@ public class ApplicationInputResource extends AbstractResource { applicationInput.setTaskId(taskDetail.getTaskId()); applicationInput.setInputKey(inputKey); applicationInput.setInputKeyType(inputType); - applicationInput.setValue(value); + if (value != null){ + applicationInput.setValue(value.toCharArray()); + } + applicationInput.setMetadata(metadata); if (existingInput != null) { @@ -131,7 +134,9 @@ public class ApplicationInputResource extends AbstractResource { existingInput.setTaskId(taskDetail.getTaskId()); existingInput.setInputKey(inputKey); existingInput.setInputKeyType(inputType); - existingInput.setValue(value); + if (value != null){ + existingInput.setValue(value.toCharArray()); + } existingInput.setMetadata(metadata); applicationInput = em.merge(existingInput); } else { http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/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 3d53c40..544d6ab 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 @@ -123,7 +123,9 @@ public class ApplicationOutputResource extends AbstractResource { applicationOutput.setTaskId(taskDetail.getTaskId()); applicationOutput.setOutputKey(outputKey); applicationOutput.setOutputKeyType(outputType); - applicationOutput.setValue(value); + if (value != null){ + applicationOutput.setValue(value.toCharArray()); + } applicationOutput.setMetadata(metadata); if (existingOutput != null) { @@ -131,7 +133,9 @@ public class ApplicationOutputResource extends AbstractResource { existingOutput.setTaskId(taskDetail.getTaskId()); existingOutput.setOutputKey(outputKey); existingOutput.setOutputKeyType(outputType); - existingOutput.setValue(value); + if (value != null){ + existingOutput.setValue(value.toCharArray()); + } existingOutput.setMetadata(metadata); applicationOutput = em.merge(existingOutput); } else { http://git-wip-us.apache.org/repos/asf/airavata/blob/9c5d4bf2/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 352cfa4..4be0e64 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 @@ -678,7 +678,7 @@ public class Utils { inputResource.setTaskDetailResource(taskDetailResource); inputResource.setInputKey(o.getInputKey()); inputResource.setInputType(o.getInputKeyType()); - inputResource.setValue(o.getValue()); + inputResource.setValue(new String(o.getValue())); inputResource.setMetadata(o.getMetadata()); } return inputResource; @@ -691,7 +691,7 @@ public class Utils { outputResource.setTaskDetailResource(taskDetailResource); outputResource.setOutputType(o.getOutputKeyType()); outputResource.setOutputKey(o.getOutputKey()); - outputResource.setValue(o.getValue()); + outputResource.setValue(new String(o.getValue())); outputResource.setMetadata(o.getMetadata()); } return outputResource;
