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 2013/12/11 23:07:22 UTC
svn commit: r1550285 [4/11] - in /airavata/trunk/modules/thrift: ./
interpreter-service/src/main/java/org/apache/airavata/experiment/execution/
interpreter-service/src/main/resources/
Modified: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java?rev=1550285&r1=1550284&r2=1550285&view=diff
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java (original)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java Wed Dec 11 22:07:21 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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)
*
@@ -33,742 +54,745 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HPCSettings implements org.apache.thrift.TBase<HPCSettings, HPCSettings._Fields>, java.io.Serializable, Cloneable, Comparable<HPCSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HPCSettings");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HPCSettings");
+
+ private static final org.apache.thrift.protocol.TField JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManager", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CPU_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuCount", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField MAX_WALLTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("maxWalltime", org.apache.thrift.protocol.TType.I32, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new HPCSettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new HPCSettingsTupleSchemeFactory());
+ }
+
+ public String jobManager; // optional
+ public int cpuCount; // optional
+ public int nodeCount; // optional
+ public String queueName; // optional
+ public int maxWalltime; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_MANAGER((short)1, "jobManager"),
+ CPU_COUNT((short)2, "cpuCount"),
+ NODE_COUNT((short)3, "nodeCount"),
+ QUEUE_NAME((short)4, "queueName"),
+ MAX_WALLTIME((short)5, "maxWalltime");
+
+ 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: // JOB_MANAGER
+ return JOB_MANAGER;
+ case 2: // CPU_COUNT
+ return CPU_COUNT;
+ case 3: // NODE_COUNT
+ return NODE_COUNT;
+ case 4: // QUEUE_NAME
+ return QUEUE_NAME;
+ case 5: // MAX_WALLTIME
+ return MAX_WALLTIME;
+ 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;
+ }
- private static final org.apache.thrift.protocol.TField JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManager", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField CPU_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuCount", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField MAX_WALLTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("maxWalltime", org.apache.thrift.protocol.TType.I32, (short)5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new HPCSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HPCSettingsTupleSchemeFactory());
- }
-
- public String jobManager; // required
- public int cpuCount; // required
- public int nodeCount; // required
- public String queueName; // required
- public int maxWalltime; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- JOB_MANAGER((short)1, "jobManager"),
- CPU_COUNT((short)2, "cpuCount"),
- NODE_COUNT((short)3, "nodeCount"),
- QUEUE_NAME((short)4, "queueName"),
- MAX_WALLTIME((short)5, "maxWalltime");
+ /**
+ * 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;
+ }
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __CPUCOUNT_ISSET_ID = 0;
+ private static final int __NODECOUNT_ISSET_ID = 1;
+ private static final int __MAXWALLTIME_ISSET_ID = 2;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.JOB_MANAGER,_Fields.CPU_COUNT,_Fields.NODE_COUNT,_Fields.QUEUE_NAME,_Fields.MAX_WALLTIME};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("jobManager", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CPU_COUNT, new org.apache.thrift.meta_data.FieldMetaData("cpuCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("nodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MAX_WALLTIME, new org.apache.thrift.meta_data.FieldMetaData("maxWalltime", 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(HPCSettings.class, metaDataMap);
}
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // JOB_MANAGER
- return JOB_MANAGER;
- case 2: // CPU_COUNT
- return CPU_COUNT;
- case 3: // NODE_COUNT
- return NODE_COUNT;
- case 4: // QUEUE_NAME
- return QUEUE_NAME;
- case 5: // MAX_WALLTIME
- return MAX_WALLTIME;
- default:
- return null;
- }
+ public HPCSettings() {
}
/**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
+ * Performs a deep copy on <i>other</i>.
*/
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
+ public HPCSettings(HPCSettings other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobManager()) {
+ this.jobManager = other.jobManager;
+ }
+ this.cpuCount = other.cpuCount;
+ this.nodeCount = other.nodeCount;
+ if (other.isSetQueueName()) {
+ this.queueName = other.queueName;
+ }
+ this.maxWalltime = other.maxWalltime;
}
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
+ public HPCSettings deepCopy() {
+ return new HPCSettings(this);
}
- private final short _thriftId;
- private final String _fieldName;
+ @Override
+ public void clear() {
+ this.jobManager = null;
+ setCpuCountIsSet(false);
+ this.cpuCount = 0;
+ setNodeCountIsSet(false);
+ this.nodeCount = 0;
+ this.queueName = null;
+ setMaxWalltimeIsSet(false);
+ this.maxWalltime = 0;
+ }
- _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 __CPUCOUNT_ISSET_ID = 0;
- private static final int __NODECOUNT_ISSET_ID = 1;
- private static final int __MAXWALLTIME_ISSET_ID = 2;
- private byte __isset_bitfield = 0;
- 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.JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("jobManager", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.CPU_COUNT, new org.apache.thrift.meta_data.FieldMetaData("cpuCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("nodeCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MAX_WALLTIME, new org.apache.thrift.meta_data.FieldMetaData("maxWalltime", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HPCSettings.class, metaDataMap);
- }
-
- public HPCSettings() {
- }
-
- public HPCSettings(
- String jobManager,
- int cpuCount,
- int nodeCount,
- String queueName,
- int maxWalltime)
- {
- this();
- this.jobManager = jobManager;
- this.cpuCount = cpuCount;
- setCpuCountIsSet(true);
- this.nodeCount = nodeCount;
- setNodeCountIsSet(true);
- this.queueName = queueName;
- this.maxWalltime = maxWalltime;
- setMaxWalltimeIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public HPCSettings(HPCSettings other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetJobManager()) {
- this.jobManager = other.jobManager;
- }
- this.cpuCount = other.cpuCount;
- this.nodeCount = other.nodeCount;
- if (other.isSetQueueName()) {
- this.queueName = other.queueName;
- }
- this.maxWalltime = other.maxWalltime;
- }
-
- public HPCSettings deepCopy() {
- return new HPCSettings(this);
- }
-
- @Override
- public void clear() {
- this.jobManager = null;
- setCpuCountIsSet(false);
- this.cpuCount = 0;
- setNodeCountIsSet(false);
- this.nodeCount = 0;
- this.queueName = null;
- setMaxWalltimeIsSet(false);
- this.maxWalltime = 0;
- }
-
- public String getJobManager() {
- return this.jobManager;
- }
-
- public HPCSettings setJobManager(String jobManager) {
- this.jobManager = jobManager;
- return this;
- }
-
- public void unsetJobManager() {
- this.jobManager = null;
- }
-
- /** Returns true if field jobManager is set (has been assigned a value) and false otherwise */
- public boolean isSetJobManager() {
- return this.jobManager != null;
- }
-
- public void setJobManagerIsSet(boolean value) {
- if (!value) {
- this.jobManager = null;
- }
- }
-
- public int getCpuCount() {
- return this.cpuCount;
- }
-
- public HPCSettings setCpuCount(int cpuCount) {
- this.cpuCount = cpuCount;
- setCpuCountIsSet(true);
- return this;
- }
-
- public void unsetCpuCount() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUCOUNT_ISSET_ID);
- }
-
- /** Returns true if field cpuCount is set (has been assigned a value) and false otherwise */
- public boolean isSetCpuCount() {
- return EncodingUtils.testBit(__isset_bitfield, __CPUCOUNT_ISSET_ID);
- }
-
- public void setCpuCountIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUCOUNT_ISSET_ID, value);
- }
-
- public int getNodeCount() {
- return this.nodeCount;
- }
-
- public HPCSettings setNodeCount(int nodeCount) {
- this.nodeCount = nodeCount;
- setNodeCountIsSet(true);
- return this;
- }
-
- public void unsetNodeCount() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
- }
-
- /** Returns true if field nodeCount is set (has been assigned a value) and false otherwise */
- public boolean isSetNodeCount() {
- return EncodingUtils.testBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
- }
-
- public void setNodeCountIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NODECOUNT_ISSET_ID, value);
- }
-
- public String getQueueName() {
- return this.queueName;
- }
-
- public HPCSettings setQueueName(String queueName) {
- this.queueName = queueName;
- return this;
- }
-
- public void unsetQueueName() {
- this.queueName = null;
- }
-
- /** Returns true if field queueName is set (has been assigned a value) and false otherwise */
- public boolean isSetQueueName() {
- return this.queueName != null;
- }
-
- public void setQueueNameIsSet(boolean value) {
- if (!value) {
- this.queueName = null;
- }
- }
-
- public int getMaxWalltime() {
- return this.maxWalltime;
- }
-
- public HPCSettings setMaxWalltime(int maxWalltime) {
- this.maxWalltime = maxWalltime;
- setMaxWalltimeIsSet(true);
- return this;
- }
-
- public void unsetMaxWalltime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXWALLTIME_ISSET_ID);
- }
-
- /** Returns true if field maxWalltime is set (has been assigned a value) and false otherwise */
- public boolean isSetMaxWalltime() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXWALLTIME_ISSET_ID);
- }
-
- public void setMaxWalltimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXWALLTIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case JOB_MANAGER:
- if (value == null) {
- unsetJobManager();
- } else {
- setJobManager((String)value);
- }
- break;
-
- case CPU_COUNT:
- if (value == null) {
- unsetCpuCount();
- } else {
- setCpuCount((Integer)value);
- }
- break;
-
- case NODE_COUNT:
- if (value == null) {
- unsetNodeCount();
- } else {
- setNodeCount((Integer)value);
- }
- break;
-
- case QUEUE_NAME:
- if (value == null) {
- unsetQueueName();
- } else {
- setQueueName((String)value);
- }
- break;
-
- case MAX_WALLTIME:
- if (value == null) {
- unsetMaxWalltime();
- } else {
- setMaxWalltime((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case JOB_MANAGER:
- return getJobManager();
-
- case CPU_COUNT:
- return Integer.valueOf(getCpuCount());
-
- case NODE_COUNT:
- return Integer.valueOf(getNodeCount());
-
- case QUEUE_NAME:
- return getQueueName();
-
- case MAX_WALLTIME:
- return Integer.valueOf(getMaxWalltime());
-
- }
- 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 JOB_MANAGER:
- return isSetJobManager();
- case CPU_COUNT:
- return isSetCpuCount();
- case NODE_COUNT:
- return isSetNodeCount();
- case QUEUE_NAME:
- return isSetQueueName();
- case MAX_WALLTIME:
- return isSetMaxWalltime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof HPCSettings)
- return this.equals((HPCSettings)that);
- return false;
- }
-
- public boolean equals(HPCSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_jobManager = true && this.isSetJobManager();
- boolean that_present_jobManager = true && that.isSetJobManager();
- if (this_present_jobManager || that_present_jobManager) {
- if (!(this_present_jobManager && that_present_jobManager))
- return false;
- if (!this.jobManager.equals(that.jobManager))
- return false;
+ public String getJobManager() {
+ return this.jobManager;
}
- boolean this_present_cpuCount = true;
- boolean that_present_cpuCount = true;
- if (this_present_cpuCount || that_present_cpuCount) {
- if (!(this_present_cpuCount && that_present_cpuCount))
- return false;
- if (this.cpuCount != that.cpuCount)
- return false;
+ public HPCSettings setJobManager(String jobManager) {
+ this.jobManager = jobManager;
+ return this;
}
- boolean this_present_nodeCount = true;
- boolean that_present_nodeCount = true;
- if (this_present_nodeCount || that_present_nodeCount) {
- if (!(this_present_nodeCount && that_present_nodeCount))
- return false;
- if (this.nodeCount != that.nodeCount)
- return false;
+ public void unsetJobManager() {
+ this.jobManager = null;
}
- boolean this_present_queueName = true && this.isSetQueueName();
- boolean that_present_queueName = true && that.isSetQueueName();
- if (this_present_queueName || that_present_queueName) {
- if (!(this_present_queueName && that_present_queueName))
- return false;
- if (!this.queueName.equals(that.queueName))
- return false;
+ /** Returns true if field jobManager is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobManager() {
+ return this.jobManager != null;
}
- boolean this_present_maxWalltime = true;
- boolean that_present_maxWalltime = true;
- if (this_present_maxWalltime || that_present_maxWalltime) {
- if (!(this_present_maxWalltime && that_present_maxWalltime))
- return false;
- if (this.maxWalltime != that.maxWalltime)
+ public void setJobManagerIsSet(boolean value) {
+ if (!value) {
+ this.jobManager = null;
+ }
+ }
+
+ public int getCpuCount() {
+ return this.cpuCount;
+ }
+
+ public HPCSettings setCpuCount(int cpuCount) {
+ this.cpuCount = cpuCount;
+ setCpuCountIsSet(true);
+ return this;
+ }
+
+ public void unsetCpuCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field cpuCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetCpuCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __CPUCOUNT_ISSET_ID);
+ }
+
+ public void setCpuCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUCOUNT_ISSET_ID, value);
+ }
+
+ public int getNodeCount() {
+ return this.nodeCount;
+ }
+
+ public HPCSettings setNodeCount(int nodeCount) {
+ this.nodeCount = nodeCount;
+ setNodeCountIsSet(true);
+ return this;
+ }
+
+ public void unsetNodeCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field nodeCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __NODECOUNT_ISSET_ID);
+ }
+
+ public void setNodeCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NODECOUNT_ISSET_ID, value);
+ }
+
+ public String getQueueName() {
+ return this.queueName;
+ }
+
+ public HPCSettings setQueueName(String queueName) {
+ this.queueName = queueName;
+ return this;
+ }
+
+ public void unsetQueueName() {
+ this.queueName = null;
+ }
+
+ /** Returns true if field queueName is set (has been assigned a value) and false otherwise */
+ public boolean isSetQueueName() {
+ return this.queueName != null;
+ }
+
+ public void setQueueNameIsSet(boolean value) {
+ if (!value) {
+ this.queueName = null;
+ }
+ }
+
+ public int getMaxWalltime() {
+ return this.maxWalltime;
+ }
+
+ public HPCSettings setMaxWalltime(int maxWalltime) {
+ this.maxWalltime = maxWalltime;
+ setMaxWalltimeIsSet(true);
+ return this;
+ }
+
+ public void unsetMaxWalltime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXWALLTIME_ISSET_ID);
+ }
+
+ /** Returns true if field maxWalltime is set (has been assigned a value) and false otherwise */
+ public boolean isSetMaxWalltime() {
+ return EncodingUtils.testBit(__isset_bitfield, __MAXWALLTIME_ISSET_ID);
+ }
+
+ public void setMaxWalltimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXWALLTIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_MANAGER:
+ if (value == null) {
+ unsetJobManager();
+ } else {
+ setJobManager((String)value);
+ }
+ break;
+
+ case CPU_COUNT:
+ if (value == null) {
+ unsetCpuCount();
+ } else {
+ setCpuCount((Integer)value);
+ }
+ break;
+
+ case NODE_COUNT:
+ if (value == null) {
+ unsetNodeCount();
+ } else {
+ setNodeCount((Integer)value);
+ }
+ break;
+
+ case QUEUE_NAME:
+ if (value == null) {
+ unsetQueueName();
+ } else {
+ setQueueName((String)value);
+ }
+ break;
+
+ case MAX_WALLTIME:
+ if (value == null) {
+ unsetMaxWalltime();
+ } else {
+ setMaxWalltime((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_MANAGER:
+ return getJobManager();
+
+ case CPU_COUNT:
+ return Integer.valueOf(getCpuCount());
+
+ case NODE_COUNT:
+ return Integer.valueOf(getNodeCount());
+
+ case QUEUE_NAME:
+ return getQueueName();
+
+ case MAX_WALLTIME:
+ return Integer.valueOf(getMaxWalltime());
+
+ }
+ 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 JOB_MANAGER:
+ return isSetJobManager();
+ case CPU_COUNT:
+ return isSetCpuCount();
+ case NODE_COUNT:
+ return isSetNodeCount();
+ case QUEUE_NAME:
+ return isSetQueueName();
+ case MAX_WALLTIME:
+ return isSetMaxWalltime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof HPCSettings)
+ return this.equals((HPCSettings)that);
return false;
}
- return true;
- }
+ public boolean equals(HPCSettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobManager = true && this.isSetJobManager();
+ boolean that_present_jobManager = true && that.isSetJobManager();
+ if (this_present_jobManager || that_present_jobManager) {
+ if (!(this_present_jobManager && that_present_jobManager))
+ return false;
+ if (!this.jobManager.equals(that.jobManager))
+ return false;
+ }
+
+ boolean this_present_cpuCount = true && this.isSetCpuCount();
+ boolean that_present_cpuCount = true && that.isSetCpuCount();
+ if (this_present_cpuCount || that_present_cpuCount) {
+ if (!(this_present_cpuCount && that_present_cpuCount))
+ return false;
+ if (this.cpuCount != that.cpuCount)
+ return false;
+ }
+
+ boolean this_present_nodeCount = true && this.isSetNodeCount();
+ boolean that_present_nodeCount = true && that.isSetNodeCount();
+ if (this_present_nodeCount || that_present_nodeCount) {
+ if (!(this_present_nodeCount && that_present_nodeCount))
+ return false;
+ if (this.nodeCount != that.nodeCount)
+ return false;
+ }
+
+ boolean this_present_queueName = true && this.isSetQueueName();
+ boolean that_present_queueName = true && that.isSetQueueName();
+ if (this_present_queueName || that_present_queueName) {
+ if (!(this_present_queueName && that_present_queueName))
+ return false;
+ if (!this.queueName.equals(that.queueName))
+ return false;
+ }
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(HPCSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetJobManager()).compareTo(other.isSetJobManager());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobManager()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobManager, other.jobManager);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCpuCount()).compareTo(other.isSetCpuCount());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCpuCount()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuCount, other.cpuCount);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNodeCount()).compareTo(other.isSetNodeCount());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNodeCount()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeCount, other.nodeCount);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetQueueName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMaxWalltime()).compareTo(other.isSetMaxWalltime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMaxWalltime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxWalltime, other.maxWalltime);
- 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("HPCSettings(");
- boolean first = true;
-
- sb.append("jobManager:");
- if (this.jobManager == null) {
- sb.append("null");
- } else {
- sb.append(this.jobManager);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("cpuCount:");
- sb.append(this.cpuCount);
- first = false;
- if (!first) sb.append(", ");
- sb.append("nodeCount:");
- sb.append(this.nodeCount);
- first = false;
- if (!first) sb.append(", ");
- sb.append("queueName:");
- if (this.queueName == null) {
- sb.append("null");
- } else {
- sb.append(this.queueName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("maxWalltime:");
- sb.append(this.maxWalltime);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // 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 HPCSettingsStandardSchemeFactory implements SchemeFactory {
- public HPCSettingsStandardScheme getScheme() {
- return new HPCSettingsStandardScheme();
- }
- }
-
- private static class HPCSettingsStandardScheme extends StandardScheme<HPCSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, HPCSettings 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: // JOB_MANAGER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.jobManager = iprot.readString();
- struct.setJobManagerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CPU_COUNT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.cpuCount = iprot.readI32();
- struct.setCpuCountIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // NODE_COUNT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.nodeCount = iprot.readI32();
- struct.setNodeCountIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // QUEUE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.queueName = iprot.readString();
- struct.setQueueNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // MAX_WALLTIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.maxWalltime = iprot.readI32();
- struct.setMaxWalltimeIsSet(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();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, HPCSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.jobManager != null) {
- oprot.writeFieldBegin(JOB_MANAGER_FIELD_DESC);
- oprot.writeString(struct.jobManager);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(CPU_COUNT_FIELD_DESC);
- oprot.writeI32(struct.cpuCount);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NODE_COUNT_FIELD_DESC);
- oprot.writeI32(struct.nodeCount);
- oprot.writeFieldEnd();
- if (struct.queueName != null) {
- oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
- oprot.writeString(struct.queueName);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(MAX_WALLTIME_FIELD_DESC);
- oprot.writeI32(struct.maxWalltime);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class HPCSettingsTupleSchemeFactory implements SchemeFactory {
- public HPCSettingsTupleScheme getScheme() {
- return new HPCSettingsTupleScheme();
+ boolean this_present_maxWalltime = true && this.isSetMaxWalltime();
+ boolean that_present_maxWalltime = true && that.isSetMaxWalltime();
+ if (this_present_maxWalltime || that_present_maxWalltime) {
+ if (!(this_present_maxWalltime && that_present_maxWalltime))
+ return false;
+ if (this.maxWalltime != that.maxWalltime)
+ return false;
+ }
+
+ return true;
}
- }
- private static class HPCSettingsTupleScheme extends TupleScheme<HPCSettings> {
+ @Override
+ public int hashCode() {
+ return 0;
+ }
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, HPCSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetJobManager()) {
- optionals.set(0);
- }
- if (struct.isSetCpuCount()) {
- optionals.set(1);
- }
- if (struct.isSetNodeCount()) {
- optionals.set(2);
- }
- if (struct.isSetQueueName()) {
- optionals.set(3);
- }
- if (struct.isSetMaxWalltime()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetJobManager()) {
- oprot.writeString(struct.jobManager);
- }
- if (struct.isSetCpuCount()) {
- oprot.writeI32(struct.cpuCount);
- }
- if (struct.isSetNodeCount()) {
- oprot.writeI32(struct.nodeCount);
- }
- if (struct.isSetQueueName()) {
- oprot.writeString(struct.queueName);
- }
- if (struct.isSetMaxWalltime()) {
- oprot.writeI32(struct.maxWalltime);
- }
+ public int compareTo(HPCSettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobManager()).compareTo(other.isSetJobManager());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobManager()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobManager, other.jobManager);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCpuCount()).compareTo(other.isSetCpuCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCpuCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuCount, other.cpuCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNodeCount()).compareTo(other.isSetNodeCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeCount, other.nodeCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQueueName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxWalltime()).compareTo(other.isSetMaxWalltime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxWalltime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxWalltime, other.maxWalltime);
+ 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 void read(org.apache.thrift.protocol.TProtocol prot, HPCSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.jobManager = iprot.readString();
- struct.setJobManagerIsSet(true);
- }
- if (incoming.get(1)) {
- struct.cpuCount = iprot.readI32();
- struct.setCpuCountIsSet(true);
- }
- if (incoming.get(2)) {
- struct.nodeCount = iprot.readI32();
- struct.setNodeCountIsSet(true);
- }
- if (incoming.get(3)) {
- struct.queueName = iprot.readString();
- struct.setQueueNameIsSet(true);
- }
- if (incoming.get(4)) {
- struct.maxWalltime = iprot.readI32();
- struct.setMaxWalltimeIsSet(true);
- }
+ public String toString() {
+ StringBuilder sb = new StringBuilder("HPCSettings(");
+ boolean first = true;
+
+ if (isSetJobManager()) {
+ sb.append("jobManager:");
+ if (this.jobManager == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobManager);
+ }
+ first = false;
+ }
+ if (isSetCpuCount()) {
+ if (!first) sb.append(", ");
+ sb.append("cpuCount:");
+ sb.append(this.cpuCount);
+ first = false;
+ }
+ if (isSetNodeCount()) {
+ if (!first) sb.append(", ");
+ sb.append("nodeCount:");
+ sb.append(this.nodeCount);
+ first = false;
+ }
+ if (isSetQueueName()) {
+ if (!first) sb.append(", ");
+ sb.append("queueName:");
+ if (this.queueName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.queueName);
+ }
+ first = false;
+ }
+ if (isSetMaxWalltime()) {
+ if (!first) sb.append(", ");
+ sb.append("maxWalltime:");
+ sb.append(this.maxWalltime);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // 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 HPCSettingsStandardSchemeFactory implements SchemeFactory {
+ public HPCSettingsStandardScheme getScheme() {
+ return new HPCSettingsStandardScheme();
+ }
+ }
+
+ private static class HPCSettingsStandardScheme extends StandardScheme<HPCSettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, HPCSettings 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: // JOB_MANAGER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobManager = iprot.readString();
+ struct.setJobManagerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CPU_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.cpuCount = iprot.readI32();
+ struct.setCpuCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NODE_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.nodeCount = iprot.readI32();
+ struct.setNodeCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // QUEUE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // MAX_WALLTIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxWalltime = iprot.readI32();
+ struct.setMaxWalltimeIsSet(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();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, HPCSettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobManager != null) {
+ if (struct.isSetJobManager()) {
+ oprot.writeFieldBegin(JOB_MANAGER_FIELD_DESC);
+ oprot.writeString(struct.jobManager);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetCpuCount()) {
+ oprot.writeFieldBegin(CPU_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.cpuCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetNodeCount()) {
+ oprot.writeFieldBegin(NODE_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.nodeCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.queueName != null) {
+ if (struct.isSetQueueName()) {
+ oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
+ oprot.writeString(struct.queueName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetMaxWalltime()) {
+ oprot.writeFieldBegin(MAX_WALLTIME_FIELD_DESC);
+ oprot.writeI32(struct.maxWalltime);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class HPCSettingsTupleSchemeFactory implements SchemeFactory {
+ public HPCSettingsTupleScheme getScheme() {
+ return new HPCSettingsTupleScheme();
+ }
+ }
+
+ private static class HPCSettingsTupleScheme extends TupleScheme<HPCSettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, HPCSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetJobManager()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCpuCount()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNodeCount()) {
+ optionals.set(2);
+ }
+ if (struct.isSetQueueName()) {
+ optionals.set(3);
+ }
+ if (struct.isSetMaxWalltime()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetJobManager()) {
+ oprot.writeString(struct.jobManager);
+ }
+ if (struct.isSetCpuCount()) {
+ oprot.writeI32(struct.cpuCount);
+ }
+ if (struct.isSetNodeCount()) {
+ oprot.writeI32(struct.nodeCount);
+ }
+ if (struct.isSetQueueName()) {
+ oprot.writeString(struct.queueName);
+ }
+ if (struct.isSetMaxWalltime()) {
+ oprot.writeI32(struct.maxWalltime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, HPCSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.jobManager = iprot.readString();
+ struct.setJobManagerIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.cpuCount = iprot.readI32();
+ struct.setCpuCountIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.nodeCount = iprot.readI32();
+ struct.setNodeCountIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.maxWalltime = iprot.readI32();
+ struct.setMaxWalltimeIsSet(true);
+ }
+ }
}
- }
}