You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/05/16 22:02:19 UTC
[1/7] adding id to all the job submission protocols and data movement
protocols - AIRAVATA-1203
Repository: airavata
Updated Branches:
refs/heads/master f9f173cd4 -> 0317c4a63
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/thrift-interface-descriptions/computeResourceDescription.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceDescription.thrift b/airavata-api/thrift-interface-descriptions/computeResourceDescription.thrift
deleted file mode 100644
index 4707c5f..0000000
--- a/airavata-api/thrift-interface-descriptions/computeResourceDescription.thrift
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-namespace java org.apache.airavata.model.appcatalog.computeresource
-
-const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS"
-
-/**
- * Enumeration of local resource job managers supported by Airavata
- *
- * FORK:
- * Forking of commands without any job manager
- *
- * PBS:
- * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
- *
- * UGE:
- * Univa Grid Engine, a variation of PBS implementation.
- *
- * SLURM:
- * The Simple Linux Utility for Resource Management is a open source workload manager.
- *
-*/
-enum ResourceJobManager {
- FORK,
- PBS,
- UGE,
- SLURM
-}
-
-/**
- * Enumeration of Airavata supported Job Submission Mechanisms for High Perforamance Computing Clusters.
- *
- * SSH:
- * Execute remote job submission commands using via secure shell protocol.
- *
- * GRAM:
- * Execute remote jobs via Globus GRAM service.
- *
- * UNICORE:
- * Execute remote jobs via Unicore services
- *
-*/
-enum JobSubmissionProtocol {
- SSH,
- GRAM,
- UNICORE
-}
-
-/**
- * Enumeration of data movement supported by Airavata
- *
- * SCP:
- * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
- *
- * SFTP:
- * The Simple Linux Utility for Resource Management is a open source workload manager.
- *
- * GridFTP:
- * Globus File Transfer Protocol
- *
- * UNICORE_STORAGE_SERVICE:
- * Storage Service Provided by Unicore
- *
-*/
-enum DataMovementProtocol {
- SCP,
- SFTP,
- GridFTP,
- UNICORE_STORAGE_SERVICE
-}
-
-/**
- * Enumeration of security authentication and authorization mechanisms supported by Airavata. This enumeration just
- * describes the supported mechanism. The corresponding security credentials are registered with Airavata Credential
- * store.
- *
- * USERNAME_PASSWORD:
- * A User Name.
- *
- * SSH_KEYS:
- * SSH Keys
- *
-*/
-enum SecurityProtocol {
- USERNAME_PASSWORD,
- SSH_KEYS,
- GSI,
- KERBEROS,
- OAUTH
-}
-
-
-
-struct SCPDataMovement {
- 1: required SecurityProtocol securityProtocol,
- 2: optional i32 sshPort = 22,
-}
-
-struct SSHJobSubmission {
- 2: required ResourceJobManager resourceJobManager,
- 3: optional i32 sshPort = 22
-}
-
-struct GlobusJobSubmission {
- 1: required SecurityProtocol securityProtocol,
- 2: required ResourceJobManager resourceJobManager,
- 3: optional string globusGateKeeperEndPoint
-}
-
-struct GSISSHJobSubmission {
- 2: required ResourceJobManager resourceJobManager,
- 3: optional i32 sshPort = 22,
- 4: optional set<string> exports,
- 5: optional list<string> preJobCommands,
- 6: optional list<string> postJobCommands,
- 7: optional string installedPath,
- 8: optional string monitorMode
-}
-
-/**
- * Job Submission Protocols
- *
- * resourceId:
- *
- * hostName:
- * Fully Qualified Host Name.
- *
- * ipAddress:
- * IP Addresse of the Hostname.
- *
- * resourceDescription:
- * A user friendly description of the hostname.
- *
- * preferedJobSubmissionProtocol:
- * HPC resources may have multiple options to interact with the resource. This flag identified a prefered mechanism.
- *
- * preferedDataMovementProtocol:
- * Option to specify a prefered data movement mechanism of the available options.
- *
-*/
-struct JobSubmissionProtocols {
- 1: required bool isEmpty = 0,
- 2: optional JobSubmissionProtocol preferedJobSubmissionProtocol,
- 3: optional SSHJobSubmission sshJobSubmissionInfo,
- 4: optional string globusGRAMHost,
- 5: optional i32 globusGRAMPort = 2119,
- 6: optional string unicoreBESEndPoint
-}
-
-/**
- * Computational Resource Description
- *
- * resourceId:
- *
- * hostName:
- * Fully Qualified Host Name.
- *
- * ipAddress:
- * IP Addresse of the Hostname.
- *
- * resourceDescription:
- * A user friendly description of the hostname.
- *
- * JobSubmissionProtocols:
- * A computational resources may have one or more ways of submitting Jobs. This structure
- * will hold all available mechanisms to interact with the resource.
- *
- * DataMovementProtocol:
- * Option to specify a prefered data movement mechanism of the available options.
- *
-*/
-struct ComputeResourceDescription {
- 1: required bool isEmpty = 0,
- 2: required string resourceId = DEFAULT_ID,
- 3: required string hostName,
- 4: optional set<string> hostAliases,
- 5: optional set<string> ipAddresses,
- 6: optional string resourceDescription,
- 7: optional string scratchLocation,
- 8: optional string preferredJobSubmissionProtocol,
- 9: required map<string, JobSubmissionProtocol> jobSubmissionProtocols,
- 10: required map<string, DataMovementProtocol> dataMovementProtocols
-}
-
-/*
-struct ComputeResourceDescription {
- 1: required bool isEmpty = 0,
- 2: required string resourceId = DEFAULT_ID,
- 3: required string hostName,
- 4: optional set<string> hostAliases,
- 4: optional set<string> ipAddresses,
- 5: optional string resourceDescription,
- 6: required map<JobSubmissionProtocol, JobSubmissionProtocols> jobSubmissionProtocols,
- 7: required map<DataMovementProtocol, DataMovementProtocol> dataMovementProtocols
-}*/
-
-enum ParameterType {
- STRING,
- INT,
- URL,
-
-}
-
-struct Validation{
-}
-
-struct InputParameter {
- 1:required string name,
- 2:required ParameterType type,
- 3:required bool isOptional=0,
- 4:optional string defaultValue,
- 5:optional list<Validation> validations
-}
-
-struct OutputParameter {
- 1:required string name,
- 2:required ParameterType type,
-}
-
-struct ApplicationDeployment {
- 1: required string deploymentId = DEFAULT_ID,
- 2: required string hostId,
- 3: required string executablePath,
- 4: optional map<string,string> environment,
-}
-
-struct Application {
- 1: required bool isEmpty = 0,
- 2: required string applicationId = DEFAULT_ID,
- 4: optional list<InputParameter> input,
- 5: optional list<OutputParameter> output,
- 6: required list<ApplicationDeployment> deployment
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 537d20d..bc2b34d 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -363,7 +363,7 @@ struct ValidationResults {
struct Experiment {
1: required string experimentID = DEFAULT_ID,
- 2: required string projectID = DEFAULT_PROJECT_NAME
+ 2: required string projectID = DEFAULT_PROJECT_NAME,
3: optional i64 creationTime,
4: required string userName,
5: required string name,
[3/7] adding id to all the job submission protocols and data movement
protocols - AIRAVATA-1203
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java
deleted file mode 100644
index a4c548d..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java
+++ /dev/null
@@ -1,1163 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class GSISSHJobSubmission implements org.apache.thrift.TBase<GSISSHJobSubmission, GSISSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GSISSHJobSubmission> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GSISSHJobSubmission");
-
- private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final org.apache.thrift.protocol.TField EXPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("exports", org.apache.thrift.protocol.TType.SET, (short)4);
- private static final org.apache.thrift.protocol.TField PRE_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("preJobCommands", org.apache.thrift.protocol.TType.LIST, (short)5);
- private static final org.apache.thrift.protocol.TField POST_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("postJobCommands", org.apache.thrift.protocol.TType.LIST, (short)6);
- private static final org.apache.thrift.protocol.TField INSTALLED_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("installedPath", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.STRING, (short)8);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GSISSHJobSubmissionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GSISSHJobSubmissionTupleSchemeFactory());
- }
-
- private ResourceJobManager resourceJobManager; // required
- private int sshPort; // optional
- private Set<String> exports; // optional
- private List<String> preJobCommands; // optional
- private List<String> postJobCommands; // optional
- private String installedPath; // optional
- private String monitorMode; // 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 {
- /**
- *
- * @see ResourceJobManager
- */
- RESOURCE_JOB_MANAGER((short)2, "resourceJobManager"),
- SSH_PORT((short)3, "sshPort"),
- EXPORTS((short)4, "exports"),
- PRE_JOB_COMMANDS((short)5, "preJobCommands"),
- POST_JOB_COMMANDS((short)6, "postJobCommands"),
- INSTALLED_PATH((short)7, "installedPath"),
- MONITOR_MODE((short)8, "monitorMode");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 2: // RESOURCE_JOB_MANAGER
- return RESOURCE_JOB_MANAGER;
- case 3: // SSH_PORT
- return SSH_PORT;
- case 4: // EXPORTS
- return EXPORTS;
- case 5: // PRE_JOB_COMMANDS
- return PRE_JOB_COMMANDS;
- case 6: // POST_JOB_COMMANDS
- return POST_JOB_COMMANDS;
- case 7: // INSTALLED_PATH
- return INSTALLED_PATH;
- case 8: // MONITOR_MODE
- return MONITOR_MODE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SSHPORT_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.SSH_PORT,_Fields.EXPORTS,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS,_Fields.INSTALLED_PATH,_Fields.MONITOR_MODE};
- 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.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
- tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.EXPORTS, new org.apache.thrift.meta_data.FieldMetaData("exports", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.PRE_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("preJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.POST_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("postJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.INSTALLED_PATH, new org.apache.thrift.meta_data.FieldMetaData("installedPath", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GSISSHJobSubmission.class, metaDataMap);
- }
-
- public GSISSHJobSubmission() {
- this.sshPort = 22;
-
- }
-
- public GSISSHJobSubmission(
- ResourceJobManager resourceJobManager)
- {
- this();
- this.resourceJobManager = resourceJobManager;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public GSISSHJobSubmission(GSISSHJobSubmission other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetResourceJobManager()) {
- this.resourceJobManager = other.resourceJobManager;
- }
- this.sshPort = other.sshPort;
- if (other.isSetExports()) {
- Set<String> __this__exports = new HashSet<String>(other.exports);
- this.exports = __this__exports;
- }
- if (other.isSetPreJobCommands()) {
- List<String> __this__preJobCommands = new ArrayList<String>(other.preJobCommands);
- this.preJobCommands = __this__preJobCommands;
- }
- if (other.isSetPostJobCommands()) {
- List<String> __this__postJobCommands = new ArrayList<String>(other.postJobCommands);
- this.postJobCommands = __this__postJobCommands;
- }
- if (other.isSetInstalledPath()) {
- this.installedPath = other.installedPath;
- }
- if (other.isSetMonitorMode()) {
- this.monitorMode = other.monitorMode;
- }
- }
-
- public GSISSHJobSubmission deepCopy() {
- return new GSISSHJobSubmission(this);
- }
-
- @Override
- public void clear() {
- this.resourceJobManager = null;
- this.sshPort = 22;
-
- this.exports = null;
- this.preJobCommands = null;
- this.postJobCommands = null;
- this.installedPath = null;
- this.monitorMode = null;
- }
-
- /**
- *
- * @see ResourceJobManager
- */
- public ResourceJobManager getResourceJobManager() {
- return this.resourceJobManager;
- }
-
- /**
- *
- * @see ResourceJobManager
- */
- public void setResourceJobManager(ResourceJobManager resourceJobManager) {
- this.resourceJobManager = resourceJobManager;
- }
-
- public void unsetResourceJobManager() {
- this.resourceJobManager = null;
- }
-
- /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
- public boolean isSetResourceJobManager() {
- return this.resourceJobManager != null;
- }
-
- public void setResourceJobManagerIsSet(boolean value) {
- if (!value) {
- this.resourceJobManager = null;
- }
- }
-
- public int getSshPort() {
- return this.sshPort;
- }
-
- public void setSshPort(int sshPort) {
- this.sshPort = sshPort;
- setSshPortIsSet(true);
- }
-
- public void unsetSshPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID);
- }
-
- /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */
- public boolean isSetSshPort() {
- return EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID);
- }
-
- public void setSshPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
- }
-
- public int getExportsSize() {
- return (this.exports == null) ? 0 : this.exports.size();
- }
-
- public java.util.Iterator<String> getExportsIterator() {
- return (this.exports == null) ? null : this.exports.iterator();
- }
-
- public void addToExports(String elem) {
- if (this.exports == null) {
- this.exports = new HashSet<String>();
- }
- this.exports.add(elem);
- }
-
- public Set<String> getExports() {
- return this.exports;
- }
-
- public void setExports(Set<String> exports) {
- this.exports = exports;
- }
-
- public void unsetExports() {
- this.exports = null;
- }
-
- /** Returns true if field exports is set (has been assigned a value) and false otherwise */
- public boolean isSetExports() {
- return this.exports != null;
- }
-
- public void setExportsIsSet(boolean value) {
- if (!value) {
- this.exports = null;
- }
- }
-
- public int getPreJobCommandsSize() {
- return (this.preJobCommands == null) ? 0 : this.preJobCommands.size();
- }
-
- public java.util.Iterator<String> getPreJobCommandsIterator() {
- return (this.preJobCommands == null) ? null : this.preJobCommands.iterator();
- }
-
- public void addToPreJobCommands(String elem) {
- if (this.preJobCommands == null) {
- this.preJobCommands = new ArrayList<String>();
- }
- this.preJobCommands.add(elem);
- }
-
- public List<String> getPreJobCommands() {
- return this.preJobCommands;
- }
-
- public void setPreJobCommands(List<String> preJobCommands) {
- this.preJobCommands = preJobCommands;
- }
-
- public void unsetPreJobCommands() {
- this.preJobCommands = null;
- }
-
- /** Returns true if field preJobCommands is set (has been assigned a value) and false otherwise */
- public boolean isSetPreJobCommands() {
- return this.preJobCommands != null;
- }
-
- public void setPreJobCommandsIsSet(boolean value) {
- if (!value) {
- this.preJobCommands = null;
- }
- }
-
- public int getPostJobCommandsSize() {
- return (this.postJobCommands == null) ? 0 : this.postJobCommands.size();
- }
-
- public java.util.Iterator<String> getPostJobCommandsIterator() {
- return (this.postJobCommands == null) ? null : this.postJobCommands.iterator();
- }
-
- public void addToPostJobCommands(String elem) {
- if (this.postJobCommands == null) {
- this.postJobCommands = new ArrayList<String>();
- }
- this.postJobCommands.add(elem);
- }
-
- public List<String> getPostJobCommands() {
- return this.postJobCommands;
- }
-
- public void setPostJobCommands(List<String> postJobCommands) {
- this.postJobCommands = postJobCommands;
- }
-
- public void unsetPostJobCommands() {
- this.postJobCommands = null;
- }
-
- /** Returns true if field postJobCommands is set (has been assigned a value) and false otherwise */
- public boolean isSetPostJobCommands() {
- return this.postJobCommands != null;
- }
-
- public void setPostJobCommandsIsSet(boolean value) {
- if (!value) {
- this.postJobCommands = null;
- }
- }
-
- public String getInstalledPath() {
- return this.installedPath;
- }
-
- public void setInstalledPath(String installedPath) {
- this.installedPath = installedPath;
- }
-
- public void unsetInstalledPath() {
- this.installedPath = null;
- }
-
- /** Returns true if field installedPath is set (has been assigned a value) and false otherwise */
- public boolean isSetInstalledPath() {
- return this.installedPath != null;
- }
-
- public void setInstalledPathIsSet(boolean value) {
- if (!value) {
- this.installedPath = null;
- }
- }
-
- public String getMonitorMode() {
- return this.monitorMode;
- }
-
- public void setMonitorMode(String monitorMode) {
- this.monitorMode = monitorMode;
- }
-
- public void unsetMonitorMode() {
- this.monitorMode = null;
- }
-
- /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
- public boolean isSetMonitorMode() {
- return this.monitorMode != null;
- }
-
- public void setMonitorModeIsSet(boolean value) {
- if (!value) {
- this.monitorMode = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case RESOURCE_JOB_MANAGER:
- if (value == null) {
- unsetResourceJobManager();
- } else {
- setResourceJobManager((ResourceJobManager)value);
- }
- break;
-
- case SSH_PORT:
- if (value == null) {
- unsetSshPort();
- } else {
- setSshPort((Integer)value);
- }
- break;
-
- case EXPORTS:
- if (value == null) {
- unsetExports();
- } else {
- setExports((Set<String>)value);
- }
- break;
-
- case PRE_JOB_COMMANDS:
- if (value == null) {
- unsetPreJobCommands();
- } else {
- setPreJobCommands((List<String>)value);
- }
- break;
-
- case POST_JOB_COMMANDS:
- if (value == null) {
- unsetPostJobCommands();
- } else {
- setPostJobCommands((List<String>)value);
- }
- break;
-
- case INSTALLED_PATH:
- if (value == null) {
- unsetInstalledPath();
- } else {
- setInstalledPath((String)value);
- }
- break;
-
- case MONITOR_MODE:
- if (value == null) {
- unsetMonitorMode();
- } else {
- setMonitorMode((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case RESOURCE_JOB_MANAGER:
- return getResourceJobManager();
-
- case SSH_PORT:
- return Integer.valueOf(getSshPort());
-
- case EXPORTS:
- return getExports();
-
- case PRE_JOB_COMMANDS:
- return getPreJobCommands();
-
- case POST_JOB_COMMANDS:
- return getPostJobCommands();
-
- case INSTALLED_PATH:
- return getInstalledPath();
-
- case MONITOR_MODE:
- return getMonitorMode();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case RESOURCE_JOB_MANAGER:
- return isSetResourceJobManager();
- case SSH_PORT:
- return isSetSshPort();
- case EXPORTS:
- return isSetExports();
- case PRE_JOB_COMMANDS:
- return isSetPreJobCommands();
- case POST_JOB_COMMANDS:
- return isSetPostJobCommands();
- case INSTALLED_PATH:
- return isSetInstalledPath();
- case MONITOR_MODE:
- return isSetMonitorMode();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof GSISSHJobSubmission)
- return this.equals((GSISSHJobSubmission)that);
- return false;
- }
-
- public boolean equals(GSISSHJobSubmission that) {
- if (that == null)
- return false;
-
- boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
- boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
- if (this_present_resourceJobManager || that_present_resourceJobManager) {
- if (!(this_present_resourceJobManager && that_present_resourceJobManager))
- return false;
- if (!this.resourceJobManager.equals(that.resourceJobManager))
- return false;
- }
-
- boolean this_present_sshPort = true && this.isSetSshPort();
- boolean that_present_sshPort = true && that.isSetSshPort();
- if (this_present_sshPort || that_present_sshPort) {
- if (!(this_present_sshPort && that_present_sshPort))
- return false;
- if (this.sshPort != that.sshPort)
- return false;
- }
-
- boolean this_present_exports = true && this.isSetExports();
- boolean that_present_exports = true && that.isSetExports();
- if (this_present_exports || that_present_exports) {
- if (!(this_present_exports && that_present_exports))
- return false;
- if (!this.exports.equals(that.exports))
- return false;
- }
-
- boolean this_present_preJobCommands = true && this.isSetPreJobCommands();
- boolean that_present_preJobCommands = true && that.isSetPreJobCommands();
- if (this_present_preJobCommands || that_present_preJobCommands) {
- if (!(this_present_preJobCommands && that_present_preJobCommands))
- return false;
- if (!this.preJobCommands.equals(that.preJobCommands))
- return false;
- }
-
- boolean this_present_postJobCommands = true && this.isSetPostJobCommands();
- boolean that_present_postJobCommands = true && that.isSetPostJobCommands();
- if (this_present_postJobCommands || that_present_postJobCommands) {
- if (!(this_present_postJobCommands && that_present_postJobCommands))
- return false;
- if (!this.postJobCommands.equals(that.postJobCommands))
- return false;
- }
-
- boolean this_present_installedPath = true && this.isSetInstalledPath();
- boolean that_present_installedPath = true && that.isSetInstalledPath();
- if (this_present_installedPath || that_present_installedPath) {
- if (!(this_present_installedPath && that_present_installedPath))
- return false;
- if (!this.installedPath.equals(that.installedPath))
- return false;
- }
-
- boolean this_present_monitorMode = true && this.isSetMonitorMode();
- boolean that_present_monitorMode = true && that.isSetMonitorMode();
- if (this_present_monitorMode || that_present_monitorMode) {
- if (!(this_present_monitorMode && that_present_monitorMode))
- return false;
- if (!this.monitorMode.equals(that.monitorMode))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(GSISSHJobSubmission other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetResourceJobManager()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSshPort()).compareTo(other.isSetSshPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetExports()).compareTo(other.isSetExports());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExports()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exports, other.exports);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPreJobCommands()).compareTo(other.isSetPreJobCommands());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPreJobCommands()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preJobCommands, other.preJobCommands);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPostJobCommands()).compareTo(other.isSetPostJobCommands());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPostJobCommands()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.postJobCommands, other.postJobCommands);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetInstalledPath()).compareTo(other.isSetInstalledPath());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInstalledPath()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.installedPath, other.installedPath);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMonitorMode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GSISSHJobSubmission(");
- boolean first = true;
-
- sb.append("resourceJobManager:");
- if (this.resourceJobManager == null) {
- sb.append("null");
- } else {
- sb.append(this.resourceJobManager);
- }
- first = false;
- if (isSetSshPort()) {
- if (!first) sb.append(", ");
- sb.append("sshPort:");
- sb.append(this.sshPort);
- first = false;
- }
- if (isSetExports()) {
- if (!first) sb.append(", ");
- sb.append("exports:");
- if (this.exports == null) {
- sb.append("null");
- } else {
- sb.append(this.exports);
- }
- first = false;
- }
- if (isSetPreJobCommands()) {
- if (!first) sb.append(", ");
- sb.append("preJobCommands:");
- if (this.preJobCommands == null) {
- sb.append("null");
- } else {
- sb.append(this.preJobCommands);
- }
- first = false;
- }
- if (isSetPostJobCommands()) {
- if (!first) sb.append(", ");
- sb.append("postJobCommands:");
- if (this.postJobCommands == null) {
- sb.append("null");
- } else {
- sb.append(this.postJobCommands);
- }
- first = false;
- }
- if (isSetInstalledPath()) {
- if (!first) sb.append(", ");
- sb.append("installedPath:");
- if (this.installedPath == null) {
- sb.append("null");
- } else {
- sb.append(this.installedPath);
- }
- first = false;
- }
- if (isSetMonitorMode()) {
- if (!first) sb.append(", ");
- sb.append("monitorMode:");
- if (this.monitorMode == null) {
- sb.append("null");
- } else {
- sb.append(this.monitorMode);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetResourceJobManager()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- }
- }
-
- private static class GSISSHJobSubmissionStandardSchemeFactory implements SchemeFactory {
- public GSISSHJobSubmissionStandardScheme getScheme() {
- return new GSISSHJobSubmissionStandardScheme();
- }
- }
-
- private static class GSISSHJobSubmissionStandardScheme extends StandardScheme<GSISSHJobSubmission> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 2: // RESOURCE_JOB_MANAGER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
- struct.setResourceJobManagerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SSH_PORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.sshPort = iprot.readI32();
- struct.setSshPortIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // EXPORTS
- if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
- {
- org.apache.thrift.protocol.TSet _set0 = iprot.readSetBegin();
- struct.exports = new HashSet<String>(2*_set0.size);
- for (int _i1 = 0; _i1 < _set0.size; ++_i1)
- {
- String _elem2;
- _elem2 = iprot.readString();
- struct.exports.add(_elem2);
- }
- iprot.readSetEnd();
- }
- struct.setExportsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // PRE_JOB_COMMANDS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
- struct.preJobCommands = new ArrayList<String>(_list3.size);
- for (int _i4 = 0; _i4 < _list3.size; ++_i4)
- {
- String _elem5;
- _elem5 = iprot.readString();
- struct.preJobCommands.add(_elem5);
- }
- iprot.readListEnd();
- }
- struct.setPreJobCommandsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // POST_JOB_COMMANDS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
- struct.postJobCommands = new ArrayList<String>(_list6.size);
- for (int _i7 = 0; _i7 < _list6.size; ++_i7)
- {
- String _elem8;
- _elem8 = iprot.readString();
- struct.postJobCommands.add(_elem8);
- }
- iprot.readListEnd();
- }
- struct.setPostJobCommandsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // INSTALLED_PATH
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.installedPath = iprot.readString();
- struct.setInstalledPathIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // MONITOR_MODE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.monitorMode = iprot.readString();
- struct.setMonitorModeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.resourceJobManager != null) {
- oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
- oprot.writeI32(struct.resourceJobManager.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.isSetSshPort()) {
- oprot.writeFieldBegin(SSH_PORT_FIELD_DESC);
- oprot.writeI32(struct.sshPort);
- oprot.writeFieldEnd();
- }
- if (struct.exports != null) {
- if (struct.isSetExports()) {
- oprot.writeFieldBegin(EXPORTS_FIELD_DESC);
- {
- oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.exports.size()));
- for (String _iter9 : struct.exports)
- {
- oprot.writeString(_iter9);
- }
- oprot.writeSetEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.preJobCommands != null) {
- if (struct.isSetPreJobCommands()) {
- oprot.writeFieldBegin(PRE_JOB_COMMANDS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.preJobCommands.size()));
- for (String _iter10 : struct.preJobCommands)
- {
- oprot.writeString(_iter10);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.postJobCommands != null) {
- if (struct.isSetPostJobCommands()) {
- oprot.writeFieldBegin(POST_JOB_COMMANDS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.postJobCommands.size()));
- for (String _iter11 : struct.postJobCommands)
- {
- oprot.writeString(_iter11);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.installedPath != null) {
- if (struct.isSetInstalledPath()) {
- oprot.writeFieldBegin(INSTALLED_PATH_FIELD_DESC);
- oprot.writeString(struct.installedPath);
- oprot.writeFieldEnd();
- }
- }
- if (struct.monitorMode != null) {
- if (struct.isSetMonitorMode()) {
- oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
- oprot.writeString(struct.monitorMode);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class GSISSHJobSubmissionTupleSchemeFactory implements SchemeFactory {
- public GSISSHJobSubmissionTupleScheme getScheme() {
- return new GSISSHJobSubmissionTupleScheme();
- }
- }
-
- private static class GSISSHJobSubmissionTupleScheme extends TupleScheme<GSISSHJobSubmission> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.resourceJobManager.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetSshPort()) {
- optionals.set(0);
- }
- if (struct.isSetExports()) {
- optionals.set(1);
- }
- if (struct.isSetPreJobCommands()) {
- optionals.set(2);
- }
- if (struct.isSetPostJobCommands()) {
- optionals.set(3);
- }
- if (struct.isSetInstalledPath()) {
- optionals.set(4);
- }
- if (struct.isSetMonitorMode()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetSshPort()) {
- oprot.writeI32(struct.sshPort);
- }
- if (struct.isSetExports()) {
- {
- oprot.writeI32(struct.exports.size());
- for (String _iter12 : struct.exports)
- {
- oprot.writeString(_iter12);
- }
- }
- }
- if (struct.isSetPreJobCommands()) {
- {
- oprot.writeI32(struct.preJobCommands.size());
- for (String _iter13 : struct.preJobCommands)
- {
- oprot.writeString(_iter13);
- }
- }
- }
- if (struct.isSetPostJobCommands()) {
- {
- oprot.writeI32(struct.postJobCommands.size());
- for (String _iter14 : struct.postJobCommands)
- {
- oprot.writeString(_iter14);
- }
- }
- }
- if (struct.isSetInstalledPath()) {
- oprot.writeString(struct.installedPath);
- }
- if (struct.isSetMonitorMode()) {
- oprot.writeString(struct.monitorMode);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
- struct.setResourceJobManagerIsSet(true);
- BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.sshPort = iprot.readI32();
- struct.setSshPortIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TSet _set15 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.exports = new HashSet<String>(2*_set15.size);
- for (int _i16 = 0; _i16 < _set15.size; ++_i16)
- {
- String _elem17;
- _elem17 = iprot.readString();
- struct.exports.add(_elem17);
- }
- }
- struct.setExportsIsSet(true);
- }
- if (incoming.get(2)) {
- {
- org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.preJobCommands = new ArrayList<String>(_list18.size);
- for (int _i19 = 0; _i19 < _list18.size; ++_i19)
- {
- String _elem20;
- _elem20 = iprot.readString();
- struct.preJobCommands.add(_elem20);
- }
- }
- struct.setPreJobCommandsIsSet(true);
- }
- if (incoming.get(3)) {
- {
- org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.postJobCommands = new ArrayList<String>(_list21.size);
- for (int _i22 = 0; _i22 < _list21.size; ++_i22)
- {
- String _elem23;
- _elem23 = iprot.readString();
- struct.postJobCommands.add(_elem23);
- }
- }
- struct.setPostJobCommandsIsSet(true);
- }
- if (incoming.get(4)) {
- struct.installedPath = iprot.readString();
- struct.setInstalledPathIsSet(true);
- }
- if (incoming.get(5)) {
- struct.monitorMode = iprot.readString();
- struct.setMonitorModeIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
deleted file mode 100644
index 9673e35..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
+++ /dev/null
@@ -1,620 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class GlobusJobSubmission implements org.apache.thrift.TBase<GlobusJobSubmission, GlobusJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GlobusJobSubmission> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobusJobSubmission");
-
- private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField GLOBUS_GATE_KEEPER_END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGateKeeperEndPoint", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GlobusJobSubmissionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GlobusJobSubmissionTupleSchemeFactory());
- }
-
- private SecurityProtocol securityProtocol; // required
- private ResourceJobManager resourceJobManager; // required
- private String globusGateKeeperEndPoint; // 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 {
- /**
- *
- * @see SecurityProtocol
- */
- SECURITY_PROTOCOL((short)1, "securityProtocol"),
- /**
- *
- * @see ResourceJobManager
- */
- RESOURCE_JOB_MANAGER((short)2, "resourceJobManager"),
- GLOBUS_GATE_KEEPER_END_POINT((short)3, "globusGateKeeperEndPoint");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SECURITY_PROTOCOL
- return SECURITY_PROTOCOL;
- case 2: // RESOURCE_JOB_MANAGER
- return RESOURCE_JOB_MANAGER;
- case 3: // GLOBUS_GATE_KEEPER_END_POINT
- return GLOBUS_GATE_KEEPER_END_POINT;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private _Fields optionals[] = {_Fields.GLOBUS_GATE_KEEPER_END_POINT};
- 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.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
- tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
- tmpMap.put(_Fields.GLOBUS_GATE_KEEPER_END_POINT, new org.apache.thrift.meta_data.FieldMetaData("globusGateKeeperEndPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GlobusJobSubmission.class, metaDataMap);
- }
-
- public GlobusJobSubmission() {
- }
-
- public GlobusJobSubmission(
- SecurityProtocol securityProtocol,
- ResourceJobManager resourceJobManager)
- {
- this();
- this.securityProtocol = securityProtocol;
- this.resourceJobManager = resourceJobManager;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public GlobusJobSubmission(GlobusJobSubmission other) {
- if (other.isSetSecurityProtocol()) {
- this.securityProtocol = other.securityProtocol;
- }
- if (other.isSetResourceJobManager()) {
- this.resourceJobManager = other.resourceJobManager;
- }
- if (other.isSetGlobusGateKeeperEndPoint()) {
- this.globusGateKeeperEndPoint = other.globusGateKeeperEndPoint;
- }
- }
-
- public GlobusJobSubmission deepCopy() {
- return new GlobusJobSubmission(this);
- }
-
- @Override
- public void clear() {
- this.securityProtocol = null;
- this.resourceJobManager = null;
- this.globusGateKeeperEndPoint = null;
- }
-
- /**
- *
- * @see SecurityProtocol
- */
- public SecurityProtocol getSecurityProtocol() {
- return this.securityProtocol;
- }
-
- /**
- *
- * @see SecurityProtocol
- */
- public void setSecurityProtocol(SecurityProtocol securityProtocol) {
- this.securityProtocol = securityProtocol;
- }
-
- public void unsetSecurityProtocol() {
- this.securityProtocol = null;
- }
-
- /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */
- public boolean isSetSecurityProtocol() {
- return this.securityProtocol != null;
- }
-
- public void setSecurityProtocolIsSet(boolean value) {
- if (!value) {
- this.securityProtocol = null;
- }
- }
-
- /**
- *
- * @see ResourceJobManager
- */
- public ResourceJobManager getResourceJobManager() {
- return this.resourceJobManager;
- }
-
- /**
- *
- * @see ResourceJobManager
- */
- public void setResourceJobManager(ResourceJobManager resourceJobManager) {
- this.resourceJobManager = resourceJobManager;
- }
-
- public void unsetResourceJobManager() {
- this.resourceJobManager = null;
- }
-
- /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
- public boolean isSetResourceJobManager() {
- return this.resourceJobManager != null;
- }
-
- public void setResourceJobManagerIsSet(boolean value) {
- if (!value) {
- this.resourceJobManager = null;
- }
- }
-
- public String getGlobusGateKeeperEndPoint() {
- return this.globusGateKeeperEndPoint;
- }
-
- public void setGlobusGateKeeperEndPoint(String globusGateKeeperEndPoint) {
- this.globusGateKeeperEndPoint = globusGateKeeperEndPoint;
- }
-
- public void unsetGlobusGateKeeperEndPoint() {
- this.globusGateKeeperEndPoint = null;
- }
-
- /** Returns true if field globusGateKeeperEndPoint is set (has been assigned a value) and false otherwise */
- public boolean isSetGlobusGateKeeperEndPoint() {
- return this.globusGateKeeperEndPoint != null;
- }
-
- public void setGlobusGateKeeperEndPointIsSet(boolean value) {
- if (!value) {
- this.globusGateKeeperEndPoint = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SECURITY_PROTOCOL:
- if (value == null) {
- unsetSecurityProtocol();
- } else {
- setSecurityProtocol((SecurityProtocol)value);
- }
- break;
-
- case RESOURCE_JOB_MANAGER:
- if (value == null) {
- unsetResourceJobManager();
- } else {
- setResourceJobManager((ResourceJobManager)value);
- }
- break;
-
- case GLOBUS_GATE_KEEPER_END_POINT:
- if (value == null) {
- unsetGlobusGateKeeperEndPoint();
- } else {
- setGlobusGateKeeperEndPoint((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SECURITY_PROTOCOL:
- return getSecurityProtocol();
-
- case RESOURCE_JOB_MANAGER:
- return getResourceJobManager();
-
- case GLOBUS_GATE_KEEPER_END_POINT:
- return getGlobusGateKeeperEndPoint();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SECURITY_PROTOCOL:
- return isSetSecurityProtocol();
- case RESOURCE_JOB_MANAGER:
- return isSetResourceJobManager();
- case GLOBUS_GATE_KEEPER_END_POINT:
- return isSetGlobusGateKeeperEndPoint();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof GlobusJobSubmission)
- return this.equals((GlobusJobSubmission)that);
- return false;
- }
-
- public boolean equals(GlobusJobSubmission that) {
- if (that == null)
- return false;
-
- boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
- boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
- if (this_present_securityProtocol || that_present_securityProtocol) {
- if (!(this_present_securityProtocol && that_present_securityProtocol))
- return false;
- if (!this.securityProtocol.equals(that.securityProtocol))
- return false;
- }
-
- boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
- boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
- if (this_present_resourceJobManager || that_present_resourceJobManager) {
- if (!(this_present_resourceJobManager && that_present_resourceJobManager))
- return false;
- if (!this.resourceJobManager.equals(that.resourceJobManager))
- return false;
- }
-
- boolean this_present_globusGateKeeperEndPoint = true && this.isSetGlobusGateKeeperEndPoint();
- boolean that_present_globusGateKeeperEndPoint = true && that.isSetGlobusGateKeeperEndPoint();
- if (this_present_globusGateKeeperEndPoint || that_present_globusGateKeeperEndPoint) {
- if (!(this_present_globusGateKeeperEndPoint && that_present_globusGateKeeperEndPoint))
- return false;
- if (!this.globusGateKeeperEndPoint.equals(that.globusGateKeeperEndPoint))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(GlobusJobSubmission other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSecurityProtocol()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetResourceJobManager()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGlobusGateKeeperEndPoint()).compareTo(other.isSetGlobusGateKeeperEndPoint());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGlobusGateKeeperEndPoint()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusGateKeeperEndPoint, other.globusGateKeeperEndPoint);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GlobusJobSubmission(");
- boolean first = true;
-
- sb.append("securityProtocol:");
- if (this.securityProtocol == null) {
- sb.append("null");
- } else {
- sb.append(this.securityProtocol);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("resourceJobManager:");
- if (this.resourceJobManager == null) {
- sb.append("null");
- } else {
- sb.append(this.resourceJobManager);
- }
- first = false;
- if (isSetGlobusGateKeeperEndPoint()) {
- if (!first) sb.append(", ");
- sb.append("globusGateKeeperEndPoint:");
- if (this.globusGateKeeperEndPoint == null) {
- sb.append("null");
- } else {
- sb.append(this.globusGateKeeperEndPoint);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetSecurityProtocol()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
- }
-
- if (!isSetResourceJobManager()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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);
- }
- }
-
- private static class GlobusJobSubmissionStandardSchemeFactory implements SchemeFactory {
- public GlobusJobSubmissionStandardScheme getScheme() {
- return new GlobusJobSubmissionStandardScheme();
- }
- }
-
- private static class GlobusJobSubmissionStandardScheme extends StandardScheme<GlobusJobSubmission> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SECURITY_PROTOCOL
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
- struct.setSecurityProtocolIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // RESOURCE_JOB_MANAGER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
- struct.setResourceJobManagerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // GLOBUS_GATE_KEEPER_END_POINT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.globusGateKeeperEndPoint = iprot.readString();
- struct.setGlobusGateKeeperEndPointIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.securityProtocol != null) {
- oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
- oprot.writeI32(struct.securityProtocol.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.resourceJobManager != null) {
- oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
- oprot.writeI32(struct.resourceJobManager.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.globusGateKeeperEndPoint != null) {
- if (struct.isSetGlobusGateKeeperEndPoint()) {
- oprot.writeFieldBegin(GLOBUS_GATE_KEEPER_END_POINT_FIELD_DESC);
- oprot.writeString(struct.globusGateKeeperEndPoint);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class GlobusJobSubmissionTupleSchemeFactory implements SchemeFactory {
- public GlobusJobSubmissionTupleScheme getScheme() {
- return new GlobusJobSubmissionTupleScheme();
- }
- }
-
- private static class GlobusJobSubmissionTupleScheme extends TupleScheme<GlobusJobSubmission> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.securityProtocol.getValue());
- oprot.writeI32(struct.resourceJobManager.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetGlobusGateKeeperEndPoint()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetGlobusGateKeeperEndPoint()) {
- oprot.writeString(struct.globusGateKeeperEndPoint);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
- struct.setSecurityProtocolIsSet(true);
- struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
- struct.setResourceJobManagerIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.globusGateKeeperEndPoint = iprot.readString();
- struct.setGlobusGateKeeperEndPointIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java
deleted file mode 100644
index c61f175..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java
+++ /dev/null
@@ -1,77 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-/**
- * Enumeration of Airavata supported Job Submission Mechanisms for High Perforamance Computing Clusters.
- *
- * SSH:
- * Execute remote job submission commands using via secure shell protocol.
- *
- * GRAM:
- * Execute remote jobs via Globus GRAM service.
- *
- * UNICORE:
- * Execute remote jobs via Unicore services
- *
- */
-@SuppressWarnings("all") public enum JobSubmissionProtocol implements org.apache.thrift.TEnum {
- SSH(0),
- GRAM(1),
- UNICORE(2);
-
- private final int value;
-
- private JobSubmissionProtocol(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static JobSubmissionProtocol findByValue(int value) {
- switch (value) {
- case 0:
- return SSH;
- case 1:
- return GRAM;
- case 2:
- return UNICORE;
- default:
- return null;
- }
- }
-}
[2/7] adding id to all the job submission protocols and data movement
protocols - AIRAVATA-1203
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocols.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocols.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocols.java
deleted file mode 100644
index d6e4c53..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocols.java
+++ /dev/null
@@ -1,937 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Job Submission Protocols
- *
- * resourceId:
- *
- * hostName:
- * Fully Qualified Host Name.
- *
- * ipAddress:
- * IP Addresse of the Hostname.
- *
- * resourceDescription:
- * A user friendly description of the hostname.
- *
- * preferedJobSubmissionProtocol:
- * HPC resources may have multiple options to interact with the resource. This flag identified a prefered mechanism.
- *
- * preferedDataMovementProtocol:
- * Option to specify a prefered data movement mechanism of the available options.
- *
- */
-@SuppressWarnings("all") public class JobSubmissionProtocols implements org.apache.thrift.TBase<JobSubmissionProtocols, JobSubmissionProtocols._Fields>, java.io.Serializable, Cloneable, Comparable<JobSubmissionProtocols> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobSubmissionProtocols");
-
- 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 PREFERED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferedJobSubmissionProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField SSH_JOB_SUBMISSION_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("sshJobSubmissionInfo", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final org.apache.thrift.protocol.TField GLOBUS_GRAMHOST_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGRAMHost", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField GLOBUS_GRAMPORT_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGRAMPort", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final org.apache.thrift.protocol.TField UNICORE_BESEND_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("unicoreBESEndPoint", org.apache.thrift.protocol.TType.STRING, (short)6);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new JobSubmissionProtocolsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new JobSubmissionProtocolsTupleSchemeFactory());
- }
-
- private boolean isEmpty; // required
- private JobSubmissionProtocol preferedJobSubmissionProtocol; // optional
- private SSHJobSubmission sshJobSubmissionInfo; // optional
- private String globusGRAMHost; // optional
- private int globusGRAMPort; // optional
- private String unicoreBESEndPoint; // 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 {
- IS_EMPTY((short)1, "isEmpty"),
- /**
- *
- * @see JobSubmissionProtocol
- */
- PREFERED_JOB_SUBMISSION_PROTOCOL((short)2, "preferedJobSubmissionProtocol"),
- SSH_JOB_SUBMISSION_INFO((short)3, "sshJobSubmissionInfo"),
- GLOBUS_GRAMHOST((short)4, "globusGRAMHost"),
- GLOBUS_GRAMPORT((short)5, "globusGRAMPort"),
- UNICORE_BESEND_POINT((short)6, "unicoreBESEndPoint");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IS_EMPTY
- return IS_EMPTY;
- case 2: // PREFERED_JOB_SUBMISSION_PROTOCOL
- return PREFERED_JOB_SUBMISSION_PROTOCOL;
- case 3: // SSH_JOB_SUBMISSION_INFO
- return SSH_JOB_SUBMISSION_INFO;
- case 4: // GLOBUS_GRAMHOST
- return GLOBUS_GRAMHOST;
- case 5: // GLOBUS_GRAMPORT
- return GLOBUS_GRAMPORT;
- case 6: // UNICORE_BESEND_POINT
- return UNICORE_BESEND_POINT;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ISEMPTY_ISSET_ID = 0;
- private static final int __GLOBUSGRAMPORT_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.PREFERED_JOB_SUBMISSION_PROTOCOL,_Fields.SSH_JOB_SUBMISSION_INFO,_Fields.GLOBUS_GRAMHOST,_Fields.GLOBUS_GRAMPORT,_Fields.UNICORE_BESEND_POINT};
- 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.PREFERED_JOB_SUBMISSION_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferedJobSubmissionProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobSubmissionProtocol.class)));
- tmpMap.put(_Fields.SSH_JOB_SUBMISSION_INFO, new org.apache.thrift.meta_data.FieldMetaData("sshJobSubmissionInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SSHJobSubmission.class)));
- tmpMap.put(_Fields.GLOBUS_GRAMHOST, new org.apache.thrift.meta_data.FieldMetaData("globusGRAMHost", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.GLOBUS_GRAMPORT, new org.apache.thrift.meta_data.FieldMetaData("globusGRAMPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.UNICORE_BESEND_POINT, new org.apache.thrift.meta_data.FieldMetaData("unicoreBESEndPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobSubmissionProtocols.class, metaDataMap);
- }
-
- public JobSubmissionProtocols() {
- this.isEmpty = false;
-
- this.globusGRAMPort = 2119;
-
- }
-
- public JobSubmissionProtocols(
- boolean isEmpty)
- {
- this();
- this.isEmpty = isEmpty;
- setIsEmptyIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public JobSubmissionProtocols(JobSubmissionProtocols other) {
- __isset_bitfield = other.__isset_bitfield;
- this.isEmpty = other.isEmpty;
- if (other.isSetPreferedJobSubmissionProtocol()) {
- this.preferedJobSubmissionProtocol = other.preferedJobSubmissionProtocol;
- }
- if (other.isSetSshJobSubmissionInfo()) {
- this.sshJobSubmissionInfo = new SSHJobSubmission(other.sshJobSubmissionInfo);
- }
- if (other.isSetGlobusGRAMHost()) {
- this.globusGRAMHost = other.globusGRAMHost;
- }
- this.globusGRAMPort = other.globusGRAMPort;
- if (other.isSetUnicoreBESEndPoint()) {
- this.unicoreBESEndPoint = other.unicoreBESEndPoint;
- }
- }
-
- public JobSubmissionProtocols deepCopy() {
- return new JobSubmissionProtocols(this);
- }
-
- @Override
- public void clear() {
- this.isEmpty = false;
-
- this.preferedJobSubmissionProtocol = null;
- this.sshJobSubmissionInfo = null;
- this.globusGRAMHost = null;
- this.globusGRAMPort = 2119;
-
- this.unicoreBESEndPoint = 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);
- }
-
- /**
- *
- * @see JobSubmissionProtocol
- */
- public JobSubmissionProtocol getPreferedJobSubmissionProtocol() {
- return this.preferedJobSubmissionProtocol;
- }
-
- /**
- *
- * @see JobSubmissionProtocol
- */
- public void setPreferedJobSubmissionProtocol(JobSubmissionProtocol preferedJobSubmissionProtocol) {
- this.preferedJobSubmissionProtocol = preferedJobSubmissionProtocol;
- }
-
- public void unsetPreferedJobSubmissionProtocol() {
- this.preferedJobSubmissionProtocol = null;
- }
-
- /** Returns true if field preferedJobSubmissionProtocol is set (has been assigned a value) and false otherwise */
- public boolean isSetPreferedJobSubmissionProtocol() {
- return this.preferedJobSubmissionProtocol != null;
- }
-
- public void setPreferedJobSubmissionProtocolIsSet(boolean value) {
- if (!value) {
- this.preferedJobSubmissionProtocol = null;
- }
- }
-
- public SSHJobSubmission getSshJobSubmissionInfo() {
- return this.sshJobSubmissionInfo;
- }
-
- public void setSshJobSubmissionInfo(SSHJobSubmission sshJobSubmissionInfo) {
- this.sshJobSubmissionInfo = sshJobSubmissionInfo;
- }
-
- public void unsetSshJobSubmissionInfo() {
- this.sshJobSubmissionInfo = null;
- }
-
- /** Returns true if field sshJobSubmissionInfo is set (has been assigned a value) and false otherwise */
- public boolean isSetSshJobSubmissionInfo() {
- return this.sshJobSubmissionInfo != null;
- }
-
- public void setSshJobSubmissionInfoIsSet(boolean value) {
- if (!value) {
- this.sshJobSubmissionInfo = null;
- }
- }
-
- public String getGlobusGRAMHost() {
- return this.globusGRAMHost;
- }
-
- public void setGlobusGRAMHost(String globusGRAMHost) {
- this.globusGRAMHost = globusGRAMHost;
- }
-
- public void unsetGlobusGRAMHost() {
- this.globusGRAMHost = null;
- }
-
- /** Returns true if field globusGRAMHost is set (has been assigned a value) and false otherwise */
- public boolean isSetGlobusGRAMHost() {
- return this.globusGRAMHost != null;
- }
-
- public void setGlobusGRAMHostIsSet(boolean value) {
- if (!value) {
- this.globusGRAMHost = null;
- }
- }
-
- public int getGlobusGRAMPort() {
- return this.globusGRAMPort;
- }
-
- public void setGlobusGRAMPort(int globusGRAMPort) {
- this.globusGRAMPort = globusGRAMPort;
- setGlobusGRAMPortIsSet(true);
- }
-
- public void unsetGlobusGRAMPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GLOBUSGRAMPORT_ISSET_ID);
- }
-
- /** Returns true if field globusGRAMPort is set (has been assigned a value) and false otherwise */
- public boolean isSetGlobusGRAMPort() {
- return EncodingUtils.testBit(__isset_bitfield, __GLOBUSGRAMPORT_ISSET_ID);
- }
-
- public void setGlobusGRAMPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GLOBUSGRAMPORT_ISSET_ID, value);
- }
-
- public String getUnicoreBESEndPoint() {
- return this.unicoreBESEndPoint;
- }
-
- public void setUnicoreBESEndPoint(String unicoreBESEndPoint) {
- this.unicoreBESEndPoint = unicoreBESEndPoint;
- }
-
- public void unsetUnicoreBESEndPoint() {
- this.unicoreBESEndPoint = null;
- }
-
- /** Returns true if field unicoreBESEndPoint is set (has been assigned a value) and false otherwise */
- public boolean isSetUnicoreBESEndPoint() {
- return this.unicoreBESEndPoint != null;
- }
-
- public void setUnicoreBESEndPointIsSet(boolean value) {
- if (!value) {
- this.unicoreBESEndPoint = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IS_EMPTY:
- if (value == null) {
- unsetIsEmpty();
- } else {
- setIsEmpty((Boolean)value);
- }
- break;
-
- case PREFERED_JOB_SUBMISSION_PROTOCOL:
- if (value == null) {
- unsetPreferedJobSubmissionProtocol();
- } else {
- setPreferedJobSubmissionProtocol((JobSubmissionProtocol)value);
- }
- break;
-
- case SSH_JOB_SUBMISSION_INFO:
- if (value == null) {
- unsetSshJobSubmissionInfo();
- } else {
- setSshJobSubmissionInfo((SSHJobSubmission)value);
- }
- break;
-
- case GLOBUS_GRAMHOST:
- if (value == null) {
- unsetGlobusGRAMHost();
- } else {
- setGlobusGRAMHost((String)value);
- }
- break;
-
- case GLOBUS_GRAMPORT:
- if (value == null) {
- unsetGlobusGRAMPort();
- } else {
- setGlobusGRAMPort((Integer)value);
- }
- break;
-
- case UNICORE_BESEND_POINT:
- if (value == null) {
- unsetUnicoreBESEndPoint();
- } else {
- setUnicoreBESEndPoint((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IS_EMPTY:
- return Boolean.valueOf(isIsEmpty());
-
- case PREFERED_JOB_SUBMISSION_PROTOCOL:
- return getPreferedJobSubmissionProtocol();
-
- case SSH_JOB_SUBMISSION_INFO:
- return getSshJobSubmissionInfo();
-
- case GLOBUS_GRAMHOST:
- return getGlobusGRAMHost();
-
- case GLOBUS_GRAMPORT:
- return Integer.valueOf(getGlobusGRAMPort());
-
- case UNICORE_BESEND_POINT:
- return getUnicoreBESEndPoint();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IS_EMPTY:
- return isSetIsEmpty();
- case PREFERED_JOB_SUBMISSION_PROTOCOL:
- return isSetPreferedJobSubmissionProtocol();
- case SSH_JOB_SUBMISSION_INFO:
- return isSetSshJobSubmissionInfo();
- case GLOBUS_GRAMHOST:
- return isSetGlobusGRAMHost();
- case GLOBUS_GRAMPORT:
- return isSetGlobusGRAMPort();
- case UNICORE_BESEND_POINT:
- return isSetUnicoreBESEndPoint();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof JobSubmissionProtocols)
- return this.equals((JobSubmissionProtocols)that);
- return false;
- }
-
- public boolean equals(JobSubmissionProtocols that) {
- 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_preferedJobSubmissionProtocol = true && this.isSetPreferedJobSubmissionProtocol();
- boolean that_present_preferedJobSubmissionProtocol = true && that.isSetPreferedJobSubmissionProtocol();
- if (this_present_preferedJobSubmissionProtocol || that_present_preferedJobSubmissionProtocol) {
- if (!(this_present_preferedJobSubmissionProtocol && that_present_preferedJobSubmissionProtocol))
- return false;
- if (!this.preferedJobSubmissionProtocol.equals(that.preferedJobSubmissionProtocol))
- return false;
- }
-
- boolean this_present_sshJobSubmissionInfo = true && this.isSetSshJobSubmissionInfo();
- boolean that_present_sshJobSubmissionInfo = true && that.isSetSshJobSubmissionInfo();
- if (this_present_sshJobSubmissionInfo || that_present_sshJobSubmissionInfo) {
- if (!(this_present_sshJobSubmissionInfo && that_present_sshJobSubmissionInfo))
- return false;
- if (!this.sshJobSubmissionInfo.equals(that.sshJobSubmissionInfo))
- return false;
- }
-
- boolean this_present_globusGRAMHost = true && this.isSetGlobusGRAMHost();
- boolean that_present_globusGRAMHost = true && that.isSetGlobusGRAMHost();
- if (this_present_globusGRAMHost || that_present_globusGRAMHost) {
- if (!(this_present_globusGRAMHost && that_present_globusGRAMHost))
- return false;
- if (!this.globusGRAMHost.equals(that.globusGRAMHost))
- return false;
- }
-
- boolean this_present_globusGRAMPort = true && this.isSetGlobusGRAMPort();
- boolean that_present_globusGRAMPort = true && that.isSetGlobusGRAMPort();
- if (this_present_globusGRAMPort || that_present_globusGRAMPort) {
- if (!(this_present_globusGRAMPort && that_present_globusGRAMPort))
- return false;
- if (this.globusGRAMPort != that.globusGRAMPort)
- return false;
- }
-
- boolean this_present_unicoreBESEndPoint = true && this.isSetUnicoreBESEndPoint();
- boolean that_present_unicoreBESEndPoint = true && that.isSetUnicoreBESEndPoint();
- if (this_present_unicoreBESEndPoint || that_present_unicoreBESEndPoint) {
- if (!(this_present_unicoreBESEndPoint && that_present_unicoreBESEndPoint))
- return false;
- if (!this.unicoreBESEndPoint.equals(that.unicoreBESEndPoint))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(JobSubmissionProtocols other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- 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(isSetPreferedJobSubmissionProtocol()).compareTo(other.isSetPreferedJobSubmissionProtocol());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPreferedJobSubmissionProtocol()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferedJobSubmissionProtocol, other.preferedJobSubmissionProtocol);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSshJobSubmissionInfo()).compareTo(other.isSetSshJobSubmissionInfo());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshJobSubmissionInfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshJobSubmissionInfo, other.sshJobSubmissionInfo);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGlobusGRAMHost()).compareTo(other.isSetGlobusGRAMHost());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGlobusGRAMHost()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusGRAMHost, other.globusGRAMHost);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGlobusGRAMPort()).compareTo(other.isSetGlobusGRAMPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGlobusGRAMPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusGRAMPort, other.globusGRAMPort);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUnicoreBESEndPoint()).compareTo(other.isSetUnicoreBESEndPoint());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUnicoreBESEndPoint()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unicoreBESEndPoint, other.unicoreBESEndPoint);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("JobSubmissionProtocols(");
- boolean first = true;
-
- sb.append("isEmpty:");
- sb.append(this.isEmpty);
- first = false;
- if (isSetPreferedJobSubmissionProtocol()) {
- if (!first) sb.append(", ");
- sb.append("preferedJobSubmissionProtocol:");
- if (this.preferedJobSubmissionProtocol == null) {
- sb.append("null");
- } else {
- sb.append(this.preferedJobSubmissionProtocol);
- }
- first = false;
- }
- if (isSetSshJobSubmissionInfo()) {
- if (!first) sb.append(", ");
- sb.append("sshJobSubmissionInfo:");
- if (this.sshJobSubmissionInfo == null) {
- sb.append("null");
- } else {
- sb.append(this.sshJobSubmissionInfo);
- }
- first = false;
- }
- if (isSetGlobusGRAMHost()) {
- if (!first) sb.append(", ");
- sb.append("globusGRAMHost:");
- if (this.globusGRAMHost == null) {
- sb.append("null");
- } else {
- sb.append(this.globusGRAMHost);
- }
- first = false;
- }
- if (isSetGlobusGRAMPort()) {
- if (!first) sb.append(", ");
- sb.append("globusGRAMPort:");
- sb.append(this.globusGRAMPort);
- first = false;
- }
- if (isSetUnicoreBESEndPoint()) {
- if (!first) sb.append(", ");
- sb.append("unicoreBESEndPoint:");
- if (this.unicoreBESEndPoint == null) {
- sb.append("null");
- } else {
- sb.append(this.unicoreBESEndPoint);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- 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());
- }
-
- // check for sub-struct validity
- if (sshJobSubmissionInfo != null) {
- sshJobSubmissionInfo.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- }
- }
-
- private static class JobSubmissionProtocolsStandardSchemeFactory implements SchemeFactory {
- public JobSubmissionProtocolsStandardScheme getScheme() {
- return new JobSubmissionProtocolsStandardScheme();
- }
- }
-
- private static class JobSubmissionProtocolsStandardScheme extends StandardScheme<JobSubmissionProtocols> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- 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: // PREFERED_JOB_SUBMISSION_PROTOCOL
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.preferedJobSubmissionProtocol = JobSubmissionProtocol.findByValue(iprot.readI32());
- struct.setPreferedJobSubmissionProtocolIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SSH_JOB_SUBMISSION_INFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sshJobSubmissionInfo = new SSHJobSubmission();
- struct.sshJobSubmissionInfo.read(iprot);
- struct.setSshJobSubmissionInfoIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // GLOBUS_GRAMHOST
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.globusGRAMHost = iprot.readString();
- struct.setGlobusGRAMHostIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // GLOBUS_GRAMPORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.globusGRAMPort = iprot.readI32();
- struct.setGlobusGRAMPortIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // UNICORE_BESEND_POINT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.unicoreBESEndPoint = iprot.readString();
- struct.setUnicoreBESEndPointIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(IS_EMPTY_FIELD_DESC);
- oprot.writeBool(struct.isEmpty);
- oprot.writeFieldEnd();
- if (struct.preferedJobSubmissionProtocol != null) {
- if (struct.isSetPreferedJobSubmissionProtocol()) {
- oprot.writeFieldBegin(PREFERED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC);
- oprot.writeI32(struct.preferedJobSubmissionProtocol.getValue());
- oprot.writeFieldEnd();
- }
- }
- if (struct.sshJobSubmissionInfo != null) {
- if (struct.isSetSshJobSubmissionInfo()) {
- oprot.writeFieldBegin(SSH_JOB_SUBMISSION_INFO_FIELD_DESC);
- struct.sshJobSubmissionInfo.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.globusGRAMHost != null) {
- if (struct.isSetGlobusGRAMHost()) {
- oprot.writeFieldBegin(GLOBUS_GRAMHOST_FIELD_DESC);
- oprot.writeString(struct.globusGRAMHost);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetGlobusGRAMPort()) {
- oprot.writeFieldBegin(GLOBUS_GRAMPORT_FIELD_DESC);
- oprot.writeI32(struct.globusGRAMPort);
- oprot.writeFieldEnd();
- }
- if (struct.unicoreBESEndPoint != null) {
- if (struct.isSetUnicoreBESEndPoint()) {
- oprot.writeFieldBegin(UNICORE_BESEND_POINT_FIELD_DESC);
- oprot.writeString(struct.unicoreBESEndPoint);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class JobSubmissionProtocolsTupleSchemeFactory implements SchemeFactory {
- public JobSubmissionProtocolsTupleScheme getScheme() {
- return new JobSubmissionProtocolsTupleScheme();
- }
- }
-
- private static class JobSubmissionProtocolsTupleScheme extends TupleScheme<JobSubmissionProtocols> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeBool(struct.isEmpty);
- BitSet optionals = new BitSet();
- if (struct.isSetPreferedJobSubmissionProtocol()) {
- optionals.set(0);
- }
- if (struct.isSetSshJobSubmissionInfo()) {
- optionals.set(1);
- }
- if (struct.isSetGlobusGRAMHost()) {
- optionals.set(2);
- }
- if (struct.isSetGlobusGRAMPort()) {
- optionals.set(3);
- }
- if (struct.isSetUnicoreBESEndPoint()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetPreferedJobSubmissionProtocol()) {
- oprot.writeI32(struct.preferedJobSubmissionProtocol.getValue());
- }
- if (struct.isSetSshJobSubmissionInfo()) {
- struct.sshJobSubmissionInfo.write(oprot);
- }
- if (struct.isSetGlobusGRAMHost()) {
- oprot.writeString(struct.globusGRAMHost);
- }
- if (struct.isSetGlobusGRAMPort()) {
- oprot.writeI32(struct.globusGRAMPort);
- }
- if (struct.isSetUnicoreBESEndPoint()) {
- oprot.writeString(struct.unicoreBESEndPoint);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.isEmpty = iprot.readBool();
- struct.setIsEmptyIsSet(true);
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.preferedJobSubmissionProtocol = JobSubmissionProtocol.findByValue(iprot.readI32());
- struct.setPreferedJobSubmissionProtocolIsSet(true);
- }
- if (incoming.get(1)) {
- struct.sshJobSubmissionInfo = new SSHJobSubmission();
- struct.sshJobSubmissionInfo.read(iprot);
- struct.setSshJobSubmissionInfoIsSet(true);
- }
- if (incoming.get(2)) {
- struct.globusGRAMHost = iprot.readString();
- struct.setGlobusGRAMHostIsSet(true);
- }
- if (incoming.get(3)) {
- struct.globusGRAMPort = iprot.readI32();
- struct.setGlobusGRAMPortIsSet(true);
- }
- if (incoming.get(4)) {
- struct.unicoreBESEndPoint = iprot.readString();
- struct.setUnicoreBESEndPointIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
deleted file mode 100644
index ff4b707..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-/**
- * Enumeration of local resource job managers supported by Airavata
- *
- * FORK:
- * Forking of commands without any job manager
- *
- * PBS:
- * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
- *
- * UGE:
- * Univa Grid Engine, a variation of PBS implementation.
- *
- * SLURM:
- * The Simple Linux Utility for Resource Management is a open source workload manager.
- *
- */
-@SuppressWarnings("all") public enum ResourceJobManager implements org.apache.thrift.TEnum {
- FORK(0),
- PBS(1),
- UGE(2),
- SLURM(3);
-
- private final int value;
-
- private ResourceJobManager(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static ResourceJobManager findByValue(int value) {
- switch (value) {
- case 0:
- return FORK;
- case 1:
- return PBS;
- case 2:
- return UGE;
- case 3:
- return SLURM;
- default:
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java
deleted file mode 100644
index 1552d4e..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java
+++ /dev/null
@@ -1,511 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class SCPDataMovement implements org.apache.thrift.TBase<SCPDataMovement, SCPDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<SCPDataMovement> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SCPDataMovement");
-
- private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SCPDataMovementStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SCPDataMovementTupleSchemeFactory());
- }
-
- private SecurityProtocol securityProtocol; // required
- private int sshPort; // 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 {
- /**
- *
- * @see SecurityProtocol
- */
- SECURITY_PROTOCOL((short)1, "securityProtocol"),
- SSH_PORT((short)2, "sshPort");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SECURITY_PROTOCOL
- return SECURITY_PROTOCOL;
- case 2: // SSH_PORT
- return SSH_PORT;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SSHPORT_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.SSH_PORT};
- 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.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
- tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", 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(SCPDataMovement.class, metaDataMap);
- }
-
- public SCPDataMovement() {
- this.sshPort = 22;
-
- }
-
- public SCPDataMovement(
- SecurityProtocol securityProtocol)
- {
- this();
- this.securityProtocol = securityProtocol;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SCPDataMovement(SCPDataMovement other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetSecurityProtocol()) {
- this.securityProtocol = other.securityProtocol;
- }
- this.sshPort = other.sshPort;
- }
-
- public SCPDataMovement deepCopy() {
- return new SCPDataMovement(this);
- }
-
- @Override
- public void clear() {
- this.securityProtocol = null;
- this.sshPort = 22;
-
- }
-
- /**
- *
- * @see SecurityProtocol
- */
- public SecurityProtocol getSecurityProtocol() {
- return this.securityProtocol;
- }
-
- /**
- *
- * @see SecurityProtocol
- */
- public void setSecurityProtocol(SecurityProtocol securityProtocol) {
- this.securityProtocol = securityProtocol;
- }
-
- public void unsetSecurityProtocol() {
- this.securityProtocol = null;
- }
-
- /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */
- public boolean isSetSecurityProtocol() {
- return this.securityProtocol != null;
- }
-
- public void setSecurityProtocolIsSet(boolean value) {
- if (!value) {
- this.securityProtocol = null;
- }
- }
-
- public int getSshPort() {
- return this.sshPort;
- }
-
- public void setSshPort(int sshPort) {
- this.sshPort = sshPort;
- setSshPortIsSet(true);
- }
-
- public void unsetSshPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID);
- }
-
- /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */
- public boolean isSetSshPort() {
- return EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID);
- }
-
- public void setSshPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SECURITY_PROTOCOL:
- if (value == null) {
- unsetSecurityProtocol();
- } else {
- setSecurityProtocol((SecurityProtocol)value);
- }
- break;
-
- case SSH_PORT:
- if (value == null) {
- unsetSshPort();
- } else {
- setSshPort((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SECURITY_PROTOCOL:
- return getSecurityProtocol();
-
- case SSH_PORT:
- return Integer.valueOf(getSshPort());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SECURITY_PROTOCOL:
- return isSetSecurityProtocol();
- case SSH_PORT:
- return isSetSshPort();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SCPDataMovement)
- return this.equals((SCPDataMovement)that);
- return false;
- }
-
- public boolean equals(SCPDataMovement that) {
- if (that == null)
- return false;
-
- boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
- boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
- if (this_present_securityProtocol || that_present_securityProtocol) {
- if (!(this_present_securityProtocol && that_present_securityProtocol))
- return false;
- if (!this.securityProtocol.equals(that.securityProtocol))
- return false;
- }
-
- boolean this_present_sshPort = true && this.isSetSshPort();
- boolean that_present_sshPort = true && that.isSetSshPort();
- if (this_present_sshPort || that_present_sshPort) {
- if (!(this_present_sshPort && that_present_sshPort))
- return false;
- if (this.sshPort != that.sshPort)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(SCPDataMovement other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSecurityProtocol()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSshPort()).compareTo(other.isSetSshPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SCPDataMovement(");
- boolean first = true;
-
- sb.append("securityProtocol:");
- if (this.securityProtocol == null) {
- sb.append("null");
- } else {
- sb.append(this.securityProtocol);
- }
- first = false;
- if (isSetSshPort()) {
- if (!first) sb.append(", ");
- sb.append("sshPort:");
- sb.append(this.sshPort);
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetSecurityProtocol()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- }
- }
-
- private static class SCPDataMovementStandardSchemeFactory implements SchemeFactory {
- public SCPDataMovementStandardScheme getScheme() {
- return new SCPDataMovementStandardScheme();
- }
- }
-
- private static class SCPDataMovementStandardScheme extends StandardScheme<SCPDataMovement> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, SCPDataMovement struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SECURITY_PROTOCOL
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
- struct.setSecurityProtocolIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SSH_PORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.sshPort = iprot.readI32();
- struct.setSshPortIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, SCPDataMovement struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.securityProtocol != null) {
- oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
- oprot.writeI32(struct.securityProtocol.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.isSetSshPort()) {
- oprot.writeFieldBegin(SSH_PORT_FIELD_DESC);
- oprot.writeI32(struct.sshPort);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class SCPDataMovementTupleSchemeFactory implements SchemeFactory {
- public SCPDataMovementTupleScheme getScheme() {
- return new SCPDataMovementTupleScheme();
- }
- }
-
- private static class SCPDataMovementTupleScheme extends TupleScheme<SCPDataMovement> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SCPDataMovement struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.securityProtocol.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetSshPort()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSshPort()) {
- oprot.writeI32(struct.sshPort);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SCPDataMovement struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
- struct.setSecurityProtocolIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.sshPort = iprot.readI32();
- struct.setSshPortIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
deleted file mode 100644
index ce27e46..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
+++ /dev/null
@@ -1,511 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class SSHJobSubmission implements org.apache.thrift.TBase<SSHJobSubmission, SSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<SSHJobSubmission> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHJobSubmission");
-
- private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SSHJobSubmissionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SSHJobSubmissionTupleSchemeFactory());
- }
-
- private ResourceJobManager resourceJobManager; // required
- private int sshPort; // 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 {
- /**
- *
- * @see ResourceJobManager
- */
- RESOURCE_JOB_MANAGER((short)2, "resourceJobManager"),
- SSH_PORT((short)3, "sshPort");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 2: // RESOURCE_JOB_MANAGER
- return RESOURCE_JOB_MANAGER;
- case 3: // SSH_PORT
- return SSH_PORT;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SSHPORT_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.SSH_PORT};
- 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.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
- tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", 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(SSHJobSubmission.class, metaDataMap);
- }
-
- public SSHJobSubmission() {
- this.sshPort = 22;
-
- }
-
- public SSHJobSubmission(
- ResourceJobManager resourceJobManager)
- {
- this();
- this.resourceJobManager = resourceJobManager;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SSHJobSubmission(SSHJobSubmission other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetResourceJobManager()) {
- this.resourceJobManager = other.resourceJobManager;
- }
- this.sshPort = other.sshPort;
- }
-
- public SSHJobSubmission deepCopy() {
- return new SSHJobSubmission(this);
- }
-
- @Override
- public void clear() {
- this.resourceJobManager = null;
- this.sshPort = 22;
-
- }
-
- /**
- *
- * @see ResourceJobManager
- */
- public ResourceJobManager getResourceJobManager() {
- return this.resourceJobManager;
- }
-
- /**
- *
- * @see ResourceJobManager
- */
- public void setResourceJobManager(ResourceJobManager resourceJobManager) {
- this.resourceJobManager = resourceJobManager;
- }
-
- public void unsetResourceJobManager() {
- this.resourceJobManager = null;
- }
-
- /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
- public boolean isSetResourceJobManager() {
- return this.resourceJobManager != null;
- }
-
- public void setResourceJobManagerIsSet(boolean value) {
- if (!value) {
- this.resourceJobManager = null;
- }
- }
-
- public int getSshPort() {
- return this.sshPort;
- }
-
- public void setSshPort(int sshPort) {
- this.sshPort = sshPort;
- setSshPortIsSet(true);
- }
-
- public void unsetSshPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID);
- }
-
- /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */
- public boolean isSetSshPort() {
- return EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID);
- }
-
- public void setSshPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case RESOURCE_JOB_MANAGER:
- if (value == null) {
- unsetResourceJobManager();
- } else {
- setResourceJobManager((ResourceJobManager)value);
- }
- break;
-
- case SSH_PORT:
- if (value == null) {
- unsetSshPort();
- } else {
- setSshPort((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case RESOURCE_JOB_MANAGER:
- return getResourceJobManager();
-
- case SSH_PORT:
- return Integer.valueOf(getSshPort());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case RESOURCE_JOB_MANAGER:
- return isSetResourceJobManager();
- case SSH_PORT:
- return isSetSshPort();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SSHJobSubmission)
- return this.equals((SSHJobSubmission)that);
- return false;
- }
-
- public boolean equals(SSHJobSubmission that) {
- if (that == null)
- return false;
-
- boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
- boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
- if (this_present_resourceJobManager || that_present_resourceJobManager) {
- if (!(this_present_resourceJobManager && that_present_resourceJobManager))
- return false;
- if (!this.resourceJobManager.equals(that.resourceJobManager))
- return false;
- }
-
- boolean this_present_sshPort = true && this.isSetSshPort();
- boolean that_present_sshPort = true && that.isSetSshPort();
- if (this_present_sshPort || that_present_sshPort) {
- if (!(this_present_sshPort && that_present_sshPort))
- return false;
- if (this.sshPort != that.sshPort)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(SSHJobSubmission other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetResourceJobManager()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSshPort()).compareTo(other.isSetSshPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SSHJobSubmission(");
- boolean first = true;
-
- sb.append("resourceJobManager:");
- if (this.resourceJobManager == null) {
- sb.append("null");
- } else {
- sb.append(this.resourceJobManager);
- }
- first = false;
- if (isSetSshPort()) {
- if (!first) sb.append(", ");
- sb.append("sshPort:");
- sb.append(this.sshPort);
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetResourceJobManager()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- }
- }
-
- private static class SSHJobSubmissionStandardSchemeFactory implements SchemeFactory {
- public SSHJobSubmissionStandardScheme getScheme() {
- return new SSHJobSubmissionStandardScheme();
- }
- }
-
- private static class SSHJobSubmissionStandardScheme extends StandardScheme<SSHJobSubmission> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, SSHJobSubmission struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 2: // RESOURCE_JOB_MANAGER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
- struct.setResourceJobManagerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SSH_PORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.sshPort = iprot.readI32();
- struct.setSshPortIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, SSHJobSubmission struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.resourceJobManager != null) {
- oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
- oprot.writeI32(struct.resourceJobManager.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.isSetSshPort()) {
- oprot.writeFieldBegin(SSH_PORT_FIELD_DESC);
- oprot.writeI32(struct.sshPort);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class SSHJobSubmissionTupleSchemeFactory implements SchemeFactory {
- public SSHJobSubmissionTupleScheme getScheme() {
- return new SSHJobSubmissionTupleScheme();
- }
- }
-
- private static class SSHJobSubmissionTupleScheme extends TupleScheme<SSHJobSubmission> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.resourceJobManager.getValue());
- BitSet optionals = new BitSet();
- if (struct.isSetSshPort()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSshPort()) {
- oprot.writeI32(struct.sshPort);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
- struct.setResourceJobManagerIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.sshPort = iprot.readI32();
- struct.setSshPortIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
deleted file mode 100644
index fe1f625..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
+++ /dev/null
@@ -1,82 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-/**
- * Enumeration of security authentication and authorization mechanisms supported by Airavata. This enumeration just
- * describes the supported mechanism. The corresponding security credentials are registered with Airavata Credential
- * store.
- *
- * USERNAME_PASSWORD:
- * A User Name.
- *
- * SSH_KEYS:
- * SSH Keys
- *
- */
-@SuppressWarnings("all") public enum SecurityProtocol implements org.apache.thrift.TEnum {
- USERNAME_PASSWORD(0),
- SSH_KEYS(1),
- GSI(2),
- KERBEROS(3),
- OAUTH(4);
-
- private final int value;
-
- private SecurityProtocol(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static SecurityProtocol findByValue(int value) {
- switch (value) {
- case 0:
- return USERNAME_PASSWORD;
- case 1:
- return SSH_KEYS;
- case 2:
- return GSI;
- case 3:
- return KERBEROS;
- case 4:
- return OAUTH;
- default:
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/applicationCatalogDataModelConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/applicationCatalogDataModelConstants.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/applicationCatalogDataModelConstants.java
deleted file mode 100644
index 67df188..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/applicationCatalogDataModelConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class applicationCatalogDataModelConstants {
-
- public static final String DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS";
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/thrift-interface-descriptions/applicationCatalogDataModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/applicationCatalogDataModel.thrift b/airavata-api/thrift-interface-descriptions/applicationCatalogDataModel.thrift
index b32dc6a..bcbcb86 100644
--- a/airavata-api/thrift-interface-descriptions/applicationCatalogDataModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/applicationCatalogDataModel.thrift
@@ -111,22 +111,26 @@ enum SecurityProtocol {
struct SCPDataMovement {
- 1: required SecurityProtocol securityProtocol,
- 2: optional i32 sshPort = 22,
+ 1: required string scpDataMovementID = DEFAULT_ID,
+ 2: required SecurityProtocol securityProtocol,
+ 3: optional i32 sshPort = 22
}
struct SSHJobSubmission {
+ 1: required string sshJobSubmissionID = DEFAULT_ID,
2: required ResourceJobManager resourceJobManager,
3: optional i32 sshPort = 22
}
struct GlobusJobSubmission {
- 1: required SecurityProtocol securityProtocol,
- 2: required ResourceJobManager resourceJobManager,
- 3: optional string globusGateKeeperEndPoint
+ 1: required string globusJobSubmissionID = DEFAULT_ID,
+ 2: required SecurityProtocol securityProtocol,
+ 3: required ResourceJobManager resourceJobManager,
+ 4: optional string globusGateKeeperEndPoint
}
struct GSISSHJobSubmission {
+ 1: required string gssishJobSubmissionID = DEFAULT_ID,
2: required ResourceJobManager resourceJobManager,
3: optional i32 sshPort = 22,
4: optional set<string> exports,
@@ -137,36 +141,6 @@ struct GSISSHJobSubmission {
}
/**
- * Job Submission Protocols
- *
- * resourceId:
- *
- * hostName:
- * Fully Qualified Host Name.
- *
- * ipAddress:
- * IP Addresse of the Hostname.
- *
- * resourceDescription:
- * A user friendly description of the hostname.
- *
- * preferedJobSubmissionProtocol:
- * HPC resources may have multiple options to interact with the resource. This flag identified a prefered mechanism.
- *
- * preferedDataMovementProtocol:
- * Option to specify a prefered data movement mechanism of the available options.
- *
-*/
-struct JobSubmissionProtocols {
- 1: required bool isEmpty = 0,
- 2: optional JobSubmissionProtocol preferedJobSubmissionProtocol,
- 3: optional SSHJobSubmission sshJobSubmissionInfo,
- 4: optional string globusGRAMHost,
- 5: optional i32 globusGRAMPort = 2119,
- 6: optional string unicoreBESEndPoint
-}
-
-/**
* Computational Resource Description
*
* resourceId:
[7/7] git commit: adding id to all the job submission protocols and
data movement protocols - AIRAVATA-1203
Posted by ch...@apache.org.
adding id to all the job submission protocols and data movement protocols - AIRAVATA-1203
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0317c4a6
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0317c4a6
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0317c4a6
Branch: refs/heads/master
Commit: 0317c4a6337a9da7349572ce597c57e40a580213
Parents: f9f173c
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Fri May 16 16:02:12 2014 -0400
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Fri May 16 16:02:12 2014 -0400
----------------------------------------------------------------------
.../lib/applicationCatalogDataModel_types.cpp | 365 ++---
.../lib/applicationCatalogDataModel_types.h | 154 +-
.../src/main/resources/lib/Types.php | 289 ++--
.../client/samples/CreateLaunchExperiment.java | 1 +
.../model/appcatalog/GSISSHJobSubmission.java | 99 ++
.../model/appcatalog/GlobusJobSubmission.java | 123 +-
.../model/appcatalog/JobSubmissionProtocol.java | 9 +-
.../appcatalog/JobSubmissionProtocols.java | 937 -----------
.../model/appcatalog/SCPDataMovement.java | 115 +-
.../model/appcatalog/SSHJobSubmission.java | 99 ++
.../computeresource/ApplicationDeployment.java | 600 -------
.../computeresource/ApplicationDescriptor.java | 506 ------
.../computeresource/ApplicationInterface.java | 658 --------
.../ComputeResourceDescription.java | 1537 ------------------
.../computeresource/DataMovementProtocol.java | 83 -
.../computeresource/GSISSHJobSubmission.java | 1163 -------------
.../computeresource/GlobusJobSubmission.java | 620 -------
.../computeresource/JobSubmissionProtocol.java | 77 -
.../computeresource/JobSubmissionProtocols.java | 937 -----------
.../computeresource/ResourceJobManager.java | 83 -
.../computeresource/SCPDataMovement.java | 511 ------
.../computeresource/SSHJobSubmission.java | 511 ------
.../computeresource/SecurityProtocol.java | 82 -
.../applicationCatalogDataModelConstants.java | 55 -
.../applicationCatalogDataModel.thrift | 44 +-
.../computeResourceDescription.thrift | 251 ---
.../experimentModel.thrift | 2 +-
27 files changed, 720 insertions(+), 9191 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.cpp
index c60cf41..a0b5933 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.cpp
@@ -26,15 +26,17 @@ const std::map<int, const char*> _ResourceJobManager_VALUES_TO_NAMES(::apache::t
int _kJobSubmissionProtocolValues[] = {
JobSubmissionProtocol::SSH,
+ JobSubmissionProtocol::GSISSH,
JobSubmissionProtocol::GRAM,
JobSubmissionProtocol::UNICORE
};
const char* _kJobSubmissionProtocolNames[] = {
"SSH",
+ "GSISSH",
"GRAM",
"UNICORE"
};
-const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kJobSubmissionProtocolValues, _kJobSubmissionProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kJobSubmissionProtocolValues, _kJobSubmissionProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kDataMovementProtocolValues[] = {
DataMovementProtocol::SCP,
@@ -66,8 +68,8 @@ const char* _kSecurityProtocolNames[] = {
};
const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kSecurityProtocolValues, _kSecurityProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-const char* SCPDataMovement::ascii_fingerprint = "15D34740303C4E50CFFA807ABA20C3EF";
-const uint8_t SCPDataMovement::binary_fingerprint[16] = {0x15,0xD3,0x47,0x40,0x30,0x3C,0x4E,0x50,0xCF,0xFA,0x80,0x7A,0xBA,0x20,0xC3,0xEF};
+const char* SCPDataMovement::ascii_fingerprint = "FEB6B2CD28861B4EED855CACA1FEF2CB";
+const uint8_t SCPDataMovement::binary_fingerprint[16] = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -80,6 +82,7 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
using ::apache::thrift::protocol::TProtocolException;
+ bool isset_scpDataMovementID = false;
bool isset_securityProtocol = false;
while (true)
@@ -91,6 +94,14 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
switch (fid)
{
case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->scpDataMovementID);
+ isset_scpDataMovementID = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast0;
xfer += iprot->readI32(ecast0);
@@ -100,7 +111,7 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->skip(ftype);
}
break;
- case 2:
+ case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->sshPort);
this->__isset.sshPort = true;
@@ -117,6 +128,8 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->readStructEnd();
+ if (!isset_scpDataMovementID)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_securityProtocol)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
@@ -126,12 +139,16 @@ uint32_t SCPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) co
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SCPDataMovement");
- xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeFieldBegin("scpDataMovementID", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->scpDataMovementID);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->securityProtocol);
xfer += oprot->writeFieldEnd();
if (this->__isset.sshPort) {
- xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 3);
xfer += oprot->writeI32(this->sshPort);
xfer += oprot->writeFieldEnd();
}
@@ -142,13 +159,14 @@ uint32_t SCPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) co
void swap(SCPDataMovement &a, SCPDataMovement &b) {
using ::std::swap;
+ swap(a.scpDataMovementID, b.scpDataMovementID);
swap(a.securityProtocol, b.securityProtocol);
swap(a.sshPort, b.sshPort);
swap(a.__isset, b.__isset);
}
-const char* SSHJobSubmission::ascii_fingerprint = "E65F4B00849C697EF0A023BF341A5599";
-const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xE6,0x5F,0x4B,0x00,0x84,0x9C,0x69,0x7E,0xF0,0xA0,0x23,0xBF,0x34,0x1A,0x55,0x99};
+const char* SSHJobSubmission::ascii_fingerprint = "FEB6B2CD28861B4EED855CACA1FEF2CB";
+const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -161,6 +179,7 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
using ::apache::thrift::protocol::TProtocolException;
+ bool isset_sshJobSubmissionID = false;
bool isset_resourceJobManager = false;
while (true)
@@ -171,6 +190,14 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
}
switch (fid)
{
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->sshJobSubmissionID);
+ isset_sshJobSubmissionID = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast1;
@@ -198,6 +225,8 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->readStructEnd();
+ if (!isset_sshJobSubmissionID)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_resourceJobManager)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
@@ -207,6 +236,10 @@ uint32_t SSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) c
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SSHJobSubmission");
+ xfer += oprot->writeFieldBegin("sshJobSubmissionID", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->sshJobSubmissionID);
+ xfer += oprot->writeFieldEnd();
+
xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->resourceJobManager);
xfer += oprot->writeFieldEnd();
@@ -223,13 +256,14 @@ uint32_t SSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) c
void swap(SSHJobSubmission &a, SSHJobSubmission &b) {
using ::std::swap;
+ swap(a.sshJobSubmissionID, b.sshJobSubmissionID);
swap(a.resourceJobManager, b.resourceJobManager);
swap(a.sshPort, b.sshPort);
swap(a.__isset, b.__isset);
}
-const char* GlobusJobSubmission::ascii_fingerprint = "19AAB18E981C4EB11AEBB34F40FF0939";
-const uint8_t GlobusJobSubmission::binary_fingerprint[16] = {0x19,0xAA,0xB1,0x8E,0x98,0x1C,0x4E,0xB1,0x1A,0xEB,0xB3,0x4F,0x40,0xFF,0x09,0x39};
+const char* GlobusJobSubmission::ascii_fingerprint = "6B87230A5315302FA994567088F60D3A";
+const uint8_t GlobusJobSubmission::binary_fingerprint[16] = {0x6B,0x87,0x23,0x0A,0x53,0x15,0x30,0x2F,0xA9,0x94,0x56,0x70,0x88,0xF6,0x0D,0x3A};
uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -242,6 +276,7 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
using ::apache::thrift::protocol::TProtocolException;
+ bool isset_globusJobSubmissionID = false;
bool isset_securityProtocol = false;
bool isset_resourceJobManager = false;
@@ -254,6 +289,14 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
switch (fid)
{
case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->globusJobSubmissionID);
+ isset_globusJobSubmissionID = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast2;
xfer += iprot->readI32(ecast2);
@@ -263,7 +306,7 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->skip(ftype);
}
break;
- case 2:
+ case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast3;
xfer += iprot->readI32(ecast3);
@@ -273,7 +316,7 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->skip(ftype);
}
break;
- case 3:
+ case 4:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->globusGateKeeperEndPoint);
this->__isset.globusGateKeeperEndPoint = true;
@@ -290,6 +333,8 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->readStructEnd();
+ if (!isset_globusJobSubmissionID)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_securityProtocol)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_resourceJobManager)
@@ -301,16 +346,20 @@ uint32_t GlobusJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("GlobusJobSubmission");
- xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeFieldBegin("globusJobSubmissionID", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->globusJobSubmissionID);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->securityProtocol);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 3);
xfer += oprot->writeI32((int32_t)this->resourceJobManager);
xfer += oprot->writeFieldEnd();
if (this->__isset.globusGateKeeperEndPoint) {
- xfer += oprot->writeFieldBegin("globusGateKeeperEndPoint", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeFieldBegin("globusGateKeeperEndPoint", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeString(this->globusGateKeeperEndPoint);
xfer += oprot->writeFieldEnd();
}
@@ -321,14 +370,15 @@ uint32_t GlobusJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
void swap(GlobusJobSubmission &a, GlobusJobSubmission &b) {
using ::std::swap;
+ swap(a.globusJobSubmissionID, b.globusJobSubmissionID);
swap(a.securityProtocol, b.securityProtocol);
swap(a.resourceJobManager, b.resourceJobManager);
swap(a.globusGateKeeperEndPoint, b.globusGateKeeperEndPoint);
swap(a.__isset, b.__isset);
}
-const char* GSISSHJobSubmission::ascii_fingerprint = "91E841F79C1FDEC6DD757B48AC5FD97E";
-const uint8_t GSISSHJobSubmission::binary_fingerprint[16] = {0x91,0xE8,0x41,0xF7,0x9C,0x1F,0xDE,0xC6,0xDD,0x75,0x7B,0x48,0xAC,0x5F,0xD9,0x7E};
+const char* GSISSHJobSubmission::ascii_fingerprint = "6969A7F145C4403B2F9081A498E933FD";
+const uint8_t GSISSHJobSubmission::binary_fingerprint[16] = {0x69,0x69,0xA7,0xF1,0x45,0xC4,0x40,0x3B,0x2F,0x90,0x81,0xA4,0x98,0xE9,0x33,0xFD};
uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -341,6 +391,7 @@ uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
using ::apache::thrift::protocol::TProtocolException;
+ bool isset_gssishJobSubmissionID = false;
bool isset_resourceJobManager = false;
while (true)
@@ -351,6 +402,14 @@ uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
}
switch (fid)
{
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->gssishJobSubmissionID);
+ isset_gssishJobSubmissionID = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast4;
@@ -455,6 +514,8 @@ uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->readStructEnd();
+ if (!isset_gssishJobSubmissionID)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_resourceJobManager)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
@@ -464,6 +525,10 @@ uint32_t GSISSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("GSISSHJobSubmission");
+ xfer += oprot->writeFieldBegin("gssishJobSubmissionID", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->gssishJobSubmissionID);
+ xfer += oprot->writeFieldEnd();
+
xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->resourceJobManager);
xfer += oprot->writeFieldEnd();
@@ -529,6 +594,7 @@ uint32_t GSISSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
void swap(GSISSHJobSubmission &a, GSISSHJobSubmission &b) {
using ::std::swap;
+ swap(a.gssishJobSubmissionID, b.gssishJobSubmissionID);
swap(a.resourceJobManager, b.resourceJobManager);
swap(a.sshPort, b.sshPort);
swap(a.exports, b.exports);
@@ -539,143 +605,6 @@ void swap(GSISSHJobSubmission &a, GSISSHJobSubmission &b) {
swap(a.__isset, b.__isset);
}
-const char* JobSubmissionProtocols::ascii_fingerprint = "18B1F54358A01390B5830C26FFD334D4";
-const uint8_t JobSubmissionProtocols::binary_fingerprint[16] = {0x18,0xB1,0xF5,0x43,0x58,0xA0,0x13,0x90,0xB5,0x83,0x0C,0x26,0xFF,0xD3,0x34,0xD4};
-
-uint32_t JobSubmissionProtocols::read(::apache::thrift::protocol::TProtocol* iprot) {
-
- uint32_t xfer = 0;
- std::string fname;
- ::apache::thrift::protocol::TType ftype;
- int16_t fid;
-
- xfer += iprot->readStructBegin(fname);
-
- using ::apache::thrift::protocol::TProtocolException;
-
- bool isset_isEmpty = false;
-
- while (true)
- {
- xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == ::apache::thrift::protocol::T_STOP) {
- break;
- }
- switch (fid)
- {
- case 1:
- if (ftype == ::apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool(this->isEmpty);
- isset_isEmpty = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 2:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast24;
- xfer += iprot->readI32(ecast24);
- this->preferedJobSubmissionProtocol = (JobSubmissionProtocol::type)ecast24;
- this->__isset.preferedJobSubmissionProtocol = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 3:
- if (ftype == ::apache::thrift::protocol::T_STRUCT) {
- xfer += this->sshJobSubmissionInfo.read(iprot);
- this->__isset.sshJobSubmissionInfo = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 4:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->globusGRAMHost);
- this->__isset.globusGRAMHost = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 5:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- xfer += iprot->readI32(this->globusGRAMPort);
- this->__isset.globusGRAMPort = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 6:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->unicoreBESEndPoint);
- this->__isset.unicoreBESEndPoint = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- default:
- xfer += iprot->skip(ftype);
- break;
- }
- xfer += iprot->readFieldEnd();
- }
-
- xfer += iprot->readStructEnd();
-
- if (!isset_isEmpty)
- throw TProtocolException(TProtocolException::INVALID_DATA);
- return xfer;
-}
-
-uint32_t JobSubmissionProtocols::write(::apache::thrift::protocol::TProtocol* oprot) const {
- uint32_t xfer = 0;
- xfer += oprot->writeStructBegin("JobSubmissionProtocols");
-
- xfer += oprot->writeFieldBegin("isEmpty", ::apache::thrift::protocol::T_BOOL, 1);
- xfer += oprot->writeBool(this->isEmpty);
- xfer += oprot->writeFieldEnd();
-
- if (this->__isset.preferedJobSubmissionProtocol) {
- xfer += oprot->writeFieldBegin("preferedJobSubmissionProtocol", ::apache::thrift::protocol::T_I32, 2);
- xfer += oprot->writeI32((int32_t)this->preferedJobSubmissionProtocol);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.sshJobSubmissionInfo) {
- xfer += oprot->writeFieldBegin("sshJobSubmissionInfo", ::apache::thrift::protocol::T_STRUCT, 3);
- xfer += this->sshJobSubmissionInfo.write(oprot);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.globusGRAMHost) {
- xfer += oprot->writeFieldBegin("globusGRAMHost", ::apache::thrift::protocol::T_STRING, 4);
- xfer += oprot->writeString(this->globusGRAMHost);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.globusGRAMPort) {
- xfer += oprot->writeFieldBegin("globusGRAMPort", ::apache::thrift::protocol::T_I32, 5);
- xfer += oprot->writeI32(this->globusGRAMPort);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.unicoreBESEndPoint) {
- xfer += oprot->writeFieldBegin("unicoreBESEndPoint", ::apache::thrift::protocol::T_STRING, 6);
- xfer += oprot->writeString(this->unicoreBESEndPoint);
- xfer += oprot->writeFieldEnd();
- }
- xfer += oprot->writeFieldStop();
- xfer += oprot->writeStructEnd();
- return xfer;
-}
-
-void swap(JobSubmissionProtocols &a, JobSubmissionProtocols &b) {
- using ::std::swap;
- swap(a.isEmpty, b.isEmpty);
- swap(a.preferedJobSubmissionProtocol, b.preferedJobSubmissionProtocol);
- swap(a.sshJobSubmissionInfo, b.sshJobSubmissionInfo);
- swap(a.globusGRAMHost, b.globusGRAMHost);
- swap(a.globusGRAMPort, b.globusGRAMPort);
- swap(a.unicoreBESEndPoint, b.unicoreBESEndPoint);
- swap(a.__isset, b.__isset);
-}
-
const char* ComputeResourceDescription::ascii_fingerprint = "BA89EA8A5D740F97C53BA51CA49FEC18";
const uint8_t ComputeResourceDescription::binary_fingerprint[16] = {0xBA,0x89,0xEA,0x8A,0x5D,0x74,0x0F,0x97,0xC5,0x3B,0xA5,0x1C,0xA4,0x9F,0xEC,0x18};
@@ -732,15 +661,15 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->hostAliases.clear();
- uint32_t _size25;
- ::apache::thrift::protocol::TType _etype28;
- xfer += iprot->readSetBegin(_etype28, _size25);
- uint32_t _i29;
- for (_i29 = 0; _i29 < _size25; ++_i29)
+ uint32_t _size24;
+ ::apache::thrift::protocol::TType _etype27;
+ xfer += iprot->readSetBegin(_etype27, _size24);
+ uint32_t _i28;
+ for (_i28 = 0; _i28 < _size24; ++_i28)
{
- std::string _elem30;
- xfer += iprot->readString(_elem30);
- this->hostAliases.insert(_elem30);
+ std::string _elem29;
+ xfer += iprot->readString(_elem29);
+ this->hostAliases.insert(_elem29);
}
xfer += iprot->readSetEnd();
}
@@ -753,15 +682,15 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->ipAddresses.clear();
- uint32_t _size31;
- ::apache::thrift::protocol::TType _etype34;
- xfer += iprot->readSetBegin(_etype34, _size31);
- uint32_t _i35;
- for (_i35 = 0; _i35 < _size31; ++_i35)
+ uint32_t _size30;
+ ::apache::thrift::protocol::TType _etype33;
+ xfer += iprot->readSetBegin(_etype33, _size30);
+ uint32_t _i34;
+ for (_i34 = 0; _i34 < _size30; ++_i34)
{
- std::string _elem36;
- xfer += iprot->readString(_elem36);
- this->ipAddresses.insert(_elem36);
+ std::string _elem35;
+ xfer += iprot->readString(_elem35);
+ this->ipAddresses.insert(_elem35);
}
xfer += iprot->readSetEnd();
}
@@ -798,19 +727,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->jobSubmissionProtocols.clear();
- uint32_t _size37;
- ::apache::thrift::protocol::TType _ktype38;
- ::apache::thrift::protocol::TType _vtype39;
- xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37);
- uint32_t _i41;
- for (_i41 = 0; _i41 < _size37; ++_i41)
+ uint32_t _size36;
+ ::apache::thrift::protocol::TType _ktype37;
+ ::apache::thrift::protocol::TType _vtype38;
+ xfer += iprot->readMapBegin(_ktype37, _vtype38, _size36);
+ uint32_t _i40;
+ for (_i40 = 0; _i40 < _size36; ++_i40)
{
- std::string _key42;
- xfer += iprot->readString(_key42);
- JobSubmissionProtocol::type& _val43 = this->jobSubmissionProtocols[_key42];
- int32_t ecast44;
- xfer += iprot->readI32(ecast44);
- _val43 = (JobSubmissionProtocol::type)ecast44;
+ std::string _key41;
+ xfer += iprot->readString(_key41);
+ JobSubmissionProtocol::type& _val42 = this->jobSubmissionProtocols[_key41];
+ int32_t ecast43;
+ xfer += iprot->readI32(ecast43);
+ _val42 = (JobSubmissionProtocol::type)ecast43;
}
xfer += iprot->readMapEnd();
}
@@ -823,19 +752,19 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->dataMovementProtocols.clear();
- uint32_t _size45;
- ::apache::thrift::protocol::TType _ktype46;
- ::apache::thrift::protocol::TType _vtype47;
- xfer += iprot->readMapBegin(_ktype46, _vtype47, _size45);
- uint32_t _i49;
- for (_i49 = 0; _i49 < _size45; ++_i49)
+ uint32_t _size44;
+ ::apache::thrift::protocol::TType _ktype45;
+ ::apache::thrift::protocol::TType _vtype46;
+ xfer += iprot->readMapBegin(_ktype45, _vtype46, _size44);
+ uint32_t _i48;
+ for (_i48 = 0; _i48 < _size44; ++_i48)
{
- std::string _key50;
- xfer += iprot->readString(_key50);
- DataMovementProtocol::type& _val51 = this->dataMovementProtocols[_key50];
- int32_t ecast52;
- xfer += iprot->readI32(ecast52);
- _val51 = (DataMovementProtocol::type)ecast52;
+ std::string _key49;
+ xfer += iprot->readString(_key49);
+ DataMovementProtocol::type& _val50 = this->dataMovementProtocols[_key49];
+ int32_t ecast51;
+ xfer += iprot->readI32(ecast51);
+ _val50 = (DataMovementProtocol::type)ecast51;
}
xfer += iprot->readMapEnd();
}
@@ -886,10 +815,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_SET, 4);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size()));
- std::set<std::string> ::const_iterator _iter53;
- for (_iter53 = this->hostAliases.begin(); _iter53 != this->hostAliases.end(); ++_iter53)
+ std::set<std::string> ::const_iterator _iter52;
+ for (_iter52 = this->hostAliases.begin(); _iter52 != this->hostAliases.end(); ++_iter52)
{
- xfer += oprot->writeString((*_iter53));
+ xfer += oprot->writeString((*_iter52));
}
xfer += oprot->writeSetEnd();
}
@@ -899,10 +828,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_SET, 5);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size()));
- std::set<std::string> ::const_iterator _iter54;
- for (_iter54 = this->ipAddresses.begin(); _iter54 != this->ipAddresses.end(); ++_iter54)
+ std::set<std::string> ::const_iterator _iter53;
+ for (_iter53 = this->ipAddresses.begin(); _iter53 != this->ipAddresses.end(); ++_iter53)
{
- xfer += oprot->writeString((*_iter54));
+ xfer += oprot->writeString((*_iter53));
}
xfer += oprot->writeSetEnd();
}
@@ -926,11 +855,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("jobSubmissionProtocols", ::apache::thrift::protocol::T_MAP, 9);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->jobSubmissionProtocols.size()));
- std::map<std::string, JobSubmissionProtocol::type> ::const_iterator _iter55;
- for (_iter55 = this->jobSubmissionProtocols.begin(); _iter55 != this->jobSubmissionProtocols.end(); ++_iter55)
+ std::map<std::string, JobSubmissionProtocol::type> ::const_iterator _iter54;
+ for (_iter54 = this->jobSubmissionProtocols.begin(); _iter54 != this->jobSubmissionProtocols.end(); ++_iter54)
{
- xfer += oprot->writeString(_iter55->first);
- xfer += oprot->writeI32((int32_t)_iter55->second);
+ xfer += oprot->writeString(_iter54->first);
+ xfer += oprot->writeI32((int32_t)_iter54->second);
}
xfer += oprot->writeMapEnd();
}
@@ -939,11 +868,11 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("dataMovementProtocols", ::apache::thrift::protocol::T_MAP, 10);
{
xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->dataMovementProtocols.size()));
- std::map<std::string, DataMovementProtocol::type> ::const_iterator _iter56;
- for (_iter56 = this->dataMovementProtocols.begin(); _iter56 != this->dataMovementProtocols.end(); ++_iter56)
+ std::map<std::string, DataMovementProtocol::type> ::const_iterator _iter55;
+ for (_iter55 = this->dataMovementProtocols.begin(); _iter55 != this->dataMovementProtocols.end(); ++_iter55)
{
- xfer += oprot->writeString(_iter56->first);
- xfer += oprot->writeI32((int32_t)_iter56->second);
+ xfer += oprot->writeString(_iter55->first);
+ xfer += oprot->writeI32((int32_t)_iter55->second);
}
xfer += oprot->writeMapEnd();
}
@@ -1188,14 +1117,14 @@ uint32_t ApplicationInterface::read(::apache::thrift::protocol::TProtocol* iprot
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->applicationDeployments.clear();
- uint32_t _size57;
- ::apache::thrift::protocol::TType _etype60;
- xfer += iprot->readListBegin(_etype60, _size57);
- this->applicationDeployments.resize(_size57);
- uint32_t _i61;
- for (_i61 = 0; _i61 < _size57; ++_i61)
+ uint32_t _size56;
+ ::apache::thrift::protocol::TType _etype59;
+ xfer += iprot->readListBegin(_etype59, _size56);
+ this->applicationDeployments.resize(_size56);
+ uint32_t _i60;
+ for (_i60 = 0; _i60 < _size56; ++_i60)
{
- xfer += this->applicationDeployments[_i61].read(iprot);
+ xfer += this->applicationDeployments[_i60].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -1235,10 +1164,10 @@ uint32_t ApplicationInterface::write(::apache::thrift::protocol::TProtocol* opro
xfer += oprot->writeFieldBegin("applicationDeployments", ::apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->applicationDeployments.size()));
- std::vector<ApplicationDeployment> ::const_iterator _iter62;
- for (_iter62 = this->applicationDeployments.begin(); _iter62 != this->applicationDeployments.end(); ++_iter62)
+ std::vector<ApplicationDeployment> ::const_iterator _iter61;
+ for (_iter61 = this->applicationDeployments.begin(); _iter61 != this->applicationDeployments.end(); ++_iter61)
{
- xfer += (*_iter62).write(oprot);
+ xfer += (*_iter61).write(oprot);
}
xfer += oprot->writeListEnd();
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.h
index 3fc88e1..4b6965b 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationCatalogDataModel_types.h
@@ -31,8 +31,9 @@ extern const std::map<int, const char*> _ResourceJobManager_VALUES_TO_NAMES;
struct JobSubmissionProtocol {
enum type {
SSH = 0,
- GRAM = 1,
- UNICORE = 2
+ GSISSH = 1,
+ GRAM = 2,
+ UNICORE = 3
};
};
@@ -69,19 +70,24 @@ typedef struct _SCPDataMovement__isset {
class SCPDataMovement {
public:
- static const char* ascii_fingerprint; // = "15D34740303C4E50CFFA807ABA20C3EF";
- static const uint8_t binary_fingerprint[16]; // = {0x15,0xD3,0x47,0x40,0x30,0x3C,0x4E,0x50,0xCF,0xFA,0x80,0x7A,0xBA,0x20,0xC3,0xEF};
+ static const char* ascii_fingerprint; // = "FEB6B2CD28861B4EED855CACA1FEF2CB";
+ static const uint8_t binary_fingerprint[16]; // = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
- SCPDataMovement() : securityProtocol((SecurityProtocol::type)0), sshPort(22) {
+ SCPDataMovement() : scpDataMovementID("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), sshPort(22) {
}
virtual ~SCPDataMovement() throw() {}
+ std::string scpDataMovementID;
SecurityProtocol::type securityProtocol;
int32_t sshPort;
_SCPDataMovement__isset __isset;
+ void __set_scpDataMovementID(const std::string& val) {
+ scpDataMovementID = val;
+ }
+
void __set_securityProtocol(const SecurityProtocol::type val) {
securityProtocol = val;
}
@@ -93,6 +99,8 @@ class SCPDataMovement {
bool operator == (const SCPDataMovement & rhs) const
{
+ if (!(scpDataMovementID == rhs.scpDataMovementID))
+ return false;
if (!(securityProtocol == rhs.securityProtocol))
return false;
if (__isset.sshPort != rhs.__isset.sshPort)
@@ -122,19 +130,24 @@ typedef struct _SSHJobSubmission__isset {
class SSHJobSubmission {
public:
- static const char* ascii_fingerprint; // = "E65F4B00849C697EF0A023BF341A5599";
- static const uint8_t binary_fingerprint[16]; // = {0xE6,0x5F,0x4B,0x00,0x84,0x9C,0x69,0x7E,0xF0,0xA0,0x23,0xBF,0x34,0x1A,0x55,0x99};
+ static const char* ascii_fingerprint; // = "FEB6B2CD28861B4EED855CACA1FEF2CB";
+ static const uint8_t binary_fingerprint[16]; // = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
- SSHJobSubmission() : resourceJobManager((ResourceJobManager::type)0), sshPort(22) {
+ SSHJobSubmission() : sshJobSubmissionID("DO_NOT_SET_AT_CLIENTS"), resourceJobManager((ResourceJobManager::type)0), sshPort(22) {
}
virtual ~SSHJobSubmission() throw() {}
+ std::string sshJobSubmissionID;
ResourceJobManager::type resourceJobManager;
int32_t sshPort;
_SSHJobSubmission__isset __isset;
+ void __set_sshJobSubmissionID(const std::string& val) {
+ sshJobSubmissionID = val;
+ }
+
void __set_resourceJobManager(const ResourceJobManager::type val) {
resourceJobManager = val;
}
@@ -146,6 +159,8 @@ class SSHJobSubmission {
bool operator == (const SSHJobSubmission & rhs) const
{
+ if (!(sshJobSubmissionID == rhs.sshJobSubmissionID))
+ return false;
if (!(resourceJobManager == rhs.resourceJobManager))
return false;
if (__isset.sshPort != rhs.__isset.sshPort)
@@ -175,20 +190,25 @@ typedef struct _GlobusJobSubmission__isset {
class GlobusJobSubmission {
public:
- static const char* ascii_fingerprint; // = "19AAB18E981C4EB11AEBB34F40FF0939";
- static const uint8_t binary_fingerprint[16]; // = {0x19,0xAA,0xB1,0x8E,0x98,0x1C,0x4E,0xB1,0x1A,0xEB,0xB3,0x4F,0x40,0xFF,0x09,0x39};
+ static const char* ascii_fingerprint; // = "6B87230A5315302FA994567088F60D3A";
+ static const uint8_t binary_fingerprint[16]; // = {0x6B,0x87,0x23,0x0A,0x53,0x15,0x30,0x2F,0xA9,0x94,0x56,0x70,0x88,0xF6,0x0D,0x3A};
- GlobusJobSubmission() : securityProtocol((SecurityProtocol::type)0), resourceJobManager((ResourceJobManager::type)0), globusGateKeeperEndPoint() {
+ GlobusJobSubmission() : globusJobSubmissionID("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), resourceJobManager((ResourceJobManager::type)0), globusGateKeeperEndPoint() {
}
virtual ~GlobusJobSubmission() throw() {}
+ std::string globusJobSubmissionID;
SecurityProtocol::type securityProtocol;
ResourceJobManager::type resourceJobManager;
std::string globusGateKeeperEndPoint;
_GlobusJobSubmission__isset __isset;
+ void __set_globusJobSubmissionID(const std::string& val) {
+ globusJobSubmissionID = val;
+ }
+
void __set_securityProtocol(const SecurityProtocol::type val) {
securityProtocol = val;
}
@@ -204,6 +224,8 @@ class GlobusJobSubmission {
bool operator == (const GlobusJobSubmission & rhs) const
{
+ if (!(globusJobSubmissionID == rhs.globusJobSubmissionID))
+ return false;
if (!(securityProtocol == rhs.securityProtocol))
return false;
if (!(resourceJobManager == rhs.resourceJobManager))
@@ -240,14 +262,15 @@ typedef struct _GSISSHJobSubmission__isset {
class GSISSHJobSubmission {
public:
- static const char* ascii_fingerprint; // = "91E841F79C1FDEC6DD757B48AC5FD97E";
- static const uint8_t binary_fingerprint[16]; // = {0x91,0xE8,0x41,0xF7,0x9C,0x1F,0xDE,0xC6,0xDD,0x75,0x7B,0x48,0xAC,0x5F,0xD9,0x7E};
+ static const char* ascii_fingerprint; // = "6969A7F145C4403B2F9081A498E933FD";
+ static const uint8_t binary_fingerprint[16]; // = {0x69,0x69,0xA7,0xF1,0x45,0xC4,0x40,0x3B,0x2F,0x90,0x81,0xA4,0x98,0xE9,0x33,0xFD};
- GSISSHJobSubmission() : resourceJobManager((ResourceJobManager::type)0), sshPort(22), installedPath(), monitorMode() {
+ GSISSHJobSubmission() : gssishJobSubmissionID("DO_NOT_SET_AT_CLIENTS"), resourceJobManager((ResourceJobManager::type)0), sshPort(22), installedPath(), monitorMode() {
}
virtual ~GSISSHJobSubmission() throw() {}
+ std::string gssishJobSubmissionID;
ResourceJobManager::type resourceJobManager;
int32_t sshPort;
std::set<std::string> exports;
@@ -258,6 +281,10 @@ class GSISSHJobSubmission {
_GSISSHJobSubmission__isset __isset;
+ void __set_gssishJobSubmissionID(const std::string& val) {
+ gssishJobSubmissionID = val;
+ }
+
void __set_resourceJobManager(const ResourceJobManager::type val) {
resourceJobManager = val;
}
@@ -294,6 +321,8 @@ class GSISSHJobSubmission {
bool operator == (const GSISSHJobSubmission & rhs) const
{
+ if (!(gssishJobSubmissionID == rhs.gssishJobSubmissionID))
+ return false;
if (!(resourceJobManager == rhs.resourceJobManager))
return false;
if (__isset.sshPort != rhs.__isset.sshPort)
@@ -335,103 +364,6 @@ class GSISSHJobSubmission {
void swap(GSISSHJobSubmission &a, GSISSHJobSubmission &b);
-typedef struct _JobSubmissionProtocols__isset {
- _JobSubmissionProtocols__isset() : preferedJobSubmissionProtocol(false), sshJobSubmissionInfo(false), globusGRAMHost(false), globusGRAMPort(true), unicoreBESEndPoint(false) {}
- bool preferedJobSubmissionProtocol;
- bool sshJobSubmissionInfo;
- bool globusGRAMHost;
- bool globusGRAMPort;
- bool unicoreBESEndPoint;
-} _JobSubmissionProtocols__isset;
-
-class JobSubmissionProtocols {
- public:
-
- static const char* ascii_fingerprint; // = "18B1F54358A01390B5830C26FFD334D4";
- static const uint8_t binary_fingerprint[16]; // = {0x18,0xB1,0xF5,0x43,0x58,0xA0,0x13,0x90,0xB5,0x83,0x0C,0x26,0xFF,0xD3,0x34,0xD4};
-
- JobSubmissionProtocols() : isEmpty(false), preferedJobSubmissionProtocol((JobSubmissionProtocol::type)0), globusGRAMHost(), globusGRAMPort(2119), unicoreBESEndPoint() {
- }
-
- virtual ~JobSubmissionProtocols() throw() {}
-
- bool isEmpty;
- JobSubmissionProtocol::type preferedJobSubmissionProtocol;
- SSHJobSubmission sshJobSubmissionInfo;
- std::string globusGRAMHost;
- int32_t globusGRAMPort;
- std::string unicoreBESEndPoint;
-
- _JobSubmissionProtocols__isset __isset;
-
- void __set_isEmpty(const bool val) {
- isEmpty = val;
- }
-
- void __set_preferedJobSubmissionProtocol(const JobSubmissionProtocol::type val) {
- preferedJobSubmissionProtocol = val;
- __isset.preferedJobSubmissionProtocol = true;
- }
-
- void __set_sshJobSubmissionInfo(const SSHJobSubmission& val) {
- sshJobSubmissionInfo = val;
- __isset.sshJobSubmissionInfo = true;
- }
-
- void __set_globusGRAMHost(const std::string& val) {
- globusGRAMHost = val;
- __isset.globusGRAMHost = true;
- }
-
- void __set_globusGRAMPort(const int32_t val) {
- globusGRAMPort = val;
- __isset.globusGRAMPort = true;
- }
-
- void __set_unicoreBESEndPoint(const std::string& val) {
- unicoreBESEndPoint = val;
- __isset.unicoreBESEndPoint = true;
- }
-
- bool operator == (const JobSubmissionProtocols & rhs) const
- {
- if (!(isEmpty == rhs.isEmpty))
- return false;
- if (__isset.preferedJobSubmissionProtocol != rhs.__isset.preferedJobSubmissionProtocol)
- return false;
- else if (__isset.preferedJobSubmissionProtocol && !(preferedJobSubmissionProtocol == rhs.preferedJobSubmissionProtocol))
- return false;
- if (__isset.sshJobSubmissionInfo != rhs.__isset.sshJobSubmissionInfo)
- return false;
- else if (__isset.sshJobSubmissionInfo && !(sshJobSubmissionInfo == rhs.sshJobSubmissionInfo))
- return false;
- if (__isset.globusGRAMHost != rhs.__isset.globusGRAMHost)
- return false;
- else if (__isset.globusGRAMHost && !(globusGRAMHost == rhs.globusGRAMHost))
- return false;
- if (__isset.globusGRAMPort != rhs.__isset.globusGRAMPort)
- return false;
- else if (__isset.globusGRAMPort && !(globusGRAMPort == rhs.globusGRAMPort))
- return false;
- if (__isset.unicoreBESEndPoint != rhs.__isset.unicoreBESEndPoint)
- return false;
- else if (__isset.unicoreBESEndPoint && !(unicoreBESEndPoint == rhs.unicoreBESEndPoint))
- return false;
- return true;
- }
- bool operator != (const JobSubmissionProtocols &rhs) const {
- return !(*this == rhs);
- }
-
- bool operator < (const JobSubmissionProtocols & ) const;
-
- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
-
-};
-
-void swap(JobSubmissionProtocols &a, JobSubmissionProtocols &b);
-
typedef struct _ComputeResourceDescription__isset {
_ComputeResourceDescription__isset() : hostAliases(false), ipAddresses(false), resourceDescription(false), scratchLocation(false), preferredJobSubmissionProtocol(false) {}
bool hostAliases;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
index df5479e..d34fd54 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Types.php
@@ -32,12 +32,14 @@ final class ResourceJobManager {
final class JobSubmissionProtocol {
const SSH = 0;
- const GRAM = 1;
- const UNICORE = 2;
+ const GSISSH = 1;
+ const GRAM = 2;
+ const UNICORE = 3;
static public $__names = array(
0 => 'SSH',
- 1 => 'GRAM',
- 2 => 'UNICORE',
+ 1 => 'GSISSH',
+ 2 => 'GRAM',
+ 3 => 'UNICORE',
);
}
@@ -72,6 +74,7 @@ final class SecurityProtocol {
class SCPDataMovement {
static $_TSPEC;
+ public $scpDataMovementID = "DO_NOT_SET_AT_CLIENTS";
public $securityProtocol = null;
public $sshPort = 22;
@@ -79,16 +82,23 @@ class SCPDataMovement {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
+ 'var' => 'scpDataMovementID',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
'var' => 'securityProtocol',
'type' => TType::I32,
),
- 2 => array(
+ 3 => array(
'var' => 'sshPort',
'type' => TType::I32,
),
);
}
if (is_array($vals)) {
+ if (isset($vals['scpDataMovementID'])) {
+ $this->scpDataMovementID = $vals['scpDataMovementID'];
+ }
if (isset($vals['securityProtocol'])) {
$this->securityProtocol = $vals['securityProtocol'];
}
@@ -118,13 +128,20 @@ class SCPDataMovement {
switch ($fid)
{
case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->scpDataMovementID);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->securityProtocol);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 2:
+ case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->sshPort);
} else {
@@ -144,13 +161,18 @@ class SCPDataMovement {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SCPDataMovement');
+ if ($this->scpDataMovementID !== null) {
+ $xfer += $output->writeFieldBegin('scpDataMovementID', TType::STRING, 1);
+ $xfer += $output->writeString($this->scpDataMovementID);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->securityProtocol !== null) {
- $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 1);
+ $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
$xfer += $output->writeI32($this->securityProtocol);
$xfer += $output->writeFieldEnd();
}
if ($this->sshPort !== null) {
- $xfer += $output->writeFieldBegin('sshPort', TType::I32, 2);
+ $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
$xfer += $output->writeI32($this->sshPort);
$xfer += $output->writeFieldEnd();
}
@@ -164,12 +186,17 @@ class SCPDataMovement {
class SSHJobSubmission {
static $_TSPEC;
+ public $sshJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
public $resourceJobManager = null;
public $sshPort = 22;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'sshJobSubmissionID',
+ 'type' => TType::STRING,
+ ),
2 => array(
'var' => 'resourceJobManager',
'type' => TType::I32,
@@ -181,6 +208,9 @@ class SSHJobSubmission {
);
}
if (is_array($vals)) {
+ if (isset($vals['sshJobSubmissionID'])) {
+ $this->sshJobSubmissionID = $vals['sshJobSubmissionID'];
+ }
if (isset($vals['resourceJobManager'])) {
$this->resourceJobManager = $vals['resourceJobManager'];
}
@@ -209,6 +239,13 @@ class SSHJobSubmission {
}
switch ($fid)
{
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->sshJobSubmissionID);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->resourceJobManager);
@@ -236,6 +273,11 @@ class SSHJobSubmission {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('SSHJobSubmission');
+ if ($this->sshJobSubmissionID !== null) {
+ $xfer += $output->writeFieldBegin('sshJobSubmissionID', TType::STRING, 1);
+ $xfer += $output->writeString($this->sshJobSubmissionID);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->resourceJobManager !== null) {
$xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
$xfer += $output->writeI32($this->resourceJobManager);
@@ -256,6 +298,7 @@ class SSHJobSubmission {
class GlobusJobSubmission {
static $_TSPEC;
+ public $globusJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
public $securityProtocol = null;
public $resourceJobManager = null;
public $globusGateKeeperEndPoint = null;
@@ -264,20 +307,27 @@ class GlobusJobSubmission {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
+ 'var' => 'globusJobSubmissionID',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
'var' => 'securityProtocol',
'type' => TType::I32,
),
- 2 => array(
+ 3 => array(
'var' => 'resourceJobManager',
'type' => TType::I32,
),
- 3 => array(
+ 4 => array(
'var' => 'globusGateKeeperEndPoint',
'type' => TType::STRING,
),
);
}
if (is_array($vals)) {
+ if (isset($vals['globusJobSubmissionID'])) {
+ $this->globusJobSubmissionID = $vals['globusJobSubmissionID'];
+ }
if (isset($vals['securityProtocol'])) {
$this->securityProtocol = $vals['securityProtocol'];
}
@@ -310,20 +360,27 @@ class GlobusJobSubmission {
switch ($fid)
{
case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->globusJobSubmissionID);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->securityProtocol);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 2:
+ case 3:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->resourceJobManager);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 3:
+ case 4:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->globusGateKeeperEndPoint);
} else {
@@ -343,18 +400,23 @@ class GlobusJobSubmission {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('GlobusJobSubmission');
+ if ($this->globusJobSubmissionID !== null) {
+ $xfer += $output->writeFieldBegin('globusJobSubmissionID', TType::STRING, 1);
+ $xfer += $output->writeString($this->globusJobSubmissionID);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->securityProtocol !== null) {
- $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 1);
+ $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
$xfer += $output->writeI32($this->securityProtocol);
$xfer += $output->writeFieldEnd();
}
if ($this->resourceJobManager !== null) {
- $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
+ $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
$xfer += $output->writeI32($this->resourceJobManager);
$xfer += $output->writeFieldEnd();
}
if ($this->globusGateKeeperEndPoint !== null) {
- $xfer += $output->writeFieldBegin('globusGateKeeperEndPoint', TType::STRING, 3);
+ $xfer += $output->writeFieldBegin('globusGateKeeperEndPoint', TType::STRING, 4);
$xfer += $output->writeString($this->globusGateKeeperEndPoint);
$xfer += $output->writeFieldEnd();
}
@@ -368,6 +430,7 @@ class GlobusJobSubmission {
class GSISSHJobSubmission {
static $_TSPEC;
+ public $gssishJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
public $resourceJobManager = null;
public $sshPort = 22;
public $exports = null;
@@ -379,6 +442,10 @@ class GSISSHJobSubmission {
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'gssishJobSubmissionID',
+ 'type' => TType::STRING,
+ ),
2 => array(
'var' => 'resourceJobManager',
'type' => TType::I32,
@@ -422,6 +489,9 @@ class GSISSHJobSubmission {
);
}
if (is_array($vals)) {
+ if (isset($vals['gssishJobSubmissionID'])) {
+ $this->gssishJobSubmissionID = $vals['gssishJobSubmissionID'];
+ }
if (isset($vals['resourceJobManager'])) {
$this->resourceJobManager = $vals['resourceJobManager'];
}
@@ -465,6 +535,13 @@ class GSISSHJobSubmission {
}
switch ($fid)
{
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->gssishJobSubmissionID);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
case 2:
if ($ftype == TType::I32) {
$xfer += $input->readI32($this->resourceJobManager);
@@ -561,6 +638,11 @@ class GSISSHJobSubmission {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('GSISSHJobSubmission');
+ if ($this->gssishJobSubmissionID !== null) {
+ $xfer += $output->writeFieldBegin('gssishJobSubmissionID', TType::STRING, 1);
+ $xfer += $output->writeString($this->gssishJobSubmissionID);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->resourceJobManager !== null) {
$xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
$xfer += $output->writeI32($this->resourceJobManager);
@@ -643,183 +725,6 @@ class GSISSHJobSubmission {
}
-class JobSubmissionProtocols {
- static $_TSPEC;
-
- public $isEmpty = false;
- public $preferedJobSubmissionProtocol = null;
- public $sshJobSubmissionInfo = null;
- public $globusGRAMHost = null;
- public $globusGRAMPort = 2119;
- public $unicoreBESEndPoint = null;
-
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'isEmpty',
- 'type' => TType::BOOL,
- ),
- 2 => array(
- 'var' => 'preferedJobSubmissionProtocol',
- 'type' => TType::I32,
- ),
- 3 => array(
- 'var' => 'sshJobSubmissionInfo',
- 'type' => TType::STRUCT,
- 'class' => '\SSHJobSubmission',
- ),
- 4 => array(
- 'var' => 'globusGRAMHost',
- 'type' => TType::STRING,
- ),
- 5 => array(
- 'var' => 'globusGRAMPort',
- 'type' => TType::I32,
- ),
- 6 => array(
- 'var' => 'unicoreBESEndPoint',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['isEmpty'])) {
- $this->isEmpty = $vals['isEmpty'];
- }
- if (isset($vals['preferedJobSubmissionProtocol'])) {
- $this->preferedJobSubmissionProtocol = $vals['preferedJobSubmissionProtocol'];
- }
- if (isset($vals['sshJobSubmissionInfo'])) {
- $this->sshJobSubmissionInfo = $vals['sshJobSubmissionInfo'];
- }
- if (isset($vals['globusGRAMHost'])) {
- $this->globusGRAMHost = $vals['globusGRAMHost'];
- }
- if (isset($vals['globusGRAMPort'])) {
- $this->globusGRAMPort = $vals['globusGRAMPort'];
- }
- if (isset($vals['unicoreBESEndPoint'])) {
- $this->unicoreBESEndPoint = $vals['unicoreBESEndPoint'];
- }
- }
- }
-
- public function getName() {
- return 'JobSubmissionProtocols';
- }
-
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->isEmpty);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->preferedJobSubmissionProtocol);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRUCT) {
- $this->sshJobSubmissionInfo = new \SSHJobSubmission();
- $xfer += $this->sshJobSubmissionInfo->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->globusGRAMHost);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 5:
- if ($ftype == TType::I32) {
- $xfer += $input->readI32($this->globusGRAMPort);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 6:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->unicoreBESEndPoint);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
-
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('JobSubmissionProtocols');
- if ($this->isEmpty !== null) {
- $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
- $xfer += $output->writeBool($this->isEmpty);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->preferedJobSubmissionProtocol !== null) {
- $xfer += $output->writeFieldBegin('preferedJobSubmissionProtocol', TType::I32, 2);
- $xfer += $output->writeI32($this->preferedJobSubmissionProtocol);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->sshJobSubmissionInfo !== null) {
- if (!is_object($this->sshJobSubmissionInfo)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('sshJobSubmissionInfo', TType::STRUCT, 3);
- $xfer += $this->sshJobSubmissionInfo->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->globusGRAMHost !== null) {
- $xfer += $output->writeFieldBegin('globusGRAMHost', TType::STRING, 4);
- $xfer += $output->writeString($this->globusGRAMHost);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->globusGRAMPort !== null) {
- $xfer += $output->writeFieldBegin('globusGRAMPort', TType::I32, 5);
- $xfer += $output->writeI32($this->globusGRAMPort);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->unicoreBESEndPoint !== null) {
- $xfer += $output->writeFieldBegin('unicoreBESEndPoint', TType::STRING, 6);
- $xfer += $output->writeString($this->unicoreBESEndPoint);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
-}
-
class ComputeResourceDescription {
static $_TSPEC;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 9113ca5..2959145 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -24,6 +24,7 @@ package org.apache.airavata.client.samples;
import org.apache.airavata.api.error.ExperimentNotFoundException;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.ClientSettings;
+import org.apache.airavata.model.appcatalog.GSISSHJobSubmission;
import org.apache.airavata.model.util.ProjectModelUtil;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.model.workspace.experiment.*;
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GSISSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GSISSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GSISSHJobSubmission.java
index 8176c99..a0e7107 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GSISSHJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GSISSHJobSubmission.java
@@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class GSISSHJobSubmission implements org.apache.thrift.TBase<GSISSHJobSubmission, GSISSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GSISSHJobSubmission> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GSISSHJobSubmission");
+ private static final org.apache.thrift.protocol.TField GSSISH_JOB_SUBMISSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gssishJobSubmissionID", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField EXPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("exports", org.apache.thrift.protocol.TType.SET, (short)4);
@@ -65,6 +66,7 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new GSISSHJobSubmissionTupleSchemeFactory());
}
+ private String gssishJobSubmissionID; // required
private ResourceJobManager resourceJobManager; // required
private int sshPort; // optional
private Set<String> exports; // optional
@@ -75,6 +77,7 @@ 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 {
+ GSSISH_JOB_SUBMISSION_ID((short)1, "gssishJobSubmissionID"),
/**
*
* @see ResourceJobManager
@@ -100,6 +103,8 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // GSSISH_JOB_SUBMISSION_ID
+ return GSSISH_JOB_SUBMISSION_ID;
case 2: // RESOURCE_JOB_MANAGER
return RESOURCE_JOB_MANAGER;
case 3: // SSH_PORT
@@ -160,6 +165,8 @@ import org.slf4j.LoggerFactory;
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.GSSISH_JOB_SUBMISSION_ID, new org.apache.thrift.meta_data.FieldMetaData("gssishJobSubmissionID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -182,14 +189,18 @@ import org.slf4j.LoggerFactory;
}
public GSISSHJobSubmission() {
+ this.gssishJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
+
this.sshPort = 22;
}
public GSISSHJobSubmission(
+ String gssishJobSubmissionID,
ResourceJobManager resourceJobManager)
{
this();
+ this.gssishJobSubmissionID = gssishJobSubmissionID;
this.resourceJobManager = resourceJobManager;
}
@@ -198,6 +209,9 @@ import org.slf4j.LoggerFactory;
*/
public GSISSHJobSubmission(GSISSHJobSubmission other) {
__isset_bitfield = other.__isset_bitfield;
+ if (other.isSetGssishJobSubmissionID()) {
+ this.gssishJobSubmissionID = other.gssishJobSubmissionID;
+ }
if (other.isSetResourceJobManager()) {
this.resourceJobManager = other.resourceJobManager;
}
@@ -228,6 +242,8 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
+ this.gssishJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
+
this.resourceJobManager = null;
this.sshPort = 22;
@@ -238,6 +254,29 @@ import org.slf4j.LoggerFactory;
this.monitorMode = null;
}
+ public String getGssishJobSubmissionID() {
+ return this.gssishJobSubmissionID;
+ }
+
+ public void setGssishJobSubmissionID(String gssishJobSubmissionID) {
+ this.gssishJobSubmissionID = gssishJobSubmissionID;
+ }
+
+ public void unsetGssishJobSubmissionID() {
+ this.gssishJobSubmissionID = null;
+ }
+
+ /** Returns true if field gssishJobSubmissionID is set (has been assigned a value) and false otherwise */
+ public boolean isSetGssishJobSubmissionID() {
+ return this.gssishJobSubmissionID != null;
+ }
+
+ public void setGssishJobSubmissionIDIsSet(boolean value) {
+ if (!value) {
+ this.gssishJobSubmissionID = null;
+ }
+ }
+
/**
*
* @see ResourceJobManager
@@ -453,6 +492,14 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case GSSISH_JOB_SUBMISSION_ID:
+ if (value == null) {
+ unsetGssishJobSubmissionID();
+ } else {
+ setGssishJobSubmissionID((String)value);
+ }
+ break;
+
case RESOURCE_JOB_MANAGER:
if (value == null) {
unsetResourceJobManager();
@@ -514,6 +561,9 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
+ case GSSISH_JOB_SUBMISSION_ID:
+ return getGssishJobSubmissionID();
+
case RESOURCE_JOB_MANAGER:
return getResourceJobManager();
@@ -546,6 +596,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
+ case GSSISH_JOB_SUBMISSION_ID:
+ return isSetGssishJobSubmissionID();
case RESOURCE_JOB_MANAGER:
return isSetResourceJobManager();
case SSH_PORT:
@@ -577,6 +629,15 @@ import org.slf4j.LoggerFactory;
if (that == null)
return false;
+ boolean this_present_gssishJobSubmissionID = true && this.isSetGssishJobSubmissionID();
+ boolean that_present_gssishJobSubmissionID = true && that.isSetGssishJobSubmissionID();
+ if (this_present_gssishJobSubmissionID || that_present_gssishJobSubmissionID) {
+ if (!(this_present_gssishJobSubmissionID && that_present_gssishJobSubmissionID))
+ return false;
+ if (!this.gssishJobSubmissionID.equals(that.gssishJobSubmissionID))
+ return false;
+ }
+
boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
if (this_present_resourceJobManager || that_present_resourceJobManager) {
@@ -656,6 +717,16 @@ import org.slf4j.LoggerFactory;
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetGssishJobSubmissionID()).compareTo(other.isSetGssishJobSubmissionID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGssishJobSubmissionID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gssishJobSubmissionID, other.gssishJobSubmissionID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
if (lastComparison != 0) {
return lastComparison;
@@ -746,6 +817,14 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("GSISSHJobSubmission(");
boolean first = true;
+ sb.append("gssishJobSubmissionID:");
+ if (this.gssishJobSubmissionID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gssishJobSubmissionID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("resourceJobManager:");
if (this.resourceJobManager == null) {
sb.append("null");
@@ -815,6 +894,10 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (!isSetGssishJobSubmissionID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gssishJobSubmissionID' is unset! Struct:" + toString());
+ }
+
if (!isSetResourceJobManager()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
}
@@ -858,6 +941,14 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
+ case 1: // GSSISH_JOB_SUBMISSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.gssishJobSubmissionID = iprot.readString();
+ struct.setGssishJobSubmissionIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
case 2: // RESOURCE_JOB_MANAGER
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
@@ -957,6 +1048,11 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.gssishJobSubmissionID != null) {
+ oprot.writeFieldBegin(GSSISH_JOB_SUBMISSION_ID_FIELD_DESC);
+ oprot.writeString(struct.gssishJobSubmissionID);
+ oprot.writeFieldEnd();
+ }
if (struct.resourceJobManager != null) {
oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
oprot.writeI32(struct.resourceJobManager.getValue());
@@ -1040,6 +1136,7 @@ import org.slf4j.LoggerFactory;
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.gssishJobSubmissionID);
oprot.writeI32(struct.resourceJobManager.getValue());
BitSet optionals = new BitSet();
if (struct.isSetSshPort()) {
@@ -1102,6 +1199,8 @@ import org.slf4j.LoggerFactory;
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.gssishJobSubmissionID = iprot.readString();
+ struct.setGssishJobSubmissionIDIsSet(true);
struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
struct.setResourceJobManagerIsSet(true);
BitSet incoming = iprot.readBitSet(6);
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GlobusJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GlobusJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GlobusJobSubmission.java
index fd0e374..5eae704 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GlobusJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/GlobusJobSubmission.java
@@ -51,9 +51,10 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class GlobusJobSubmission implements org.apache.thrift.TBase<GlobusJobSubmission, GlobusJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GlobusJobSubmission> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobusJobSubmission");
- private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField GLOBUS_GATE_KEEPER_END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGateKeeperEndPoint", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField GLOBUS_JOB_SUBMISSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("globusJobSubmissionID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField GLOBUS_GATE_KEEPER_END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGateKeeperEndPoint", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -61,23 +62,25 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new GlobusJobSubmissionTupleSchemeFactory());
}
+ private String globusJobSubmissionID; // required
private SecurityProtocol securityProtocol; // required
private ResourceJobManager resourceJobManager; // required
private String globusGateKeeperEndPoint; // 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 {
+ GLOBUS_JOB_SUBMISSION_ID((short)1, "globusJobSubmissionID"),
/**
*
* @see SecurityProtocol
*/
- SECURITY_PROTOCOL((short)1, "securityProtocol"),
+ SECURITY_PROTOCOL((short)2, "securityProtocol"),
/**
*
* @see ResourceJobManager
*/
- RESOURCE_JOB_MANAGER((short)2, "resourceJobManager"),
- GLOBUS_GATE_KEEPER_END_POINT((short)3, "globusGateKeeperEndPoint");
+ RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"),
+ GLOBUS_GATE_KEEPER_END_POINT((short)4, "globusGateKeeperEndPoint");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -92,11 +95,13 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // SECURITY_PROTOCOL
+ case 1: // GLOBUS_JOB_SUBMISSION_ID
+ return GLOBUS_JOB_SUBMISSION_ID;
+ case 2: // SECURITY_PROTOCOL
return SECURITY_PROTOCOL;
- case 2: // RESOURCE_JOB_MANAGER
+ case 3: // RESOURCE_JOB_MANAGER
return RESOURCE_JOB_MANAGER;
- case 3: // GLOBUS_GATE_KEEPER_END_POINT
+ case 4: // GLOBUS_GATE_KEEPER_END_POINT
return GLOBUS_GATE_KEEPER_END_POINT;
default:
return null;
@@ -142,6 +147,8 @@ import org.slf4j.LoggerFactory;
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.GLOBUS_JOB_SUBMISSION_ID, new org.apache.thrift.meta_data.FieldMetaData("globusJobSubmissionID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -153,13 +160,17 @@ import org.slf4j.LoggerFactory;
}
public GlobusJobSubmission() {
+ this.globusJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
+
}
public GlobusJobSubmission(
+ String globusJobSubmissionID,
SecurityProtocol securityProtocol,
ResourceJobManager resourceJobManager)
{
this();
+ this.globusJobSubmissionID = globusJobSubmissionID;
this.securityProtocol = securityProtocol;
this.resourceJobManager = resourceJobManager;
}
@@ -168,6 +179,9 @@ import org.slf4j.LoggerFactory;
* Performs a deep copy on <i>other</i>.
*/
public GlobusJobSubmission(GlobusJobSubmission other) {
+ if (other.isSetGlobusJobSubmissionID()) {
+ this.globusJobSubmissionID = other.globusJobSubmissionID;
+ }
if (other.isSetSecurityProtocol()) {
this.securityProtocol = other.securityProtocol;
}
@@ -185,11 +199,36 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
+ this.globusJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
+
this.securityProtocol = null;
this.resourceJobManager = null;
this.globusGateKeeperEndPoint = null;
}
+ public String getGlobusJobSubmissionID() {
+ return this.globusJobSubmissionID;
+ }
+
+ public void setGlobusJobSubmissionID(String globusJobSubmissionID) {
+ this.globusJobSubmissionID = globusJobSubmissionID;
+ }
+
+ public void unsetGlobusJobSubmissionID() {
+ this.globusJobSubmissionID = null;
+ }
+
+ /** Returns true if field globusJobSubmissionID is set (has been assigned a value) and false otherwise */
+ public boolean isSetGlobusJobSubmissionID() {
+ return this.globusJobSubmissionID != null;
+ }
+
+ public void setGlobusJobSubmissionIDIsSet(boolean value) {
+ if (!value) {
+ this.globusJobSubmissionID = null;
+ }
+ }
+
/**
*
* @see SecurityProtocol
@@ -277,6 +316,14 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case GLOBUS_JOB_SUBMISSION_ID:
+ if (value == null) {
+ unsetGlobusJobSubmissionID();
+ } else {
+ setGlobusJobSubmissionID((String)value);
+ }
+ break;
+
case SECURITY_PROTOCOL:
if (value == null) {
unsetSecurityProtocol();
@@ -306,6 +353,9 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
+ case GLOBUS_JOB_SUBMISSION_ID:
+ return getGlobusJobSubmissionID();
+
case SECURITY_PROTOCOL:
return getSecurityProtocol();
@@ -326,6 +376,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
+ case GLOBUS_JOB_SUBMISSION_ID:
+ return isSetGlobusJobSubmissionID();
case SECURITY_PROTOCOL:
return isSetSecurityProtocol();
case RESOURCE_JOB_MANAGER:
@@ -349,6 +401,15 @@ import org.slf4j.LoggerFactory;
if (that == null)
return false;
+ boolean this_present_globusJobSubmissionID = true && this.isSetGlobusJobSubmissionID();
+ boolean that_present_globusJobSubmissionID = true && that.isSetGlobusJobSubmissionID();
+ if (this_present_globusJobSubmissionID || that_present_globusJobSubmissionID) {
+ if (!(this_present_globusJobSubmissionID && that_present_globusJobSubmissionID))
+ return false;
+ if (!this.globusJobSubmissionID.equals(that.globusJobSubmissionID))
+ return false;
+ }
+
boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
if (this_present_securityProtocol || that_present_securityProtocol) {
@@ -392,6 +453,16 @@ import org.slf4j.LoggerFactory;
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetGlobusJobSubmissionID()).compareTo(other.isSetGlobusJobSubmissionID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGlobusJobSubmissionID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusJobSubmissionID, other.globusJobSubmissionID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
if (lastComparison != 0) {
return lastComparison;
@@ -442,6 +513,14 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("GlobusJobSubmission(");
boolean first = true;
+ sb.append("globusJobSubmissionID:");
+ if (this.globusJobSubmissionID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.globusJobSubmissionID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("securityProtocol:");
if (this.securityProtocol == null) {
sb.append("null");
@@ -473,6 +552,10 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (!isSetGlobusJobSubmissionID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'globusJobSubmissionID' is unset! Struct:" + toString());
+ }
+
if (!isSetSecurityProtocol()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
}
@@ -518,7 +601,15 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 1: // SECURITY_PROTOCOL
+ case 1: // GLOBUS_JOB_SUBMISSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.globusJobSubmissionID = iprot.readString();
+ struct.setGlobusJobSubmissionIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECURITY_PROTOCOL
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
struct.setSecurityProtocolIsSet(true);
@@ -526,7 +617,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // RESOURCE_JOB_MANAGER
+ case 3: // RESOURCE_JOB_MANAGER
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
struct.setResourceJobManagerIsSet(true);
@@ -534,7 +625,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 3: // GLOBUS_GATE_KEEPER_END_POINT
+ case 4: // GLOBUS_GATE_KEEPER_END_POINT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.globusGateKeeperEndPoint = iprot.readString();
struct.setGlobusGateKeeperEndPointIsSet(true);
@@ -555,6 +646,11 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.globusJobSubmissionID != null) {
+ oprot.writeFieldBegin(GLOBUS_JOB_SUBMISSION_ID_FIELD_DESC);
+ oprot.writeString(struct.globusJobSubmissionID);
+ oprot.writeFieldEnd();
+ }
if (struct.securityProtocol != null) {
oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
oprot.writeI32(struct.securityProtocol.getValue());
@@ -589,6 +685,7 @@ import org.slf4j.LoggerFactory;
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.globusJobSubmissionID);
oprot.writeI32(struct.securityProtocol.getValue());
oprot.writeI32(struct.resourceJobManager.getValue());
BitSet optionals = new BitSet();
@@ -604,6 +701,8 @@ import org.slf4j.LoggerFactory;
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.globusJobSubmissionID = iprot.readString();
+ struct.setGlobusJobSubmissionIDIsSet(true);
struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
struct.setSecurityProtocolIsSet(true);
struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocol.java
index dbcfa54..f606bbc 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocol.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocol.java
@@ -42,8 +42,9 @@ import org.apache.thrift.TEnum;
*/
@SuppressWarnings("all") public enum JobSubmissionProtocol implements org.apache.thrift.TEnum {
SSH(0),
- GRAM(1),
- UNICORE(2);
+ GSISSH(1),
+ GRAM(2),
+ UNICORE(3);
private final int value;
@@ -67,8 +68,10 @@ import org.apache.thrift.TEnum;
case 0:
return SSH;
case 1:
- return GRAM;
+ return GSISSH;
case 2:
+ return GRAM;
+ case 3:
return UNICORE;
default:
return null;
[6/7] adding id to all the job submission protocols and data movement
protocols - AIRAVATA-1203
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocols.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocols.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocols.java
deleted file mode 100644
index 9bd706f..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/JobSubmissionProtocols.java
+++ /dev/null
@@ -1,937 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Job Submission Protocols
- *
- * resourceId:
- *
- * hostName:
- * Fully Qualified Host Name.
- *
- * ipAddress:
- * IP Addresse of the Hostname.
- *
- * resourceDescription:
- * A user friendly description of the hostname.
- *
- * preferedJobSubmissionProtocol:
- * HPC resources may have multiple options to interact with the resource. This flag identified a prefered mechanism.
- *
- * preferedDataMovementProtocol:
- * Option to specify a prefered data movement mechanism of the available options.
- *
- */
-@SuppressWarnings("all") public class JobSubmissionProtocols implements org.apache.thrift.TBase<JobSubmissionProtocols, JobSubmissionProtocols._Fields>, java.io.Serializable, Cloneable, Comparable<JobSubmissionProtocols> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobSubmissionProtocols");
-
- 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 PREFERED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferedJobSubmissionProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField SSH_JOB_SUBMISSION_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("sshJobSubmissionInfo", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final org.apache.thrift.protocol.TField GLOBUS_GRAMHOST_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGRAMHost", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField GLOBUS_GRAMPORT_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGRAMPort", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final org.apache.thrift.protocol.TField UNICORE_BESEND_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("unicoreBESEndPoint", org.apache.thrift.protocol.TType.STRING, (short)6);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new JobSubmissionProtocolsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new JobSubmissionProtocolsTupleSchemeFactory());
- }
-
- private boolean isEmpty; // required
- private JobSubmissionProtocol preferedJobSubmissionProtocol; // optional
- private SSHJobSubmission sshJobSubmissionInfo; // optional
- private String globusGRAMHost; // optional
- private int globusGRAMPort; // optional
- private String unicoreBESEndPoint; // 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 {
- IS_EMPTY((short)1, "isEmpty"),
- /**
- *
- * @see JobSubmissionProtocol
- */
- PREFERED_JOB_SUBMISSION_PROTOCOL((short)2, "preferedJobSubmissionProtocol"),
- SSH_JOB_SUBMISSION_INFO((short)3, "sshJobSubmissionInfo"),
- GLOBUS_GRAMHOST((short)4, "globusGRAMHost"),
- GLOBUS_GRAMPORT((short)5, "globusGRAMPort"),
- UNICORE_BESEND_POINT((short)6, "unicoreBESEndPoint");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IS_EMPTY
- return IS_EMPTY;
- case 2: // PREFERED_JOB_SUBMISSION_PROTOCOL
- return PREFERED_JOB_SUBMISSION_PROTOCOL;
- case 3: // SSH_JOB_SUBMISSION_INFO
- return SSH_JOB_SUBMISSION_INFO;
- case 4: // GLOBUS_GRAMHOST
- return GLOBUS_GRAMHOST;
- case 5: // GLOBUS_GRAMPORT
- return GLOBUS_GRAMPORT;
- case 6: // UNICORE_BESEND_POINT
- return UNICORE_BESEND_POINT;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ISEMPTY_ISSET_ID = 0;
- private static final int __GLOBUSGRAMPORT_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.PREFERED_JOB_SUBMISSION_PROTOCOL,_Fields.SSH_JOB_SUBMISSION_INFO,_Fields.GLOBUS_GRAMHOST,_Fields.GLOBUS_GRAMPORT,_Fields.UNICORE_BESEND_POINT};
- 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.PREFERED_JOB_SUBMISSION_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferedJobSubmissionProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobSubmissionProtocol.class)));
- tmpMap.put(_Fields.SSH_JOB_SUBMISSION_INFO, new org.apache.thrift.meta_data.FieldMetaData("sshJobSubmissionInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SSHJobSubmission.class)));
- tmpMap.put(_Fields.GLOBUS_GRAMHOST, new org.apache.thrift.meta_data.FieldMetaData("globusGRAMHost", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.GLOBUS_GRAMPORT, new org.apache.thrift.meta_data.FieldMetaData("globusGRAMPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.UNICORE_BESEND_POINT, new org.apache.thrift.meta_data.FieldMetaData("unicoreBESEndPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobSubmissionProtocols.class, metaDataMap);
- }
-
- public JobSubmissionProtocols() {
- this.isEmpty = false;
-
- this.globusGRAMPort = 2119;
-
- }
-
- public JobSubmissionProtocols(
- boolean isEmpty)
- {
- this();
- this.isEmpty = isEmpty;
- setIsEmptyIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public JobSubmissionProtocols(JobSubmissionProtocols other) {
- __isset_bitfield = other.__isset_bitfield;
- this.isEmpty = other.isEmpty;
- if (other.isSetPreferedJobSubmissionProtocol()) {
- this.preferedJobSubmissionProtocol = other.preferedJobSubmissionProtocol;
- }
- if (other.isSetSshJobSubmissionInfo()) {
- this.sshJobSubmissionInfo = new SSHJobSubmission(other.sshJobSubmissionInfo);
- }
- if (other.isSetGlobusGRAMHost()) {
- this.globusGRAMHost = other.globusGRAMHost;
- }
- this.globusGRAMPort = other.globusGRAMPort;
- if (other.isSetUnicoreBESEndPoint()) {
- this.unicoreBESEndPoint = other.unicoreBESEndPoint;
- }
- }
-
- public JobSubmissionProtocols deepCopy() {
- return new JobSubmissionProtocols(this);
- }
-
- @Override
- public void clear() {
- this.isEmpty = false;
-
- this.preferedJobSubmissionProtocol = null;
- this.sshJobSubmissionInfo = null;
- this.globusGRAMHost = null;
- this.globusGRAMPort = 2119;
-
- this.unicoreBESEndPoint = 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);
- }
-
- /**
- *
- * @see JobSubmissionProtocol
- */
- public JobSubmissionProtocol getPreferedJobSubmissionProtocol() {
- return this.preferedJobSubmissionProtocol;
- }
-
- /**
- *
- * @see JobSubmissionProtocol
- */
- public void setPreferedJobSubmissionProtocol(JobSubmissionProtocol preferedJobSubmissionProtocol) {
- this.preferedJobSubmissionProtocol = preferedJobSubmissionProtocol;
- }
-
- public void unsetPreferedJobSubmissionProtocol() {
- this.preferedJobSubmissionProtocol = null;
- }
-
- /** Returns true if field preferedJobSubmissionProtocol is set (has been assigned a value) and false otherwise */
- public boolean isSetPreferedJobSubmissionProtocol() {
- return this.preferedJobSubmissionProtocol != null;
- }
-
- public void setPreferedJobSubmissionProtocolIsSet(boolean value) {
- if (!value) {
- this.preferedJobSubmissionProtocol = null;
- }
- }
-
- public SSHJobSubmission getSshJobSubmissionInfo() {
- return this.sshJobSubmissionInfo;
- }
-
- public void setSshJobSubmissionInfo(SSHJobSubmission sshJobSubmissionInfo) {
- this.sshJobSubmissionInfo = sshJobSubmissionInfo;
- }
-
- public void unsetSshJobSubmissionInfo() {
- this.sshJobSubmissionInfo = null;
- }
-
- /** Returns true if field sshJobSubmissionInfo is set (has been assigned a value) and false otherwise */
- public boolean isSetSshJobSubmissionInfo() {
- return this.sshJobSubmissionInfo != null;
- }
-
- public void setSshJobSubmissionInfoIsSet(boolean value) {
- if (!value) {
- this.sshJobSubmissionInfo = null;
- }
- }
-
- public String getGlobusGRAMHost() {
- return this.globusGRAMHost;
- }
-
- public void setGlobusGRAMHost(String globusGRAMHost) {
- this.globusGRAMHost = globusGRAMHost;
- }
-
- public void unsetGlobusGRAMHost() {
- this.globusGRAMHost = null;
- }
-
- /** Returns true if field globusGRAMHost is set (has been assigned a value) and false otherwise */
- public boolean isSetGlobusGRAMHost() {
- return this.globusGRAMHost != null;
- }
-
- public void setGlobusGRAMHostIsSet(boolean value) {
- if (!value) {
- this.globusGRAMHost = null;
- }
- }
-
- public int getGlobusGRAMPort() {
- return this.globusGRAMPort;
- }
-
- public void setGlobusGRAMPort(int globusGRAMPort) {
- this.globusGRAMPort = globusGRAMPort;
- setGlobusGRAMPortIsSet(true);
- }
-
- public void unsetGlobusGRAMPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GLOBUSGRAMPORT_ISSET_ID);
- }
-
- /** Returns true if field globusGRAMPort is set (has been assigned a value) and false otherwise */
- public boolean isSetGlobusGRAMPort() {
- return EncodingUtils.testBit(__isset_bitfield, __GLOBUSGRAMPORT_ISSET_ID);
- }
-
- public void setGlobusGRAMPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GLOBUSGRAMPORT_ISSET_ID, value);
- }
-
- public String getUnicoreBESEndPoint() {
- return this.unicoreBESEndPoint;
- }
-
- public void setUnicoreBESEndPoint(String unicoreBESEndPoint) {
- this.unicoreBESEndPoint = unicoreBESEndPoint;
- }
-
- public void unsetUnicoreBESEndPoint() {
- this.unicoreBESEndPoint = null;
- }
-
- /** Returns true if field unicoreBESEndPoint is set (has been assigned a value) and false otherwise */
- public boolean isSetUnicoreBESEndPoint() {
- return this.unicoreBESEndPoint != null;
- }
-
- public void setUnicoreBESEndPointIsSet(boolean value) {
- if (!value) {
- this.unicoreBESEndPoint = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IS_EMPTY:
- if (value == null) {
- unsetIsEmpty();
- } else {
- setIsEmpty((Boolean)value);
- }
- break;
-
- case PREFERED_JOB_SUBMISSION_PROTOCOL:
- if (value == null) {
- unsetPreferedJobSubmissionProtocol();
- } else {
- setPreferedJobSubmissionProtocol((JobSubmissionProtocol)value);
- }
- break;
-
- case SSH_JOB_SUBMISSION_INFO:
- if (value == null) {
- unsetSshJobSubmissionInfo();
- } else {
- setSshJobSubmissionInfo((SSHJobSubmission)value);
- }
- break;
-
- case GLOBUS_GRAMHOST:
- if (value == null) {
- unsetGlobusGRAMHost();
- } else {
- setGlobusGRAMHost((String)value);
- }
- break;
-
- case GLOBUS_GRAMPORT:
- if (value == null) {
- unsetGlobusGRAMPort();
- } else {
- setGlobusGRAMPort((Integer)value);
- }
- break;
-
- case UNICORE_BESEND_POINT:
- if (value == null) {
- unsetUnicoreBESEndPoint();
- } else {
- setUnicoreBESEndPoint((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IS_EMPTY:
- return Boolean.valueOf(isIsEmpty());
-
- case PREFERED_JOB_SUBMISSION_PROTOCOL:
- return getPreferedJobSubmissionProtocol();
-
- case SSH_JOB_SUBMISSION_INFO:
- return getSshJobSubmissionInfo();
-
- case GLOBUS_GRAMHOST:
- return getGlobusGRAMHost();
-
- case GLOBUS_GRAMPORT:
- return Integer.valueOf(getGlobusGRAMPort());
-
- case UNICORE_BESEND_POINT:
- return getUnicoreBESEndPoint();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IS_EMPTY:
- return isSetIsEmpty();
- case PREFERED_JOB_SUBMISSION_PROTOCOL:
- return isSetPreferedJobSubmissionProtocol();
- case SSH_JOB_SUBMISSION_INFO:
- return isSetSshJobSubmissionInfo();
- case GLOBUS_GRAMHOST:
- return isSetGlobusGRAMHost();
- case GLOBUS_GRAMPORT:
- return isSetGlobusGRAMPort();
- case UNICORE_BESEND_POINT:
- return isSetUnicoreBESEndPoint();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof JobSubmissionProtocols)
- return this.equals((JobSubmissionProtocols)that);
- return false;
- }
-
- public boolean equals(JobSubmissionProtocols that) {
- 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_preferedJobSubmissionProtocol = true && this.isSetPreferedJobSubmissionProtocol();
- boolean that_present_preferedJobSubmissionProtocol = true && that.isSetPreferedJobSubmissionProtocol();
- if (this_present_preferedJobSubmissionProtocol || that_present_preferedJobSubmissionProtocol) {
- if (!(this_present_preferedJobSubmissionProtocol && that_present_preferedJobSubmissionProtocol))
- return false;
- if (!this.preferedJobSubmissionProtocol.equals(that.preferedJobSubmissionProtocol))
- return false;
- }
-
- boolean this_present_sshJobSubmissionInfo = true && this.isSetSshJobSubmissionInfo();
- boolean that_present_sshJobSubmissionInfo = true && that.isSetSshJobSubmissionInfo();
- if (this_present_sshJobSubmissionInfo || that_present_sshJobSubmissionInfo) {
- if (!(this_present_sshJobSubmissionInfo && that_present_sshJobSubmissionInfo))
- return false;
- if (!this.sshJobSubmissionInfo.equals(that.sshJobSubmissionInfo))
- return false;
- }
-
- boolean this_present_globusGRAMHost = true && this.isSetGlobusGRAMHost();
- boolean that_present_globusGRAMHost = true && that.isSetGlobusGRAMHost();
- if (this_present_globusGRAMHost || that_present_globusGRAMHost) {
- if (!(this_present_globusGRAMHost && that_present_globusGRAMHost))
- return false;
- if (!this.globusGRAMHost.equals(that.globusGRAMHost))
- return false;
- }
-
- boolean this_present_globusGRAMPort = true && this.isSetGlobusGRAMPort();
- boolean that_present_globusGRAMPort = true && that.isSetGlobusGRAMPort();
- if (this_present_globusGRAMPort || that_present_globusGRAMPort) {
- if (!(this_present_globusGRAMPort && that_present_globusGRAMPort))
- return false;
- if (this.globusGRAMPort != that.globusGRAMPort)
- return false;
- }
-
- boolean this_present_unicoreBESEndPoint = true && this.isSetUnicoreBESEndPoint();
- boolean that_present_unicoreBESEndPoint = true && that.isSetUnicoreBESEndPoint();
- if (this_present_unicoreBESEndPoint || that_present_unicoreBESEndPoint) {
- if (!(this_present_unicoreBESEndPoint && that_present_unicoreBESEndPoint))
- return false;
- if (!this.unicoreBESEndPoint.equals(that.unicoreBESEndPoint))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(JobSubmissionProtocols other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- 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(isSetPreferedJobSubmissionProtocol()).compareTo(other.isSetPreferedJobSubmissionProtocol());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPreferedJobSubmissionProtocol()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferedJobSubmissionProtocol, other.preferedJobSubmissionProtocol);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSshJobSubmissionInfo()).compareTo(other.isSetSshJobSubmissionInfo());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshJobSubmissionInfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshJobSubmissionInfo, other.sshJobSubmissionInfo);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGlobusGRAMHost()).compareTo(other.isSetGlobusGRAMHost());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGlobusGRAMHost()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusGRAMHost, other.globusGRAMHost);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGlobusGRAMPort()).compareTo(other.isSetGlobusGRAMPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGlobusGRAMPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusGRAMPort, other.globusGRAMPort);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUnicoreBESEndPoint()).compareTo(other.isSetUnicoreBESEndPoint());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUnicoreBESEndPoint()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unicoreBESEndPoint, other.unicoreBESEndPoint);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("JobSubmissionProtocols(");
- boolean first = true;
-
- sb.append("isEmpty:");
- sb.append(this.isEmpty);
- first = false;
- if (isSetPreferedJobSubmissionProtocol()) {
- if (!first) sb.append(", ");
- sb.append("preferedJobSubmissionProtocol:");
- if (this.preferedJobSubmissionProtocol == null) {
- sb.append("null");
- } else {
- sb.append(this.preferedJobSubmissionProtocol);
- }
- first = false;
- }
- if (isSetSshJobSubmissionInfo()) {
- if (!first) sb.append(", ");
- sb.append("sshJobSubmissionInfo:");
- if (this.sshJobSubmissionInfo == null) {
- sb.append("null");
- } else {
- sb.append(this.sshJobSubmissionInfo);
- }
- first = false;
- }
- if (isSetGlobusGRAMHost()) {
- if (!first) sb.append(", ");
- sb.append("globusGRAMHost:");
- if (this.globusGRAMHost == null) {
- sb.append("null");
- } else {
- sb.append(this.globusGRAMHost);
- }
- first = false;
- }
- if (isSetGlobusGRAMPort()) {
- if (!first) sb.append(", ");
- sb.append("globusGRAMPort:");
- sb.append(this.globusGRAMPort);
- first = false;
- }
- if (isSetUnicoreBESEndPoint()) {
- if (!first) sb.append(", ");
- sb.append("unicoreBESEndPoint:");
- if (this.unicoreBESEndPoint == null) {
- sb.append("null");
- } else {
- sb.append(this.unicoreBESEndPoint);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- 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());
- }
-
- // check for sub-struct validity
- if (sshJobSubmissionInfo != null) {
- sshJobSubmissionInfo.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- }
- }
-
- private static class JobSubmissionProtocolsStandardSchemeFactory implements SchemeFactory {
- public JobSubmissionProtocolsStandardScheme getScheme() {
- return new JobSubmissionProtocolsStandardScheme();
- }
- }
-
- private static class JobSubmissionProtocolsStandardScheme extends StandardScheme<JobSubmissionProtocols> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- 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: // PREFERED_JOB_SUBMISSION_PROTOCOL
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.preferedJobSubmissionProtocol = JobSubmissionProtocol.findByValue(iprot.readI32());
- struct.setPreferedJobSubmissionProtocolIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SSH_JOB_SUBMISSION_INFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sshJobSubmissionInfo = new SSHJobSubmission();
- struct.sshJobSubmissionInfo.read(iprot);
- struct.setSshJobSubmissionInfoIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // GLOBUS_GRAMHOST
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.globusGRAMHost = iprot.readString();
- struct.setGlobusGRAMHostIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // GLOBUS_GRAMPORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.globusGRAMPort = iprot.readI32();
- struct.setGlobusGRAMPortIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // UNICORE_BESEND_POINT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.unicoreBESEndPoint = iprot.readString();
- struct.setUnicoreBESEndPointIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(IS_EMPTY_FIELD_DESC);
- oprot.writeBool(struct.isEmpty);
- oprot.writeFieldEnd();
- if (struct.preferedJobSubmissionProtocol != null) {
- if (struct.isSetPreferedJobSubmissionProtocol()) {
- oprot.writeFieldBegin(PREFERED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC);
- oprot.writeI32(struct.preferedJobSubmissionProtocol.getValue());
- oprot.writeFieldEnd();
- }
- }
- if (struct.sshJobSubmissionInfo != null) {
- if (struct.isSetSshJobSubmissionInfo()) {
- oprot.writeFieldBegin(SSH_JOB_SUBMISSION_INFO_FIELD_DESC);
- struct.sshJobSubmissionInfo.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.globusGRAMHost != null) {
- if (struct.isSetGlobusGRAMHost()) {
- oprot.writeFieldBegin(GLOBUS_GRAMHOST_FIELD_DESC);
- oprot.writeString(struct.globusGRAMHost);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetGlobusGRAMPort()) {
- oprot.writeFieldBegin(GLOBUS_GRAMPORT_FIELD_DESC);
- oprot.writeI32(struct.globusGRAMPort);
- oprot.writeFieldEnd();
- }
- if (struct.unicoreBESEndPoint != null) {
- if (struct.isSetUnicoreBESEndPoint()) {
- oprot.writeFieldBegin(UNICORE_BESEND_POINT_FIELD_DESC);
- oprot.writeString(struct.unicoreBESEndPoint);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class JobSubmissionProtocolsTupleSchemeFactory implements SchemeFactory {
- public JobSubmissionProtocolsTupleScheme getScheme() {
- return new JobSubmissionProtocolsTupleScheme();
- }
- }
-
- private static class JobSubmissionProtocolsTupleScheme extends TupleScheme<JobSubmissionProtocols> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeBool(struct.isEmpty);
- BitSet optionals = new BitSet();
- if (struct.isSetPreferedJobSubmissionProtocol()) {
- optionals.set(0);
- }
- if (struct.isSetSshJobSubmissionInfo()) {
- optionals.set(1);
- }
- if (struct.isSetGlobusGRAMHost()) {
- optionals.set(2);
- }
- if (struct.isSetGlobusGRAMPort()) {
- optionals.set(3);
- }
- if (struct.isSetUnicoreBESEndPoint()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetPreferedJobSubmissionProtocol()) {
- oprot.writeI32(struct.preferedJobSubmissionProtocol.getValue());
- }
- if (struct.isSetSshJobSubmissionInfo()) {
- struct.sshJobSubmissionInfo.write(oprot);
- }
- if (struct.isSetGlobusGRAMHost()) {
- oprot.writeString(struct.globusGRAMHost);
- }
- if (struct.isSetGlobusGRAMPort()) {
- oprot.writeI32(struct.globusGRAMPort);
- }
- if (struct.isSetUnicoreBESEndPoint()) {
- oprot.writeString(struct.unicoreBESEndPoint);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, JobSubmissionProtocols struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.isEmpty = iprot.readBool();
- struct.setIsEmptyIsSet(true);
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.preferedJobSubmissionProtocol = JobSubmissionProtocol.findByValue(iprot.readI32());
- struct.setPreferedJobSubmissionProtocolIsSet(true);
- }
- if (incoming.get(1)) {
- struct.sshJobSubmissionInfo = new SSHJobSubmission();
- struct.sshJobSubmissionInfo.read(iprot);
- struct.setSshJobSubmissionInfoIsSet(true);
- }
- if (incoming.get(2)) {
- struct.globusGRAMHost = iprot.readString();
- struct.setGlobusGRAMHostIsSet(true);
- }
- if (incoming.get(3)) {
- struct.globusGRAMPort = iprot.readI32();
- struct.setGlobusGRAMPortIsSet(true);
- }
- if (incoming.get(4)) {
- struct.unicoreBESEndPoint = iprot.readString();
- struct.setUnicoreBESEndPointIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SCPDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SCPDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SCPDataMovement.java
index 17aa791..2dd2c59 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SCPDataMovement.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SCPDataMovement.java
@@ -51,8 +51,9 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class SCPDataMovement implements org.apache.thrift.TBase<SCPDataMovement, SCPDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<SCPDataMovement> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SCPDataMovement");
- private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField SCP_DATA_MOVEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scpDataMovementID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -60,17 +61,19 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new SCPDataMovementTupleSchemeFactory());
}
+ private String scpDataMovementID; // required
private SecurityProtocol securityProtocol; // required
private int sshPort; // 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 {
+ SCP_DATA_MOVEMENT_ID((short)1, "scpDataMovementID"),
/**
*
* @see SecurityProtocol
*/
- SECURITY_PROTOCOL((short)1, "securityProtocol"),
- SSH_PORT((short)2, "sshPort");
+ SECURITY_PROTOCOL((short)2, "securityProtocol"),
+ SSH_PORT((short)3, "sshPort");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -85,9 +88,11 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // SECURITY_PROTOCOL
+ case 1: // SCP_DATA_MOVEMENT_ID
+ return SCP_DATA_MOVEMENT_ID;
+ case 2: // SECURITY_PROTOCOL
return SECURITY_PROTOCOL;
- case 2: // SSH_PORT
+ case 3: // SSH_PORT
return SSH_PORT;
default:
return null;
@@ -135,6 +140,8 @@ import org.slf4j.LoggerFactory;
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.SCP_DATA_MOVEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("scpDataMovementID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -144,14 +151,18 @@ import org.slf4j.LoggerFactory;
}
public SCPDataMovement() {
+ this.scpDataMovementID = "DO_NOT_SET_AT_CLIENTS";
+
this.sshPort = 22;
}
public SCPDataMovement(
+ String scpDataMovementID,
SecurityProtocol securityProtocol)
{
this();
+ this.scpDataMovementID = scpDataMovementID;
this.securityProtocol = securityProtocol;
}
@@ -160,6 +171,9 @@ import org.slf4j.LoggerFactory;
*/
public SCPDataMovement(SCPDataMovement other) {
__isset_bitfield = other.__isset_bitfield;
+ if (other.isSetScpDataMovementID()) {
+ this.scpDataMovementID = other.scpDataMovementID;
+ }
if (other.isSetSecurityProtocol()) {
this.securityProtocol = other.securityProtocol;
}
@@ -172,11 +186,36 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
+ this.scpDataMovementID = "DO_NOT_SET_AT_CLIENTS";
+
this.securityProtocol = null;
this.sshPort = 22;
}
+ public String getScpDataMovementID() {
+ return this.scpDataMovementID;
+ }
+
+ public void setScpDataMovementID(String scpDataMovementID) {
+ this.scpDataMovementID = scpDataMovementID;
+ }
+
+ public void unsetScpDataMovementID() {
+ this.scpDataMovementID = null;
+ }
+
+ /** Returns true if field scpDataMovementID is set (has been assigned a value) and false otherwise */
+ public boolean isSetScpDataMovementID() {
+ return this.scpDataMovementID != null;
+ }
+
+ public void setScpDataMovementIDIsSet(boolean value) {
+ if (!value) {
+ this.scpDataMovementID = null;
+ }
+ }
+
/**
*
* @see SecurityProtocol
@@ -232,6 +271,14 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case SCP_DATA_MOVEMENT_ID:
+ if (value == null) {
+ unsetScpDataMovementID();
+ } else {
+ setScpDataMovementID((String)value);
+ }
+ break;
+
case SECURITY_PROTOCOL:
if (value == null) {
unsetSecurityProtocol();
@@ -253,6 +300,9 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
+ case SCP_DATA_MOVEMENT_ID:
+ return getScpDataMovementID();
+
case SECURITY_PROTOCOL:
return getSecurityProtocol();
@@ -270,6 +320,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
+ case SCP_DATA_MOVEMENT_ID:
+ return isSetScpDataMovementID();
case SECURITY_PROTOCOL:
return isSetSecurityProtocol();
case SSH_PORT:
@@ -291,6 +343,15 @@ import org.slf4j.LoggerFactory;
if (that == null)
return false;
+ boolean this_present_scpDataMovementID = true && this.isSetScpDataMovementID();
+ boolean that_present_scpDataMovementID = true && that.isSetScpDataMovementID();
+ if (this_present_scpDataMovementID || that_present_scpDataMovementID) {
+ if (!(this_present_scpDataMovementID && that_present_scpDataMovementID))
+ return false;
+ if (!this.scpDataMovementID.equals(that.scpDataMovementID))
+ return false;
+ }
+
boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
if (this_present_securityProtocol || that_present_securityProtocol) {
@@ -325,6 +386,16 @@ import org.slf4j.LoggerFactory;
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetScpDataMovementID()).compareTo(other.isSetScpDataMovementID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetScpDataMovementID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scpDataMovementID, other.scpDataMovementID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
if (lastComparison != 0) {
return lastComparison;
@@ -365,6 +436,14 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("SCPDataMovement(");
boolean first = true;
+ sb.append("scpDataMovementID:");
+ if (this.scpDataMovementID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.scpDataMovementID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("securityProtocol:");
if (this.securityProtocol == null) {
sb.append("null");
@@ -384,6 +463,10 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (!isSetScpDataMovementID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'scpDataMovementID' is unset! Struct:" + toString());
+ }
+
if (!isSetSecurityProtocol()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
}
@@ -427,7 +510,15 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case 1: // SECURITY_PROTOCOL
+ case 1: // SCP_DATA_MOVEMENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.scpDataMovementID = iprot.readString();
+ struct.setScpDataMovementIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECURITY_PROTOCOL
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
struct.setSecurityProtocolIsSet(true);
@@ -435,7 +526,7 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // SSH_PORT
+ case 3: // SSH_PORT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.sshPort = iprot.readI32();
struct.setSshPortIsSet(true);
@@ -456,6 +547,11 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.scpDataMovementID != null) {
+ oprot.writeFieldBegin(SCP_DATA_MOVEMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.scpDataMovementID);
+ oprot.writeFieldEnd();
+ }
if (struct.securityProtocol != null) {
oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
oprot.writeI32(struct.securityProtocol.getValue());
@@ -483,6 +579,7 @@ import org.slf4j.LoggerFactory;
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SCPDataMovement struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.scpDataMovementID);
oprot.writeI32(struct.securityProtocol.getValue());
BitSet optionals = new BitSet();
if (struct.isSetSshPort()) {
@@ -497,6 +594,8 @@ import org.slf4j.LoggerFactory;
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SCPDataMovement struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.scpDataMovementID = iprot.readString();
+ struct.setScpDataMovementIDIsSet(true);
struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
struct.setSecurityProtocolIsSet(true);
BitSet incoming = iprot.readBitSet(1);
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SSHJobSubmission.java
index 01658bb..20099e2 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SSHJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/SSHJobSubmission.java
@@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory;
@SuppressWarnings("all") public class SSHJobSubmission implements org.apache.thrift.TBase<SSHJobSubmission, SSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<SSHJobSubmission> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHJobSubmission");
+ private static final org.apache.thrift.protocol.TField SSH_JOB_SUBMISSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sshJobSubmissionID", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)3);
@@ -60,11 +61,13 @@ import org.slf4j.LoggerFactory;
schemes.put(TupleScheme.class, new SSHJobSubmissionTupleSchemeFactory());
}
+ private String sshJobSubmissionID; // required
private ResourceJobManager resourceJobManager; // required
private int sshPort; // 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 {
+ SSH_JOB_SUBMISSION_ID((short)1, "sshJobSubmissionID"),
/**
*
* @see ResourceJobManager
@@ -85,6 +88,8 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // SSH_JOB_SUBMISSION_ID
+ return SSH_JOB_SUBMISSION_ID;
case 2: // RESOURCE_JOB_MANAGER
return RESOURCE_JOB_MANAGER;
case 3: // SSH_PORT
@@ -135,6 +140,8 @@ import org.slf4j.LoggerFactory;
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.SSH_JOB_SUBMISSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sshJobSubmissionID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -144,14 +151,18 @@ import org.slf4j.LoggerFactory;
}
public SSHJobSubmission() {
+ this.sshJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
+
this.sshPort = 22;
}
public SSHJobSubmission(
+ String sshJobSubmissionID,
ResourceJobManager resourceJobManager)
{
this();
+ this.sshJobSubmissionID = sshJobSubmissionID;
this.resourceJobManager = resourceJobManager;
}
@@ -160,6 +171,9 @@ import org.slf4j.LoggerFactory;
*/
public SSHJobSubmission(SSHJobSubmission other) {
__isset_bitfield = other.__isset_bitfield;
+ if (other.isSetSshJobSubmissionID()) {
+ this.sshJobSubmissionID = other.sshJobSubmissionID;
+ }
if (other.isSetResourceJobManager()) {
this.resourceJobManager = other.resourceJobManager;
}
@@ -172,11 +186,36 @@ import org.slf4j.LoggerFactory;
@Override
public void clear() {
+ this.sshJobSubmissionID = "DO_NOT_SET_AT_CLIENTS";
+
this.resourceJobManager = null;
this.sshPort = 22;
}
+ public String getSshJobSubmissionID() {
+ return this.sshJobSubmissionID;
+ }
+
+ public void setSshJobSubmissionID(String sshJobSubmissionID) {
+ this.sshJobSubmissionID = sshJobSubmissionID;
+ }
+
+ public void unsetSshJobSubmissionID() {
+ this.sshJobSubmissionID = null;
+ }
+
+ /** Returns true if field sshJobSubmissionID is set (has been assigned a value) and false otherwise */
+ public boolean isSetSshJobSubmissionID() {
+ return this.sshJobSubmissionID != null;
+ }
+
+ public void setSshJobSubmissionIDIsSet(boolean value) {
+ if (!value) {
+ this.sshJobSubmissionID = null;
+ }
+ }
+
/**
*
* @see ResourceJobManager
@@ -232,6 +271,14 @@ import org.slf4j.LoggerFactory;
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case SSH_JOB_SUBMISSION_ID:
+ if (value == null) {
+ unsetSshJobSubmissionID();
+ } else {
+ setSshJobSubmissionID((String)value);
+ }
+ break;
+
case RESOURCE_JOB_MANAGER:
if (value == null) {
unsetResourceJobManager();
@@ -253,6 +300,9 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
+ case SSH_JOB_SUBMISSION_ID:
+ return getSshJobSubmissionID();
+
case RESOURCE_JOB_MANAGER:
return getResourceJobManager();
@@ -270,6 +320,8 @@ import org.slf4j.LoggerFactory;
}
switch (field) {
+ case SSH_JOB_SUBMISSION_ID:
+ return isSetSshJobSubmissionID();
case RESOURCE_JOB_MANAGER:
return isSetResourceJobManager();
case SSH_PORT:
@@ -291,6 +343,15 @@ import org.slf4j.LoggerFactory;
if (that == null)
return false;
+ boolean this_present_sshJobSubmissionID = true && this.isSetSshJobSubmissionID();
+ boolean that_present_sshJobSubmissionID = true && that.isSetSshJobSubmissionID();
+ if (this_present_sshJobSubmissionID || that_present_sshJobSubmissionID) {
+ if (!(this_present_sshJobSubmissionID && that_present_sshJobSubmissionID))
+ return false;
+ if (!this.sshJobSubmissionID.equals(that.sshJobSubmissionID))
+ return false;
+ }
+
boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
if (this_present_resourceJobManager || that_present_resourceJobManager) {
@@ -325,6 +386,16 @@ import org.slf4j.LoggerFactory;
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetSshJobSubmissionID()).compareTo(other.isSetSshJobSubmissionID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSshJobSubmissionID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshJobSubmissionID, other.sshJobSubmissionID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
if (lastComparison != 0) {
return lastComparison;
@@ -365,6 +436,14 @@ import org.slf4j.LoggerFactory;
StringBuilder sb = new StringBuilder("SSHJobSubmission(");
boolean first = true;
+ sb.append("sshJobSubmissionID:");
+ if (this.sshJobSubmissionID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sshJobSubmissionID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("resourceJobManager:");
if (this.resourceJobManager == null) {
sb.append("null");
@@ -384,6 +463,10 @@ import org.slf4j.LoggerFactory;
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (!isSetSshJobSubmissionID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'sshJobSubmissionID' is unset! Struct:" + toString());
+ }
+
if (!isSetResourceJobManager()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
}
@@ -427,6 +510,14 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
+ case 1: // SSH_JOB_SUBMISSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sshJobSubmissionID = iprot.readString();
+ struct.setSshJobSubmissionIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
case 2: // RESOURCE_JOB_MANAGER
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
@@ -456,6 +547,11 @@ import org.slf4j.LoggerFactory;
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sshJobSubmissionID != null) {
+ oprot.writeFieldBegin(SSH_JOB_SUBMISSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sshJobSubmissionID);
+ oprot.writeFieldEnd();
+ }
if (struct.resourceJobManager != null) {
oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
oprot.writeI32(struct.resourceJobManager.getValue());
@@ -483,6 +579,7 @@ import org.slf4j.LoggerFactory;
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.sshJobSubmissionID);
oprot.writeI32(struct.resourceJobManager.getValue());
BitSet optionals = new BitSet();
if (struct.isSetSshPort()) {
@@ -497,6 +594,8 @@ import org.slf4j.LoggerFactory;
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.sshJobSubmissionID = iprot.readString();
+ struct.setSshJobSubmissionIDIsSet(true);
struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
struct.setResourceJobManagerIsSet(true);
BitSet incoming = iprot.readBitSet(1);
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDeployment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDeployment.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDeployment.java
deleted file mode 100644
index 1cd4572..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDeployment.java
+++ /dev/null
@@ -1,600 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class ApplicationDeployment implements org.apache.thrift.TBase<ApplicationDeployment, ApplicationDeployment._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationDeployment> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationDeployment");
-
- private static final org.apache.thrift.protocol.TField DEPLOYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("deploymentId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceDescription", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift.protocol.TField APPLICATION_DESCRIPTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationDescriptor", org.apache.thrift.protocol.TType.STRUCT, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ApplicationDeploymentStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ApplicationDeploymentTupleSchemeFactory());
- }
-
- private String deploymentId; // required
- private ComputeResourceDescription computeResourceDescription; // required
- private ApplicationDescriptor applicationDescriptor; // required
-
- /** 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 {
- DEPLOYMENT_ID((short)1, "deploymentId"),
- COMPUTE_RESOURCE_DESCRIPTION((short)2, "computeResourceDescription"),
- APPLICATION_DESCRIPTOR((short)3, "applicationDescriptor");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // DEPLOYMENT_ID
- return DEPLOYMENT_ID;
- case 2: // COMPUTE_RESOURCE_DESCRIPTION
- return COMPUTE_RESOURCE_DESCRIPTION;
- case 3: // APPLICATION_DESCRIPTOR
- return APPLICATION_DESCRIPTOR;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.DEPLOYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("deploymentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.COMPUTE_RESOURCE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("computeResourceDescription", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputeResourceDescription.class)));
- tmpMap.put(_Fields.APPLICATION_DESCRIPTOR, new org.apache.thrift.meta_data.FieldMetaData("applicationDescriptor", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ApplicationDescriptor.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationDeployment.class, metaDataMap);
- }
-
- public ApplicationDeployment() {
- this.deploymentId = "DO_NOT_SET_AT_CLIENTS";
-
- }
-
- public ApplicationDeployment(
- String deploymentId,
- ComputeResourceDescription computeResourceDescription,
- ApplicationDescriptor applicationDescriptor)
- {
- this();
- this.deploymentId = deploymentId;
- this.computeResourceDescription = computeResourceDescription;
- this.applicationDescriptor = applicationDescriptor;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ApplicationDeployment(ApplicationDeployment other) {
- if (other.isSetDeploymentId()) {
- this.deploymentId = other.deploymentId;
- }
- if (other.isSetComputeResourceDescription()) {
- this.computeResourceDescription = new ComputeResourceDescription(other.computeResourceDescription);
- }
- if (other.isSetApplicationDescriptor()) {
- this.applicationDescriptor = new ApplicationDescriptor(other.applicationDescriptor);
- }
- }
-
- public ApplicationDeployment deepCopy() {
- return new ApplicationDeployment(this);
- }
-
- @Override
- public void clear() {
- this.deploymentId = "DO_NOT_SET_AT_CLIENTS";
-
- this.computeResourceDescription = null;
- this.applicationDescriptor = null;
- }
-
- public String getDeploymentId() {
- return this.deploymentId;
- }
-
- public void setDeploymentId(String deploymentId) {
- this.deploymentId = deploymentId;
- }
-
- public void unsetDeploymentId() {
- this.deploymentId = null;
- }
-
- /** Returns true if field deploymentId is set (has been assigned a value) and false otherwise */
- public boolean isSetDeploymentId() {
- return this.deploymentId != null;
- }
-
- public void setDeploymentIdIsSet(boolean value) {
- if (!value) {
- this.deploymentId = null;
- }
- }
-
- public ComputeResourceDescription getComputeResourceDescription() {
- return this.computeResourceDescription;
- }
-
- public void setComputeResourceDescription(ComputeResourceDescription computeResourceDescription) {
- this.computeResourceDescription = computeResourceDescription;
- }
-
- public void unsetComputeResourceDescription() {
- this.computeResourceDescription = null;
- }
-
- /** Returns true if field computeResourceDescription is set (has been assigned a value) and false otherwise */
- public boolean isSetComputeResourceDescription() {
- return this.computeResourceDescription != null;
- }
-
- public void setComputeResourceDescriptionIsSet(boolean value) {
- if (!value) {
- this.computeResourceDescription = null;
- }
- }
-
- public ApplicationDescriptor getApplicationDescriptor() {
- return this.applicationDescriptor;
- }
-
- public void setApplicationDescriptor(ApplicationDescriptor applicationDescriptor) {
- this.applicationDescriptor = applicationDescriptor;
- }
-
- public void unsetApplicationDescriptor() {
- this.applicationDescriptor = null;
- }
-
- /** Returns true if field applicationDescriptor is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationDescriptor() {
- return this.applicationDescriptor != null;
- }
-
- public void setApplicationDescriptorIsSet(boolean value) {
- if (!value) {
- this.applicationDescriptor = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case DEPLOYMENT_ID:
- if (value == null) {
- unsetDeploymentId();
- } else {
- setDeploymentId((String)value);
- }
- break;
-
- case COMPUTE_RESOURCE_DESCRIPTION:
- if (value == null) {
- unsetComputeResourceDescription();
- } else {
- setComputeResourceDescription((ComputeResourceDescription)value);
- }
- break;
-
- case APPLICATION_DESCRIPTOR:
- if (value == null) {
- unsetApplicationDescriptor();
- } else {
- setApplicationDescriptor((ApplicationDescriptor)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case DEPLOYMENT_ID:
- return getDeploymentId();
-
- case COMPUTE_RESOURCE_DESCRIPTION:
- return getComputeResourceDescription();
-
- case APPLICATION_DESCRIPTOR:
- return getApplicationDescriptor();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case DEPLOYMENT_ID:
- return isSetDeploymentId();
- case COMPUTE_RESOURCE_DESCRIPTION:
- return isSetComputeResourceDescription();
- case APPLICATION_DESCRIPTOR:
- return isSetApplicationDescriptor();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ApplicationDeployment)
- return this.equals((ApplicationDeployment)that);
- return false;
- }
-
- public boolean equals(ApplicationDeployment that) {
- if (that == null)
- return false;
-
- boolean this_present_deploymentId = true && this.isSetDeploymentId();
- boolean that_present_deploymentId = true && that.isSetDeploymentId();
- if (this_present_deploymentId || that_present_deploymentId) {
- if (!(this_present_deploymentId && that_present_deploymentId))
- return false;
- if (!this.deploymentId.equals(that.deploymentId))
- return false;
- }
-
- boolean this_present_computeResourceDescription = true && this.isSetComputeResourceDescription();
- boolean that_present_computeResourceDescription = true && that.isSetComputeResourceDescription();
- if (this_present_computeResourceDescription || that_present_computeResourceDescription) {
- if (!(this_present_computeResourceDescription && that_present_computeResourceDescription))
- return false;
- if (!this.computeResourceDescription.equals(that.computeResourceDescription))
- return false;
- }
-
- boolean this_present_applicationDescriptor = true && this.isSetApplicationDescriptor();
- boolean that_present_applicationDescriptor = true && that.isSetApplicationDescriptor();
- if (this_present_applicationDescriptor || that_present_applicationDescriptor) {
- if (!(this_present_applicationDescriptor && that_present_applicationDescriptor))
- return false;
- if (!this.applicationDescriptor.equals(that.applicationDescriptor))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ApplicationDeployment other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetDeploymentId()).compareTo(other.isSetDeploymentId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDeploymentId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deploymentId, other.deploymentId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetComputeResourceDescription()).compareTo(other.isSetComputeResourceDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetComputeResourceDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceDescription, other.computeResourceDescription);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetApplicationDescriptor()).compareTo(other.isSetApplicationDescriptor());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationDescriptor()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationDescriptor, other.applicationDescriptor);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ApplicationDeployment(");
- boolean first = true;
-
- sb.append("deploymentId:");
- if (this.deploymentId == null) {
- sb.append("null");
- } else {
- sb.append(this.deploymentId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("computeResourceDescription:");
- if (this.computeResourceDescription == null) {
- sb.append("null");
- } else {
- sb.append(this.computeResourceDescription);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("applicationDescriptor:");
- if (this.applicationDescriptor == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationDescriptor);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetDeploymentId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'deploymentId' is unset! Struct:" + toString());
- }
-
- if (!isSetComputeResourceDescription()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'computeResourceDescription' is unset! Struct:" + toString());
- }
-
- if (!isSetApplicationDescriptor()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'applicationDescriptor' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- if (computeResourceDescription != null) {
- computeResourceDescription.validate();
- }
- if (applicationDescriptor != null) {
- applicationDescriptor.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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);
- }
- }
-
- private static class ApplicationDeploymentStandardSchemeFactory implements SchemeFactory {
- public ApplicationDeploymentStandardScheme getScheme() {
- return new ApplicationDeploymentStandardScheme();
- }
- }
-
- private static class ApplicationDeploymentStandardScheme extends StandardScheme<ApplicationDeployment> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ApplicationDeployment struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // DEPLOYMENT_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.deploymentId = iprot.readString();
- struct.setDeploymentIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // COMPUTE_RESOURCE_DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.computeResourceDescription = new ComputeResourceDescription();
- struct.computeResourceDescription.read(iprot);
- struct.setComputeResourceDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // APPLICATION_DESCRIPTOR
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.applicationDescriptor = new ApplicationDescriptor();
- struct.applicationDescriptor.read(iprot);
- struct.setApplicationDescriptorIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ApplicationDeployment struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.deploymentId != null) {
- oprot.writeFieldBegin(DEPLOYMENT_ID_FIELD_DESC);
- oprot.writeString(struct.deploymentId);
- oprot.writeFieldEnd();
- }
- if (struct.computeResourceDescription != null) {
- oprot.writeFieldBegin(COMPUTE_RESOURCE_DESCRIPTION_FIELD_DESC);
- struct.computeResourceDescription.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.applicationDescriptor != null) {
- oprot.writeFieldBegin(APPLICATION_DESCRIPTOR_FIELD_DESC);
- struct.applicationDescriptor.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ApplicationDeploymentTupleSchemeFactory implements SchemeFactory {
- public ApplicationDeploymentTupleScheme getScheme() {
- return new ApplicationDeploymentTupleScheme();
- }
- }
-
- private static class ApplicationDeploymentTupleScheme extends TupleScheme<ApplicationDeployment> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ApplicationDeployment struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.deploymentId);
- struct.computeResourceDescription.write(oprot);
- struct.applicationDescriptor.write(oprot);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ApplicationDeployment struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.deploymentId = iprot.readString();
- struct.setDeploymentIdIsSet(true);
- struct.computeResourceDescription = new ComputeResourceDescription();
- struct.computeResourceDescription.read(iprot);
- struct.setComputeResourceDescriptionIsSet(true);
- struct.applicationDescriptor = new ApplicationDescriptor();
- struct.applicationDescriptor.read(iprot);
- struct.setApplicationDescriptorIsSet(true);
- }
- }
-
-}
-
[4/7] adding id to all the job submission protocols and data movement
protocols - AIRAVATA-1203
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/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
deleted file mode 100644
index 000585a..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
+++ /dev/null
@@ -1,1537 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Computational Resource Description
- *
- * resourceId:
- *
- * hostName:
- * Fully Qualified Host Name.
- *
- * ipAddress:
- * IP Addresse of the Hostname.
- *
- * resourceDescription:
- * A user friendly description of the hostname.
- *
- * JobSubmissionProtocols:
- * A computational resources may have one or more ways of submitting Jobs. This structure
- * will hold all available mechanisms to interact with the resource.
- *
- * DataMovementProtocol:
- * Option to specify a prefered data movement mechanism of the available options.
- *
- */
-@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 RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceId", 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 SCRATCH_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("scratchLocation", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredJobSubmissionProtocol", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_PROTOCOLS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionProtocols", org.apache.thrift.protocol.TType.MAP, (short)9);
- private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_PROTOCOLS_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementProtocols", org.apache.thrift.protocol.TType.MAP, (short)10);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ComputeResourceDescriptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ComputeResourceDescriptionTupleSchemeFactory());
- }
-
- private boolean isEmpty; // required
- private String resourceId; // required
- private String hostName; // required
- private Set<String> hostAliases; // optional
- private Set<String> ipAddresses; // optional
- private String resourceDescription; // optional
- private String scratchLocation; // optional
- private String preferredJobSubmissionProtocol; // optional
- private Map<String,JobSubmissionProtocol> jobSubmissionProtocols; // required
- private Map<String,DataMovementProtocol> dataMovementProtocols; // required
-
- /** 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"),
- RESOURCE_ID((short)2, "resourceId"),
- HOST_NAME((short)3, "hostName"),
- HOST_ALIASES((short)4, "hostAliases"),
- IP_ADDRESSES((short)5, "ipAddresses"),
- RESOURCE_DESCRIPTION((short)6, "resourceDescription"),
- SCRATCH_LOCATION((short)7, "scratchLocation"),
- PREFERRED_JOB_SUBMISSION_PROTOCOL((short)8, "preferredJobSubmissionProtocol"),
- JOB_SUBMISSION_PROTOCOLS((short)9, "jobSubmissionProtocols"),
- DATA_MOVEMENT_PROTOCOLS((short)10, "dataMovementProtocols");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IS_EMPTY
- return IS_EMPTY;
- case 2: // RESOURCE_ID
- return RESOURCE_ID;
- case 3: // HOST_NAME
- return HOST_NAME;
- case 4: // HOST_ALIASES
- return HOST_ALIASES;
- case 5: // IP_ADDRESSES
- return IP_ADDRESSES;
- case 6: // RESOURCE_DESCRIPTION
- return RESOURCE_DESCRIPTION;
- case 7: // SCRATCH_LOCATION
- return SCRATCH_LOCATION;
- case 8: // PREFERRED_JOB_SUBMISSION_PROTOCOL
- return PREFERRED_JOB_SUBMISSION_PROTOCOL;
- case 9: // JOB_SUBMISSION_PROTOCOLS
- return JOB_SUBMISSION_PROTOCOLS;
- case 10: // DATA_MOVEMENT_PROTOCOLS
- return DATA_MOVEMENT_PROTOCOLS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // 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.SCRATCH_LOCATION,_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL};
- 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.RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceId", 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.HOST_ALIASES, new org.apache.thrift.meta_data.FieldMetaData("hostAliases", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.IP_ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("ipAddresses", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.RESOURCE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("resourceDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SCRATCH_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("scratchLocation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferredJobSubmissionProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.JOB_SUBMISSION_PROTOCOLS, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionProtocols", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobSubmissionProtocol.class))));
- tmpMap.put(_Fields.DATA_MOVEMENT_PROTOCOLS, new org.apache.thrift.meta_data.FieldMetaData("dataMovementProtocols", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataMovementProtocol.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourceDescription.class, metaDataMap);
- }
-
- public ComputeResourceDescription() {
- this.isEmpty = false;
-
- this.resourceId = "DO_NOT_SET_AT_CLIENTS";
-
- }
-
- public ComputeResourceDescription(
- boolean isEmpty,
- String resourceId,
- String hostName,
- Map<String,JobSubmissionProtocol> jobSubmissionProtocols,
- Map<String,DataMovementProtocol> dataMovementProtocols)
- {
- this();
- this.isEmpty = isEmpty;
- setIsEmptyIsSet(true);
- this.resourceId = resourceId;
- this.hostName = hostName;
- this.jobSubmissionProtocols = jobSubmissionProtocols;
- this.dataMovementProtocols = dataMovementProtocols;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ComputeResourceDescription(ComputeResourceDescription other) {
- __isset_bitfield = other.__isset_bitfield;
- this.isEmpty = other.isEmpty;
- if (other.isSetResourceId()) {
- this.resourceId = other.resourceId;
- }
- if (other.isSetHostName()) {
- this.hostName = other.hostName;
- }
- if (other.isSetHostAliases()) {
- Set<String> __this__hostAliases = new HashSet<String>(other.hostAliases);
- this.hostAliases = __this__hostAliases;
- }
- if (other.isSetIpAddresses()) {
- Set<String> __this__ipAddresses = new HashSet<String>(other.ipAddresses);
- this.ipAddresses = __this__ipAddresses;
- }
- if (other.isSetResourceDescription()) {
- this.resourceDescription = other.resourceDescription;
- }
- if (other.isSetScratchLocation()) {
- this.scratchLocation = other.scratchLocation;
- }
- if (other.isSetPreferredJobSubmissionProtocol()) {
- this.preferredJobSubmissionProtocol = other.preferredJobSubmissionProtocol;
- }
- if (other.isSetJobSubmissionProtocols()) {
- Map<String,JobSubmissionProtocol> __this__jobSubmissionProtocols = new HashMap<String,JobSubmissionProtocol>(other.jobSubmissionProtocols.size());
- for (Map.Entry<String, JobSubmissionProtocol> other_element : other.jobSubmissionProtocols.entrySet()) {
-
- String other_element_key = other_element.getKey();
- JobSubmissionProtocol other_element_value = other_element.getValue();
-
- String __this__jobSubmissionProtocols_copy_key = other_element_key;
-
- JobSubmissionProtocol __this__jobSubmissionProtocols_copy_value = other_element_value;
-
- __this__jobSubmissionProtocols.put(__this__jobSubmissionProtocols_copy_key, __this__jobSubmissionProtocols_copy_value);
- }
- this.jobSubmissionProtocols = __this__jobSubmissionProtocols;
- }
- if (other.isSetDataMovementProtocols()) {
- Map<String,DataMovementProtocol> __this__dataMovementProtocols = new HashMap<String,DataMovementProtocol>(other.dataMovementProtocols.size());
- for (Map.Entry<String, DataMovementProtocol> other_element : other.dataMovementProtocols.entrySet()) {
-
- String other_element_key = other_element.getKey();
- DataMovementProtocol other_element_value = other_element.getValue();
-
- String __this__dataMovementProtocols_copy_key = other_element_key;
-
- DataMovementProtocol __this__dataMovementProtocols_copy_value = other_element_value;
-
- __this__dataMovementProtocols.put(__this__dataMovementProtocols_copy_key, __this__dataMovementProtocols_copy_value);
- }
- this.dataMovementProtocols = __this__dataMovementProtocols;
- }
- }
-
- public ComputeResourceDescription deepCopy() {
- return new ComputeResourceDescription(this);
- }
-
- @Override
- public void clear() {
- this.isEmpty = false;
-
- this.resourceId = "DO_NOT_SET_AT_CLIENTS";
-
- this.hostName = null;
- this.hostAliases = null;
- this.ipAddresses = null;
- this.resourceDescription = null;
- this.scratchLocation = null;
- this.preferredJobSubmissionProtocol = null;
- this.jobSubmissionProtocols = null;
- this.dataMovementProtocols = 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 getResourceId() {
- return this.resourceId;
- }
-
- public void setResourceId(String resourceId) {
- this.resourceId = resourceId;
- }
-
- public void unsetResourceId() {
- this.resourceId = null;
- }
-
- /** Returns true if field resourceId is set (has been assigned a value) and false otherwise */
- public boolean isSetResourceId() {
- return this.resourceId != null;
- }
-
- public void setResourceIdIsSet(boolean value) {
- if (!value) {
- this.resourceId = null;
- }
- }
-
- public String getHostName() {
- return this.hostName;
- }
-
- public void setHostName(String hostName) {
- this.hostName = hostName;
- }
-
- public void unsetHostName() {
- this.hostName = null;
- }
-
- /** Returns true if field hostName is set (has been assigned a value) and false otherwise */
- public boolean isSetHostName() {
- return this.hostName != null;
- }
-
- public void setHostNameIsSet(boolean value) {
- if (!value) {
- this.hostName = null;
- }
- }
-
- public int getHostAliasesSize() {
- return (this.hostAliases == null) ? 0 : this.hostAliases.size();
- }
-
- public java.util.Iterator<String> getHostAliasesIterator() {
- return (this.hostAliases == null) ? null : this.hostAliases.iterator();
- }
-
- public void addToHostAliases(String elem) {
- if (this.hostAliases == null) {
- this.hostAliases = new HashSet<String>();
- }
- this.hostAliases.add(elem);
- }
-
- public Set<String> getHostAliases() {
- return this.hostAliases;
- }
-
- public void setHostAliases(Set<String> hostAliases) {
- this.hostAliases = hostAliases;
- }
-
- public void unsetHostAliases() {
- this.hostAliases = null;
- }
-
- /** Returns true if field hostAliases is set (has been assigned a value) and false otherwise */
- public boolean isSetHostAliases() {
- return this.hostAliases != null;
- }
-
- public void setHostAliasesIsSet(boolean value) {
- if (!value) {
- this.hostAliases = null;
- }
- }
-
- public int getIpAddressesSize() {
- return (this.ipAddresses == null) ? 0 : this.ipAddresses.size();
- }
-
- public java.util.Iterator<String> getIpAddressesIterator() {
- return (this.ipAddresses == null) ? null : this.ipAddresses.iterator();
- }
-
- public void addToIpAddresses(String elem) {
- if (this.ipAddresses == null) {
- this.ipAddresses = new HashSet<String>();
- }
- this.ipAddresses.add(elem);
- }
-
- public Set<String> getIpAddresses() {
- return this.ipAddresses;
- }
-
- public void setIpAddresses(Set<String> ipAddresses) {
- this.ipAddresses = ipAddresses;
- }
-
- public void unsetIpAddresses() {
- this.ipAddresses = null;
- }
-
- /** Returns true if field ipAddresses is set (has been assigned a value) and false otherwise */
- public boolean isSetIpAddresses() {
- return this.ipAddresses != null;
- }
-
- public void setIpAddressesIsSet(boolean value) {
- if (!value) {
- this.ipAddresses = null;
- }
- }
-
- public String getResourceDescription() {
- return this.resourceDescription;
- }
-
- public void setResourceDescription(String resourceDescription) {
- this.resourceDescription = resourceDescription;
- }
-
- public void unsetResourceDescription() {
- this.resourceDescription = null;
- }
-
- /** Returns true if field resourceDescription is set (has been assigned a value) and false otherwise */
- public boolean isSetResourceDescription() {
- return this.resourceDescription != null;
- }
-
- public void setResourceDescriptionIsSet(boolean value) {
- if (!value) {
- this.resourceDescription = null;
- }
- }
-
- public String getScratchLocation() {
- return this.scratchLocation;
- }
-
- public void setScratchLocation(String scratchLocation) {
- this.scratchLocation = scratchLocation;
- }
-
- public void unsetScratchLocation() {
- this.scratchLocation = null;
- }
-
- /** Returns true if field scratchLocation is set (has been assigned a value) and false otherwise */
- public boolean isSetScratchLocation() {
- return this.scratchLocation != null;
- }
-
- public void setScratchLocationIsSet(boolean value) {
- if (!value) {
- this.scratchLocation = null;
- }
- }
-
- public String getPreferredJobSubmissionProtocol() {
- return this.preferredJobSubmissionProtocol;
- }
-
- public void setPreferredJobSubmissionProtocol(String preferredJobSubmissionProtocol) {
- this.preferredJobSubmissionProtocol = preferredJobSubmissionProtocol;
- }
-
- public void unsetPreferredJobSubmissionProtocol() {
- this.preferredJobSubmissionProtocol = null;
- }
-
- /** Returns true if field preferredJobSubmissionProtocol is set (has been assigned a value) and false otherwise */
- public boolean isSetPreferredJobSubmissionProtocol() {
- return this.preferredJobSubmissionProtocol != null;
- }
-
- public void setPreferredJobSubmissionProtocolIsSet(boolean value) {
- if (!value) {
- this.preferredJobSubmissionProtocol = null;
- }
- }
-
- public int getJobSubmissionProtocolsSize() {
- return (this.jobSubmissionProtocols == null) ? 0 : this.jobSubmissionProtocols.size();
- }
-
- public void putToJobSubmissionProtocols(String key, JobSubmissionProtocol val) {
- if (this.jobSubmissionProtocols == null) {
- this.jobSubmissionProtocols = new HashMap<String,JobSubmissionProtocol>();
- }
- this.jobSubmissionProtocols.put(key, val);
- }
-
- public Map<String,JobSubmissionProtocol> getJobSubmissionProtocols() {
- return this.jobSubmissionProtocols;
- }
-
- public void setJobSubmissionProtocols(Map<String,JobSubmissionProtocol> jobSubmissionProtocols) {
- this.jobSubmissionProtocols = jobSubmissionProtocols;
- }
-
- public void unsetJobSubmissionProtocols() {
- this.jobSubmissionProtocols = null;
- }
-
- /** Returns true if field jobSubmissionProtocols is set (has been assigned a value) and false otherwise */
- public boolean isSetJobSubmissionProtocols() {
- return this.jobSubmissionProtocols != null;
- }
-
- public void setJobSubmissionProtocolsIsSet(boolean value) {
- if (!value) {
- this.jobSubmissionProtocols = null;
- }
- }
-
- public int getDataMovementProtocolsSize() {
- return (this.dataMovementProtocols == null) ? 0 : this.dataMovementProtocols.size();
- }
-
- public void putToDataMovementProtocols(String key, DataMovementProtocol val) {
- if (this.dataMovementProtocols == null) {
- this.dataMovementProtocols = new HashMap<String,DataMovementProtocol>();
- }
- this.dataMovementProtocols.put(key, val);
- }
-
- public Map<String,DataMovementProtocol> getDataMovementProtocols() {
- return this.dataMovementProtocols;
- }
-
- public void setDataMovementProtocols(Map<String,DataMovementProtocol> dataMovementProtocols) {
- this.dataMovementProtocols = dataMovementProtocols;
- }
-
- public void unsetDataMovementProtocols() {
- this.dataMovementProtocols = null;
- }
-
- /** Returns true if field dataMovementProtocols is set (has been assigned a value) and false otherwise */
- public boolean isSetDataMovementProtocols() {
- return this.dataMovementProtocols != null;
- }
-
- public void setDataMovementProtocolsIsSet(boolean value) {
- if (!value) {
- this.dataMovementProtocols = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IS_EMPTY:
- if (value == null) {
- unsetIsEmpty();
- } else {
- setIsEmpty((Boolean)value);
- }
- break;
-
- case RESOURCE_ID:
- if (value == null) {
- unsetResourceId();
- } else {
- setResourceId((String)value);
- }
- break;
-
- case HOST_NAME:
- if (value == null) {
- unsetHostName();
- } else {
- setHostName((String)value);
- }
- break;
-
- case HOST_ALIASES:
- if (value == null) {
- unsetHostAliases();
- } else {
- setHostAliases((Set<String>)value);
- }
- break;
-
- case IP_ADDRESSES:
- if (value == null) {
- unsetIpAddresses();
- } else {
- setIpAddresses((Set<String>)value);
- }
- break;
-
- case RESOURCE_DESCRIPTION:
- if (value == null) {
- unsetResourceDescription();
- } else {
- setResourceDescription((String)value);
- }
- break;
-
- case SCRATCH_LOCATION:
- if (value == null) {
- unsetScratchLocation();
- } else {
- setScratchLocation((String)value);
- }
- break;
-
- case PREFERRED_JOB_SUBMISSION_PROTOCOL:
- if (value == null) {
- unsetPreferredJobSubmissionProtocol();
- } else {
- setPreferredJobSubmissionProtocol((String)value);
- }
- break;
-
- case JOB_SUBMISSION_PROTOCOLS:
- if (value == null) {
- unsetJobSubmissionProtocols();
- } else {
- setJobSubmissionProtocols((Map<String,JobSubmissionProtocol>)value);
- }
- break;
-
- case DATA_MOVEMENT_PROTOCOLS:
- if (value == null) {
- unsetDataMovementProtocols();
- } else {
- setDataMovementProtocols((Map<String,DataMovementProtocol>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IS_EMPTY:
- return Boolean.valueOf(isIsEmpty());
-
- case RESOURCE_ID:
- return getResourceId();
-
- case HOST_NAME:
- return getHostName();
-
- case HOST_ALIASES:
- return getHostAliases();
-
- case IP_ADDRESSES:
- return getIpAddresses();
-
- case RESOURCE_DESCRIPTION:
- return getResourceDescription();
-
- case SCRATCH_LOCATION:
- return getScratchLocation();
-
- case PREFERRED_JOB_SUBMISSION_PROTOCOL:
- return getPreferredJobSubmissionProtocol();
-
- case JOB_SUBMISSION_PROTOCOLS:
- return getJobSubmissionProtocols();
-
- case DATA_MOVEMENT_PROTOCOLS:
- return getDataMovementProtocols();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IS_EMPTY:
- return isSetIsEmpty();
- case RESOURCE_ID:
- return isSetResourceId();
- case HOST_NAME:
- return isSetHostName();
- case HOST_ALIASES:
- return isSetHostAliases();
- case IP_ADDRESSES:
- return isSetIpAddresses();
- case RESOURCE_DESCRIPTION:
- return isSetResourceDescription();
- case SCRATCH_LOCATION:
- return isSetScratchLocation();
- case PREFERRED_JOB_SUBMISSION_PROTOCOL:
- return isSetPreferredJobSubmissionProtocol();
- case JOB_SUBMISSION_PROTOCOLS:
- return isSetJobSubmissionProtocols();
- case DATA_MOVEMENT_PROTOCOLS:
- return isSetDataMovementProtocols();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ComputeResourceDescription)
- return this.equals((ComputeResourceDescription)that);
- return false;
- }
-
- public boolean equals(ComputeResourceDescription that) {
- 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_resourceId = true && this.isSetResourceId();
- boolean that_present_resourceId = true && that.isSetResourceId();
- if (this_present_resourceId || that_present_resourceId) {
- if (!(this_present_resourceId && that_present_resourceId))
- return false;
- if (!this.resourceId.equals(that.resourceId))
- return false;
- }
-
- boolean this_present_hostName = true && this.isSetHostName();
- boolean that_present_hostName = true && that.isSetHostName();
- if (this_present_hostName || that_present_hostName) {
- if (!(this_present_hostName && that_present_hostName))
- return false;
- if (!this.hostName.equals(that.hostName))
- return false;
- }
-
- boolean this_present_hostAliases = true && this.isSetHostAliases();
- boolean that_present_hostAliases = true && that.isSetHostAliases();
- if (this_present_hostAliases || that_present_hostAliases) {
- if (!(this_present_hostAliases && that_present_hostAliases))
- return false;
- if (!this.hostAliases.equals(that.hostAliases))
- return false;
- }
-
- boolean this_present_ipAddresses = true && this.isSetIpAddresses();
- boolean that_present_ipAddresses = true && that.isSetIpAddresses();
- if (this_present_ipAddresses || that_present_ipAddresses) {
- if (!(this_present_ipAddresses && that_present_ipAddresses))
- return false;
- if (!this.ipAddresses.equals(that.ipAddresses))
- return false;
- }
-
- boolean this_present_resourceDescription = true && this.isSetResourceDescription();
- boolean that_present_resourceDescription = true && that.isSetResourceDescription();
- if (this_present_resourceDescription || that_present_resourceDescription) {
- if (!(this_present_resourceDescription && that_present_resourceDescription))
- return false;
- if (!this.resourceDescription.equals(that.resourceDescription))
- return false;
- }
-
- boolean this_present_scratchLocation = true && this.isSetScratchLocation();
- boolean that_present_scratchLocation = true && that.isSetScratchLocation();
- if (this_present_scratchLocation || that_present_scratchLocation) {
- if (!(this_present_scratchLocation && that_present_scratchLocation))
- return false;
- if (!this.scratchLocation.equals(that.scratchLocation))
- return false;
- }
-
- boolean this_present_preferredJobSubmissionProtocol = true && this.isSetPreferredJobSubmissionProtocol();
- boolean that_present_preferredJobSubmissionProtocol = true && that.isSetPreferredJobSubmissionProtocol();
- if (this_present_preferredJobSubmissionProtocol || that_present_preferredJobSubmissionProtocol) {
- if (!(this_present_preferredJobSubmissionProtocol && that_present_preferredJobSubmissionProtocol))
- return false;
- if (!this.preferredJobSubmissionProtocol.equals(that.preferredJobSubmissionProtocol))
- return false;
- }
-
- boolean this_present_jobSubmissionProtocols = true && this.isSetJobSubmissionProtocols();
- boolean that_present_jobSubmissionProtocols = true && that.isSetJobSubmissionProtocols();
- if (this_present_jobSubmissionProtocols || that_present_jobSubmissionProtocols) {
- if (!(this_present_jobSubmissionProtocols && that_present_jobSubmissionProtocols))
- return false;
- if (!this.jobSubmissionProtocols.equals(that.jobSubmissionProtocols))
- return false;
- }
-
- boolean this_present_dataMovementProtocols = true && this.isSetDataMovementProtocols();
- boolean that_present_dataMovementProtocols = true && that.isSetDataMovementProtocols();
- if (this_present_dataMovementProtocols || that_present_dataMovementProtocols) {
- if (!(this_present_dataMovementProtocols && that_present_dataMovementProtocols))
- return false;
- if (!this.dataMovementProtocols.equals(that.dataMovementProtocols))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ComputeResourceDescription other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- 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(isSetResourceId()).compareTo(other.isSetResourceId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetResourceId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceId, other.resourceId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHostName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, other.hostName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetHostAliases()).compareTo(other.isSetHostAliases());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHostAliases()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostAliases, other.hostAliases);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIpAddresses()).compareTo(other.isSetIpAddresses());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIpAddresses()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddresses, other.ipAddresses);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetResourceDescription()).compareTo(other.isSetResourceDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetResourceDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceDescription, other.resourceDescription);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetScratchLocation()).compareTo(other.isSetScratchLocation());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetScratchLocation()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scratchLocation, other.scratchLocation);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPreferredJobSubmissionProtocol()).compareTo(other.isSetPreferredJobSubmissionProtocol());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPreferredJobSubmissionProtocol()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferredJobSubmissionProtocol, other.preferredJobSubmissionProtocol);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetJobSubmissionProtocols()).compareTo(other.isSetJobSubmissionProtocols());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobSubmissionProtocols()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionProtocols, other.jobSubmissionProtocols);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDataMovementProtocols()).compareTo(other.isSetDataMovementProtocols());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDataMovementProtocols()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementProtocols, other.dataMovementProtocols);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ComputeResourceDescription(");
- boolean first = true;
-
- sb.append("isEmpty:");
- sb.append(this.isEmpty);
- first = false;
- if (!first) sb.append(", ");
- sb.append("resourceId:");
- if (this.resourceId == null) {
- sb.append("null");
- } else {
- sb.append(this.resourceId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("hostName:");
- if (this.hostName == null) {
- sb.append("null");
- } else {
- sb.append(this.hostName);
- }
- first = false;
- if (isSetHostAliases()) {
- if (!first) sb.append(", ");
- sb.append("hostAliases:");
- if (this.hostAliases == null) {
- sb.append("null");
- } else {
- sb.append(this.hostAliases);
- }
- first = false;
- }
- if (isSetIpAddresses()) {
- if (!first) sb.append(", ");
- sb.append("ipAddresses:");
- if (this.ipAddresses == null) {
- sb.append("null");
- } else {
- sb.append(this.ipAddresses);
- }
- first = false;
- }
- if (isSetResourceDescription()) {
- if (!first) sb.append(", ");
- sb.append("resourceDescription:");
- if (this.resourceDescription == null) {
- sb.append("null");
- } else {
- sb.append(this.resourceDescription);
- }
- first = false;
- }
- if (isSetScratchLocation()) {
- if (!first) sb.append(", ");
- sb.append("scratchLocation:");
- if (this.scratchLocation == null) {
- sb.append("null");
- } else {
- sb.append(this.scratchLocation);
- }
- first = false;
- }
- if (isSetPreferredJobSubmissionProtocol()) {
- if (!first) sb.append(", ");
- sb.append("preferredJobSubmissionProtocol:");
- if (this.preferredJobSubmissionProtocol == null) {
- sb.append("null");
- } else {
- sb.append(this.preferredJobSubmissionProtocol);
- }
- first = false;
- }
- if (!first) sb.append(", ");
- sb.append("jobSubmissionProtocols:");
- if (this.jobSubmissionProtocols == null) {
- sb.append("null");
- } else {
- sb.append(this.jobSubmissionProtocols);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("dataMovementProtocols:");
- if (this.dataMovementProtocols == null) {
- sb.append("null");
- } else {
- sb.append(this.dataMovementProtocols);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- 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 (!isSetResourceId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceId' is unset! Struct:" + toString());
- }
-
- if (!isSetHostName()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostName' is unset! Struct:" + toString());
- }
-
- if (!isSetJobSubmissionProtocols()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionProtocols' is unset! Struct:" + toString());
- }
-
- if (!isSetDataMovementProtocols()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementProtocols' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- }
- }
-
- private static class ComputeResourceDescriptionStandardSchemeFactory implements SchemeFactory {
- public ComputeResourceDescriptionStandardScheme getScheme() {
- return new ComputeResourceDescriptionStandardScheme();
- }
- }
-
- private static class ComputeResourceDescriptionStandardScheme extends StandardScheme<ComputeResourceDescription> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ComputeResourceDescription struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- 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: // RESOURCE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.resourceId = iprot.readString();
- struct.setResourceIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // HOST_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.hostName = iprot.readString();
- struct.setHostNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // HOST_ALIASES
- if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
- {
- org.apache.thrift.protocol.TSet _set24 = iprot.readSetBegin();
- struct.hostAliases = new HashSet<String>(2*_set24.size);
- for (int _i25 = 0; _i25 < _set24.size; ++_i25)
- {
- String _elem26;
- _elem26 = iprot.readString();
- struct.hostAliases.add(_elem26);
- }
- iprot.readSetEnd();
- }
- struct.setHostAliasesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // IP_ADDRESSES
- if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
- {
- org.apache.thrift.protocol.TSet _set27 = iprot.readSetBegin();
- struct.ipAddresses = new HashSet<String>(2*_set27.size);
- for (int _i28 = 0; _i28 < _set27.size; ++_i28)
- {
- String _elem29;
- _elem29 = iprot.readString();
- struct.ipAddresses.add(_elem29);
- }
- iprot.readSetEnd();
- }
- struct.setIpAddressesIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // RESOURCE_DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.resourceDescription = iprot.readString();
- struct.setResourceDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // SCRATCH_LOCATION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.scratchLocation = iprot.readString();
- struct.setScratchLocationIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // PREFERRED_JOB_SUBMISSION_PROTOCOL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.preferredJobSubmissionProtocol = iprot.readString();
- struct.setPreferredJobSubmissionProtocolIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // JOB_SUBMISSION_PROTOCOLS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map30 = iprot.readMapBegin();
- struct.jobSubmissionProtocols = new HashMap<String,JobSubmissionProtocol>(2*_map30.size);
- for (int _i31 = 0; _i31 < _map30.size; ++_i31)
- {
- String _key32;
- JobSubmissionProtocol _val33;
- _key32 = iprot.readString();
- _val33 = JobSubmissionProtocol.findByValue(iprot.readI32());
- struct.jobSubmissionProtocols.put(_key32, _val33);
- }
- iprot.readMapEnd();
- }
- struct.setJobSubmissionProtocolsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // DATA_MOVEMENT_PROTOCOLS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map34 = iprot.readMapBegin();
- struct.dataMovementProtocols = new HashMap<String,DataMovementProtocol>(2*_map34.size);
- for (int _i35 = 0; _i35 < _map34.size; ++_i35)
- {
- String _key36;
- DataMovementProtocol _val37;
- _key36 = iprot.readString();
- _val37 = DataMovementProtocol.findByValue(iprot.readI32());
- struct.dataMovementProtocols.put(_key36, _val37);
- }
- iprot.readMapEnd();
- }
- struct.setDataMovementProtocolsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ComputeResourceDescription struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(IS_EMPTY_FIELD_DESC);
- oprot.writeBool(struct.isEmpty);
- oprot.writeFieldEnd();
- if (struct.resourceId != null) {
- oprot.writeFieldBegin(RESOURCE_ID_FIELD_DESC);
- oprot.writeString(struct.resourceId);
- oprot.writeFieldEnd();
- }
- if (struct.hostName != null) {
- oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
- oprot.writeString(struct.hostName);
- oprot.writeFieldEnd();
- }
- if (struct.hostAliases != null) {
- if (struct.isSetHostAliases()) {
- oprot.writeFieldBegin(HOST_ALIASES_FIELD_DESC);
- {
- oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.hostAliases.size()));
- for (String _iter38 : struct.hostAliases)
- {
- oprot.writeString(_iter38);
- }
- oprot.writeSetEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.ipAddresses != null) {
- if (struct.isSetIpAddresses()) {
- oprot.writeFieldBegin(IP_ADDRESSES_FIELD_DESC);
- {
- oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.ipAddresses.size()));
- for (String _iter39 : struct.ipAddresses)
- {
- oprot.writeString(_iter39);
- }
- oprot.writeSetEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.resourceDescription != null) {
- if (struct.isSetResourceDescription()) {
- oprot.writeFieldBegin(RESOURCE_DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.resourceDescription);
- oprot.writeFieldEnd();
- }
- }
- if (struct.scratchLocation != null) {
- if (struct.isSetScratchLocation()) {
- oprot.writeFieldBegin(SCRATCH_LOCATION_FIELD_DESC);
- oprot.writeString(struct.scratchLocation);
- oprot.writeFieldEnd();
- }
- }
- if (struct.preferredJobSubmissionProtocol != null) {
- if (struct.isSetPreferredJobSubmissionProtocol()) {
- oprot.writeFieldBegin(PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC);
- oprot.writeString(struct.preferredJobSubmissionProtocol);
- oprot.writeFieldEnd();
- }
- }
- if (struct.jobSubmissionProtocols != null) {
- oprot.writeFieldBegin(JOB_SUBMISSION_PROTOCOLS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.jobSubmissionProtocols.size()));
- for (Map.Entry<String, JobSubmissionProtocol> _iter40 : struct.jobSubmissionProtocols.entrySet())
- {
- oprot.writeString(_iter40.getKey());
- oprot.writeI32(_iter40.getValue().getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.dataMovementProtocols != null) {
- oprot.writeFieldBegin(DATA_MOVEMENT_PROTOCOLS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.dataMovementProtocols.size()));
- for (Map.Entry<String, DataMovementProtocol> _iter41 : struct.dataMovementProtocols.entrySet())
- {
- oprot.writeString(_iter41.getKey());
- oprot.writeI32(_iter41.getValue().getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ComputeResourceDescriptionTupleSchemeFactory implements SchemeFactory {
- public ComputeResourceDescriptionTupleScheme getScheme() {
- return new ComputeResourceDescriptionTupleScheme();
- }
- }
-
- private static class ComputeResourceDescriptionTupleScheme extends TupleScheme<ComputeResourceDescription> {
-
- @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.resourceId);
- oprot.writeString(struct.hostName);
- {
- oprot.writeI32(struct.jobSubmissionProtocols.size());
- for (Map.Entry<String, JobSubmissionProtocol> _iter42 : struct.jobSubmissionProtocols.entrySet())
- {
- oprot.writeString(_iter42.getKey());
- oprot.writeI32(_iter42.getValue().getValue());
- }
- }
- {
- oprot.writeI32(struct.dataMovementProtocols.size());
- for (Map.Entry<String, DataMovementProtocol> _iter43 : struct.dataMovementProtocols.entrySet())
- {
- oprot.writeString(_iter43.getKey());
- oprot.writeI32(_iter43.getValue().getValue());
- }
- }
- BitSet optionals = new BitSet();
- if (struct.isSetHostAliases()) {
- optionals.set(0);
- }
- if (struct.isSetIpAddresses()) {
- optionals.set(1);
- }
- if (struct.isSetResourceDescription()) {
- optionals.set(2);
- }
- if (struct.isSetScratchLocation()) {
- optionals.set(3);
- }
- if (struct.isSetPreferredJobSubmissionProtocol()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetHostAliases()) {
- {
- oprot.writeI32(struct.hostAliases.size());
- for (String _iter44 : struct.hostAliases)
- {
- oprot.writeString(_iter44);
- }
- }
- }
- if (struct.isSetIpAddresses()) {
- {
- oprot.writeI32(struct.ipAddresses.size());
- for (String _iter45 : struct.ipAddresses)
- {
- oprot.writeString(_iter45);
- }
- }
- }
- if (struct.isSetResourceDescription()) {
- oprot.writeString(struct.resourceDescription);
- }
- if (struct.isSetScratchLocation()) {
- oprot.writeString(struct.scratchLocation);
- }
- if (struct.isSetPreferredJobSubmissionProtocol()) {
- oprot.writeString(struct.preferredJobSubmissionProtocol);
- }
- }
-
- @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.resourceId = iprot.readString();
- struct.setResourceIdIsSet(true);
- struct.hostName = iprot.readString();
- struct.setHostNameIsSet(true);
- {
- org.apache.thrift.protocol.TMap _map46 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.jobSubmissionProtocols = new HashMap<String,JobSubmissionProtocol>(2*_map46.size);
- for (int _i47 = 0; _i47 < _map46.size; ++_i47)
- {
- String _key48;
- JobSubmissionProtocol _val49;
- _key48 = iprot.readString();
- _val49 = JobSubmissionProtocol.findByValue(iprot.readI32());
- struct.jobSubmissionProtocols.put(_key48, _val49);
- }
- }
- struct.setJobSubmissionProtocolsIsSet(true);
- {
- org.apache.thrift.protocol.TMap _map50 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.dataMovementProtocols = new HashMap<String,DataMovementProtocol>(2*_map50.size);
- for (int _i51 = 0; _i51 < _map50.size; ++_i51)
- {
- String _key52;
- DataMovementProtocol _val53;
- _key52 = iprot.readString();
- _val53 = DataMovementProtocol.findByValue(iprot.readI32());
- struct.dataMovementProtocols.put(_key52, _val53);
- }
- }
- struct.setDataMovementProtocolsIsSet(true);
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TSet _set54 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.hostAliases = new HashSet<String>(2*_set54.size);
- for (int _i55 = 0; _i55 < _set54.size; ++_i55)
- {
- String _elem56;
- _elem56 = iprot.readString();
- struct.hostAliases.add(_elem56);
- }
- }
- struct.setHostAliasesIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TSet _set57 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.ipAddresses = new HashSet<String>(2*_set57.size);
- for (int _i58 = 0; _i58 < _set57.size; ++_i58)
- {
- String _elem59;
- _elem59 = iprot.readString();
- struct.ipAddresses.add(_elem59);
- }
- }
- struct.setIpAddressesIsSet(true);
- }
- if (incoming.get(2)) {
- struct.resourceDescription = iprot.readString();
- struct.setResourceDescriptionIsSet(true);
- }
- if (incoming.get(3)) {
- struct.scratchLocation = iprot.readString();
- struct.setScratchLocationIsSet(true);
- }
- if (incoming.get(4)) {
- struct.preferredJobSubmissionProtocol = iprot.readString();
- struct.setPreferredJobSubmissionProtocolIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java
deleted file mode 100644
index ad3f2c2..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java
+++ /dev/null
@@ -1,83 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-/**
- * Enumeration of data movement supported by Airavata
- *
- * SCP:
- * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
- *
- * SFTP:
- * The Simple Linux Utility for Resource Management is a open source workload manager.
- *
- * GridFTP:
- * Globus File Transfer Protocol
- *
- * UNICORE_STORAGE_SERVICE:
- * Storage Service Provided by Unicore
- *
- */
-@SuppressWarnings("all") public enum DataMovementProtocol implements org.apache.thrift.TEnum {
- SCP(0),
- SFTP(1),
- GridFTP(2),
- UNICORE_STORAGE_SERVICE(3);
-
- private final int value;
-
- private DataMovementProtocol(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static DataMovementProtocol findByValue(int value) {
- switch (value) {
- case 0:
- return SCP;
- case 1:
- return SFTP;
- case 2:
- return GridFTP;
- case 3:
- return UNICORE_STORAGE_SERVICE;
- default:
- return null;
- }
- }
-}
[5/7] adding id to all the job submission protocols and data movement
protocols - AIRAVATA-1203
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDescriptor.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDescriptor.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDescriptor.java
deleted file mode 100644
index 6be247a..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationDescriptor.java
+++ /dev/null
@@ -1,506 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Following structs are added for completeness of the application catalog
- */
-@SuppressWarnings("all") public class ApplicationDescriptor implements org.apache.thrift.TBase<ApplicationDescriptor, ApplicationDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationDescriptor> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationDescriptor");
-
- private static final org.apache.thrift.protocol.TField APPLICATION_DESCRIPTOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationDescriptorId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField APPLICATION_DESCRIPTOR_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationDescriptorData", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ApplicationDescriptorStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ApplicationDescriptorTupleSchemeFactory());
- }
-
- private String applicationDescriptorId; // required
- private String applicationDescriptorData; // 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 {
- APPLICATION_DESCRIPTOR_ID((short)1, "applicationDescriptorId"),
- APPLICATION_DESCRIPTOR_DATA((short)2, "applicationDescriptorData");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // APPLICATION_DESCRIPTOR_ID
- return APPLICATION_DESCRIPTOR_ID;
- case 2: // APPLICATION_DESCRIPTOR_DATA
- return APPLICATION_DESCRIPTOR_DATA;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private _Fields optionals[] = {_Fields.APPLICATION_DESCRIPTOR_DATA};
- 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.APPLICATION_DESCRIPTOR_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationDescriptorId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.APPLICATION_DESCRIPTOR_DATA, new org.apache.thrift.meta_data.FieldMetaData("applicationDescriptorData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationDescriptor.class, metaDataMap);
- }
-
- public ApplicationDescriptor() {
- this.applicationDescriptorId = "DO_NOT_SET_AT_CLIENTS";
-
- }
-
- public ApplicationDescriptor(
- String applicationDescriptorId)
- {
- this();
- this.applicationDescriptorId = applicationDescriptorId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ApplicationDescriptor(ApplicationDescriptor other) {
- if (other.isSetApplicationDescriptorId()) {
- this.applicationDescriptorId = other.applicationDescriptorId;
- }
- if (other.isSetApplicationDescriptorData()) {
- this.applicationDescriptorData = other.applicationDescriptorData;
- }
- }
-
- public ApplicationDescriptor deepCopy() {
- return new ApplicationDescriptor(this);
- }
-
- @Override
- public void clear() {
- this.applicationDescriptorId = "DO_NOT_SET_AT_CLIENTS";
-
- this.applicationDescriptorData = null;
- }
-
- public String getApplicationDescriptorId() {
- return this.applicationDescriptorId;
- }
-
- public void setApplicationDescriptorId(String applicationDescriptorId) {
- this.applicationDescriptorId = applicationDescriptorId;
- }
-
- public void unsetApplicationDescriptorId() {
- this.applicationDescriptorId = null;
- }
-
- /** Returns true if field applicationDescriptorId is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationDescriptorId() {
- return this.applicationDescriptorId != null;
- }
-
- public void setApplicationDescriptorIdIsSet(boolean value) {
- if (!value) {
- this.applicationDescriptorId = null;
- }
- }
-
- public String getApplicationDescriptorData() {
- return this.applicationDescriptorData;
- }
-
- public void setApplicationDescriptorData(String applicationDescriptorData) {
- this.applicationDescriptorData = applicationDescriptorData;
- }
-
- public void unsetApplicationDescriptorData() {
- this.applicationDescriptorData = null;
- }
-
- /** Returns true if field applicationDescriptorData is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationDescriptorData() {
- return this.applicationDescriptorData != null;
- }
-
- public void setApplicationDescriptorDataIsSet(boolean value) {
- if (!value) {
- this.applicationDescriptorData = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case APPLICATION_DESCRIPTOR_ID:
- if (value == null) {
- unsetApplicationDescriptorId();
- } else {
- setApplicationDescriptorId((String)value);
- }
- break;
-
- case APPLICATION_DESCRIPTOR_DATA:
- if (value == null) {
- unsetApplicationDescriptorData();
- } else {
- setApplicationDescriptorData((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case APPLICATION_DESCRIPTOR_ID:
- return getApplicationDescriptorId();
-
- case APPLICATION_DESCRIPTOR_DATA:
- return getApplicationDescriptorData();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case APPLICATION_DESCRIPTOR_ID:
- return isSetApplicationDescriptorId();
- case APPLICATION_DESCRIPTOR_DATA:
- return isSetApplicationDescriptorData();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ApplicationDescriptor)
- return this.equals((ApplicationDescriptor)that);
- return false;
- }
-
- public boolean equals(ApplicationDescriptor that) {
- if (that == null)
- return false;
-
- boolean this_present_applicationDescriptorId = true && this.isSetApplicationDescriptorId();
- boolean that_present_applicationDescriptorId = true && that.isSetApplicationDescriptorId();
- if (this_present_applicationDescriptorId || that_present_applicationDescriptorId) {
- if (!(this_present_applicationDescriptorId && that_present_applicationDescriptorId))
- return false;
- if (!this.applicationDescriptorId.equals(that.applicationDescriptorId))
- return false;
- }
-
- boolean this_present_applicationDescriptorData = true && this.isSetApplicationDescriptorData();
- boolean that_present_applicationDescriptorData = true && that.isSetApplicationDescriptorData();
- if (this_present_applicationDescriptorData || that_present_applicationDescriptorData) {
- if (!(this_present_applicationDescriptorData && that_present_applicationDescriptorData))
- return false;
- if (!this.applicationDescriptorData.equals(that.applicationDescriptorData))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ApplicationDescriptor other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetApplicationDescriptorId()).compareTo(other.isSetApplicationDescriptorId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationDescriptorId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationDescriptorId, other.applicationDescriptorId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetApplicationDescriptorData()).compareTo(other.isSetApplicationDescriptorData());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationDescriptorData()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationDescriptorData, other.applicationDescriptorData);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ApplicationDescriptor(");
- boolean first = true;
-
- sb.append("applicationDescriptorId:");
- if (this.applicationDescriptorId == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationDescriptorId);
- }
- first = false;
- if (isSetApplicationDescriptorData()) {
- if (!first) sb.append(", ");
- sb.append("applicationDescriptorData:");
- if (this.applicationDescriptorData == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationDescriptorData);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetApplicationDescriptorId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'applicationDescriptorId' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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);
- }
- }
-
- private static class ApplicationDescriptorStandardSchemeFactory implements SchemeFactory {
- public ApplicationDescriptorStandardScheme getScheme() {
- return new ApplicationDescriptorStandardScheme();
- }
- }
-
- private static class ApplicationDescriptorStandardScheme extends StandardScheme<ApplicationDescriptor> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ApplicationDescriptor struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // APPLICATION_DESCRIPTOR_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.applicationDescriptorId = iprot.readString();
- struct.setApplicationDescriptorIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // APPLICATION_DESCRIPTOR_DATA
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.applicationDescriptorData = iprot.readString();
- struct.setApplicationDescriptorDataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ApplicationDescriptor struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.applicationDescriptorId != null) {
- oprot.writeFieldBegin(APPLICATION_DESCRIPTOR_ID_FIELD_DESC);
- oprot.writeString(struct.applicationDescriptorId);
- oprot.writeFieldEnd();
- }
- if (struct.applicationDescriptorData != null) {
- if (struct.isSetApplicationDescriptorData()) {
- oprot.writeFieldBegin(APPLICATION_DESCRIPTOR_DATA_FIELD_DESC);
- oprot.writeString(struct.applicationDescriptorData);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ApplicationDescriptorTupleSchemeFactory implements SchemeFactory {
- public ApplicationDescriptorTupleScheme getScheme() {
- return new ApplicationDescriptorTupleScheme();
- }
- }
-
- private static class ApplicationDescriptorTupleScheme extends TupleScheme<ApplicationDescriptor> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ApplicationDescriptor struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.applicationDescriptorId);
- BitSet optionals = new BitSet();
- if (struct.isSetApplicationDescriptorData()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetApplicationDescriptorData()) {
- oprot.writeString(struct.applicationDescriptorData);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ApplicationDescriptor struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.applicationDescriptorId = iprot.readString();
- struct.setApplicationDescriptorIdIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.applicationDescriptorData = iprot.readString();
- struct.setApplicationDescriptorDataIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/0317c4a6/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationInterface.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationInterface.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationInterface.java
deleted file mode 100644
index 85c219b..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ApplicationInterface.java
+++ /dev/null
@@ -1,658 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.model.appcatalog.computeresource;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("all") public class ApplicationInterface implements org.apache.thrift.TBase<ApplicationInterface, ApplicationInterface._Fields>, java.io.Serializable, Cloneable, Comparable<ApplicationInterface> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ApplicationInterface");
-
- private static final org.apache.thrift.protocol.TField APPLICATION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField APPLICATION_INTERFACE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationInterfaceData", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField APPLICATION_DEPLOYMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationDeployments", org.apache.thrift.protocol.TType.LIST, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ApplicationInterfaceStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ApplicationInterfaceTupleSchemeFactory());
- }
-
- private String applicationInterfaceId; // required
- private String applicationInterfaceData; // optional
- private List<ApplicationDeployment> applicationDeployments; // 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 {
- APPLICATION_INTERFACE_ID((short)1, "applicationInterfaceId"),
- APPLICATION_INTERFACE_DATA((short)2, "applicationInterfaceData"),
- APPLICATION_DEPLOYMENTS((short)3, "applicationDeployments");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // APPLICATION_INTERFACE_ID
- return APPLICATION_INTERFACE_ID;
- case 2: // APPLICATION_INTERFACE_DATA
- return APPLICATION_INTERFACE_DATA;
- case 3: // APPLICATION_DEPLOYMENTS
- return APPLICATION_DEPLOYMENTS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private _Fields optionals[] = {_Fields.APPLICATION_INTERFACE_DATA,_Fields.APPLICATION_DEPLOYMENTS};
- 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.APPLICATION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.APPLICATION_INTERFACE_DATA, new org.apache.thrift.meta_data.FieldMetaData("applicationInterfaceData", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.APPLICATION_DEPLOYMENTS, new org.apache.thrift.meta_data.FieldMetaData("applicationDeployments", 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, ApplicationDeployment.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationInterface.class, metaDataMap);
- }
-
- public ApplicationInterface() {
- this.applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
-
- }
-
- public ApplicationInterface(
- String applicationInterfaceId)
- {
- this();
- this.applicationInterfaceId = applicationInterfaceId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ApplicationInterface(ApplicationInterface other) {
- if (other.isSetApplicationInterfaceId()) {
- this.applicationInterfaceId = other.applicationInterfaceId;
- }
- if (other.isSetApplicationInterfaceData()) {
- this.applicationInterfaceData = other.applicationInterfaceData;
- }
- if (other.isSetApplicationDeployments()) {
- List<ApplicationDeployment> __this__applicationDeployments = new ArrayList<ApplicationDeployment>(other.applicationDeployments.size());
- for (ApplicationDeployment other_element : other.applicationDeployments) {
- __this__applicationDeployments.add(new ApplicationDeployment(other_element));
- }
- this.applicationDeployments = __this__applicationDeployments;
- }
- }
-
- public ApplicationInterface deepCopy() {
- return new ApplicationInterface(this);
- }
-
- @Override
- public void clear() {
- this.applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
-
- this.applicationInterfaceData = null;
- this.applicationDeployments = null;
- }
-
- public String getApplicationInterfaceId() {
- return this.applicationInterfaceId;
- }
-
- public void setApplicationInterfaceId(String applicationInterfaceId) {
- this.applicationInterfaceId = applicationInterfaceId;
- }
-
- public void unsetApplicationInterfaceId() {
- this.applicationInterfaceId = null;
- }
-
- /** Returns true if field applicationInterfaceId is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationInterfaceId() {
- return this.applicationInterfaceId != null;
- }
-
- public void setApplicationInterfaceIdIsSet(boolean value) {
- if (!value) {
- this.applicationInterfaceId = null;
- }
- }
-
- public String getApplicationInterfaceData() {
- return this.applicationInterfaceData;
- }
-
- public void setApplicationInterfaceData(String applicationInterfaceData) {
- this.applicationInterfaceData = applicationInterfaceData;
- }
-
- public void unsetApplicationInterfaceData() {
- this.applicationInterfaceData = null;
- }
-
- /** Returns true if field applicationInterfaceData is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationInterfaceData() {
- return this.applicationInterfaceData != null;
- }
-
- public void setApplicationInterfaceDataIsSet(boolean value) {
- if (!value) {
- this.applicationInterfaceData = null;
- }
- }
-
- public int getApplicationDeploymentsSize() {
- return (this.applicationDeployments == null) ? 0 : this.applicationDeployments.size();
- }
-
- public java.util.Iterator<ApplicationDeployment> getApplicationDeploymentsIterator() {
- return (this.applicationDeployments == null) ? null : this.applicationDeployments.iterator();
- }
-
- public void addToApplicationDeployments(ApplicationDeployment elem) {
- if (this.applicationDeployments == null) {
- this.applicationDeployments = new ArrayList<ApplicationDeployment>();
- }
- this.applicationDeployments.add(elem);
- }
-
- public List<ApplicationDeployment> getApplicationDeployments() {
- return this.applicationDeployments;
- }
-
- public void setApplicationDeployments(List<ApplicationDeployment> applicationDeployments) {
- this.applicationDeployments = applicationDeployments;
- }
-
- public void unsetApplicationDeployments() {
- this.applicationDeployments = null;
- }
-
- /** Returns true if field applicationDeployments is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationDeployments() {
- return this.applicationDeployments != null;
- }
-
- public void setApplicationDeploymentsIsSet(boolean value) {
- if (!value) {
- this.applicationDeployments = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case APPLICATION_INTERFACE_ID:
- if (value == null) {
- unsetApplicationInterfaceId();
- } else {
- setApplicationInterfaceId((String)value);
- }
- break;
-
- case APPLICATION_INTERFACE_DATA:
- if (value == null) {
- unsetApplicationInterfaceData();
- } else {
- setApplicationInterfaceData((String)value);
- }
- break;
-
- case APPLICATION_DEPLOYMENTS:
- if (value == null) {
- unsetApplicationDeployments();
- } else {
- setApplicationDeployments((List<ApplicationDeployment>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case APPLICATION_INTERFACE_ID:
- return getApplicationInterfaceId();
-
- case APPLICATION_INTERFACE_DATA:
- return getApplicationInterfaceData();
-
- case APPLICATION_DEPLOYMENTS:
- return getApplicationDeployments();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case APPLICATION_INTERFACE_ID:
- return isSetApplicationInterfaceId();
- case APPLICATION_INTERFACE_DATA:
- return isSetApplicationInterfaceData();
- case APPLICATION_DEPLOYMENTS:
- return isSetApplicationDeployments();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ApplicationInterface)
- return this.equals((ApplicationInterface)that);
- return false;
- }
-
- public boolean equals(ApplicationInterface that) {
- if (that == null)
- return false;
-
- boolean this_present_applicationInterfaceId = true && this.isSetApplicationInterfaceId();
- boolean that_present_applicationInterfaceId = true && that.isSetApplicationInterfaceId();
- if (this_present_applicationInterfaceId || that_present_applicationInterfaceId) {
- if (!(this_present_applicationInterfaceId && that_present_applicationInterfaceId))
- return false;
- if (!this.applicationInterfaceId.equals(that.applicationInterfaceId))
- return false;
- }
-
- boolean this_present_applicationInterfaceData = true && this.isSetApplicationInterfaceData();
- boolean that_present_applicationInterfaceData = true && that.isSetApplicationInterfaceData();
- if (this_present_applicationInterfaceData || that_present_applicationInterfaceData) {
- if (!(this_present_applicationInterfaceData && that_present_applicationInterfaceData))
- return false;
- if (!this.applicationInterfaceData.equals(that.applicationInterfaceData))
- return false;
- }
-
- boolean this_present_applicationDeployments = true && this.isSetApplicationDeployments();
- boolean that_present_applicationDeployments = true && that.isSetApplicationDeployments();
- if (this_present_applicationDeployments || that_present_applicationDeployments) {
- if (!(this_present_applicationDeployments && that_present_applicationDeployments))
- return false;
- if (!this.applicationDeployments.equals(that.applicationDeployments))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ApplicationInterface other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetApplicationInterfaceId()).compareTo(other.isSetApplicationInterfaceId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationInterfaceId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationInterfaceId, other.applicationInterfaceId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetApplicationInterfaceData()).compareTo(other.isSetApplicationInterfaceData());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationInterfaceData()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationInterfaceData, other.applicationInterfaceData);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetApplicationDeployments()).compareTo(other.isSetApplicationDeployments());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationDeployments()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationDeployments, other.applicationDeployments);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ApplicationInterface(");
- boolean first = true;
-
- sb.append("applicationInterfaceId:");
- if (this.applicationInterfaceId == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationInterfaceId);
- }
- first = false;
- if (isSetApplicationInterfaceData()) {
- if (!first) sb.append(", ");
- sb.append("applicationInterfaceData:");
- if (this.applicationInterfaceData == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationInterfaceData);
- }
- first = false;
- }
- if (isSetApplicationDeployments()) {
- if (!first) sb.append(", ");
- sb.append("applicationDeployments:");
- if (this.applicationDeployments == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationDeployments);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetApplicationInterfaceId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'applicationInterfaceId' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- 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);
- }
- }
-
- private static class ApplicationInterfaceStandardSchemeFactory implements SchemeFactory {
- public ApplicationInterfaceStandardScheme getScheme() {
- return new ApplicationInterfaceStandardScheme();
- }
- }
-
- private static class ApplicationInterfaceStandardScheme extends StandardScheme<ApplicationInterface> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ApplicationInterface struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // APPLICATION_INTERFACE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.applicationInterfaceId = iprot.readString();
- struct.setApplicationInterfaceIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // APPLICATION_INTERFACE_DATA
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.applicationInterfaceData = iprot.readString();
- struct.setApplicationInterfaceDataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // APPLICATION_DEPLOYMENTS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
- struct.applicationDeployments = new ArrayList<ApplicationDeployment>(_list60.size);
- for (int _i61 = 0; _i61 < _list60.size; ++_i61)
- {
- ApplicationDeployment _elem62;
- _elem62 = new ApplicationDeployment();
- _elem62.read(iprot);
- struct.applicationDeployments.add(_elem62);
- }
- iprot.readListEnd();
- }
- struct.setApplicationDeploymentsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ApplicationInterface struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.applicationInterfaceId != null) {
- oprot.writeFieldBegin(APPLICATION_INTERFACE_ID_FIELD_DESC);
- oprot.writeString(struct.applicationInterfaceId);
- oprot.writeFieldEnd();
- }
- if (struct.applicationInterfaceData != null) {
- if (struct.isSetApplicationInterfaceData()) {
- oprot.writeFieldBegin(APPLICATION_INTERFACE_DATA_FIELD_DESC);
- oprot.writeString(struct.applicationInterfaceData);
- oprot.writeFieldEnd();
- }
- }
- if (struct.applicationDeployments != null) {
- if (struct.isSetApplicationDeployments()) {
- oprot.writeFieldBegin(APPLICATION_DEPLOYMENTS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.applicationDeployments.size()));
- for (ApplicationDeployment _iter63 : struct.applicationDeployments)
- {
- _iter63.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ApplicationInterfaceTupleSchemeFactory implements SchemeFactory {
- public ApplicationInterfaceTupleScheme getScheme() {
- return new ApplicationInterfaceTupleScheme();
- }
- }
-
- private static class ApplicationInterfaceTupleScheme extends TupleScheme<ApplicationInterface> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ApplicationInterface struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.applicationInterfaceId);
- BitSet optionals = new BitSet();
- if (struct.isSetApplicationInterfaceData()) {
- optionals.set(0);
- }
- if (struct.isSetApplicationDeployments()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetApplicationInterfaceData()) {
- oprot.writeString(struct.applicationInterfaceData);
- }
- if (struct.isSetApplicationDeployments()) {
- {
- oprot.writeI32(struct.applicationDeployments.size());
- for (ApplicationDeployment _iter64 : struct.applicationDeployments)
- {
- _iter64.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ApplicationInterface struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.applicationInterfaceId = iprot.readString();
- struct.setApplicationInterfaceIdIsSet(true);
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.applicationInterfaceData = iprot.readString();
- struct.setApplicationInterfaceDataIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TList _list65 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.applicationDeployments = new ArrayList<ApplicationDeployment>(_list65.size);
- for (int _i66 = 0; _i66 < _list65.size; ++_i66)
- {
- ApplicationDeployment _elem67;
- _elem67 = new ApplicationDeployment();
- _elem67.read(iprot);
- struct.applicationDeployments.add(_elem67);
- }
- }
- struct.setApplicationDeploymentsIsSet(true);
- }
- }
- }
-
-}
-