You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/02/07 17:35:49 UTC
[1/7] Removing the proof of concept interpreter thrift implementation.
Updated Branches:
refs/heads/master 3070c3d9b -> 77d4925d6
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java
deleted file mode 100644
index a5e8be7..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java
+++ /dev/null
@@ -1,461 +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.experiment.execution;
-
-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;
-
-public class WorkflowOutputDataSettings implements org.apache.thrift.TBase<WorkflowOutputDataSettings, WorkflowOutputDataSettings._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowOutputDataSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowOutputDataSettings");
-
- private static final org.apache.thrift.protocol.TField OUTPUT_DATA_SETTINGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("outputDataSettingsList", org.apache.thrift.protocol.TType.LIST, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkflowOutputDataSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkflowOutputDataSettingsTupleSchemeFactory());
- }
-
- public List<OutputDataSettings> outputDataSettingsList; // 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 {
- OUTPUT_DATA_SETTINGS_LIST((short)1, "outputDataSettingsList");
-
- 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: // OUTPUT_DATA_SETTINGS_LIST
- return OUTPUT_DATA_SETTINGS_LIST;
- 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.OUTPUT_DATA_SETTINGS_LIST};
- 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.OUTPUT_DATA_SETTINGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("outputDataSettingsList", 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, OutputDataSettings.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowOutputDataSettings.class, metaDataMap);
- }
-
- public WorkflowOutputDataSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public WorkflowOutputDataSettings(WorkflowOutputDataSettings other) {
- if (other.isSetOutputDataSettingsList()) {
- List<OutputDataSettings> __this__outputDataSettingsList = new ArrayList<OutputDataSettings>(other.outputDataSettingsList.size());
- for (OutputDataSettings other_element : other.outputDataSettingsList) {
- __this__outputDataSettingsList.add(new OutputDataSettings(other_element));
- }
- this.outputDataSettingsList = __this__outputDataSettingsList;
- }
- }
-
- public WorkflowOutputDataSettings deepCopy() {
- return new WorkflowOutputDataSettings(this);
- }
-
- @Override
- public void clear() {
- this.outputDataSettingsList = null;
- }
-
- public int getOutputDataSettingsListSize() {
- return (this.outputDataSettingsList == null) ? 0 : this.outputDataSettingsList.size();
- }
-
- public java.util.Iterator<OutputDataSettings> getOutputDataSettingsListIterator() {
- return (this.outputDataSettingsList == null) ? null : this.outputDataSettingsList.iterator();
- }
-
- public void addToOutputDataSettingsList(OutputDataSettings elem) {
- if (this.outputDataSettingsList == null) {
- this.outputDataSettingsList = new ArrayList<OutputDataSettings>();
- }
- this.outputDataSettingsList.add(elem);
- }
-
- public List<OutputDataSettings> getOutputDataSettingsList() {
- return this.outputDataSettingsList;
- }
-
- public WorkflowOutputDataSettings setOutputDataSettingsList(List<OutputDataSettings> outputDataSettingsList) {
- this.outputDataSettingsList = outputDataSettingsList;
- return this;
- }
-
- public void unsetOutputDataSettingsList() {
- this.outputDataSettingsList = null;
- }
-
- /** Returns true if field outputDataSettingsList is set (has been assigned a value) and false otherwise */
- public boolean isSetOutputDataSettingsList() {
- return this.outputDataSettingsList != null;
- }
-
- public void setOutputDataSettingsListIsSet(boolean value) {
- if (!value) {
- this.outputDataSettingsList = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case OUTPUT_DATA_SETTINGS_LIST:
- if (value == null) {
- unsetOutputDataSettingsList();
- } else {
- setOutputDataSettingsList((List<OutputDataSettings>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case OUTPUT_DATA_SETTINGS_LIST:
- return getOutputDataSettingsList();
-
- }
- 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 OUTPUT_DATA_SETTINGS_LIST:
- return isSetOutputDataSettingsList();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof WorkflowOutputDataSettings)
- return this.equals((WorkflowOutputDataSettings)that);
- return false;
- }
-
- public boolean equals(WorkflowOutputDataSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_outputDataSettingsList = true && this.isSetOutputDataSettingsList();
- boolean that_present_outputDataSettingsList = true && that.isSetOutputDataSettingsList();
- if (this_present_outputDataSettingsList || that_present_outputDataSettingsList) {
- if (!(this_present_outputDataSettingsList && that_present_outputDataSettingsList))
- return false;
- if (!this.outputDataSettingsList.equals(that.outputDataSettingsList))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(WorkflowOutputDataSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetOutputDataSettingsList()).compareTo(other.isSetOutputDataSettingsList());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOutputDataSettingsList()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputDataSettingsList, other.outputDataSettingsList);
- 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("WorkflowOutputDataSettings(");
- boolean first = true;
-
- if (isSetOutputDataSettingsList()) {
- sb.append("outputDataSettingsList:");
- if (this.outputDataSettingsList == null) {
- sb.append("null");
- } else {
- sb.append(this.outputDataSettingsList);
- }
- 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 {
- 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 WorkflowOutputDataSettingsStandardSchemeFactory implements SchemeFactory {
- public WorkflowOutputDataSettingsStandardScheme getScheme() {
- return new WorkflowOutputDataSettingsStandardScheme();
- }
- }
-
- private static class WorkflowOutputDataSettingsStandardScheme extends StandardScheme<WorkflowOutputDataSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowOutputDataSettings 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: // OUTPUT_DATA_SETTINGS_LIST
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.outputDataSettingsList = new ArrayList<OutputDataSettings>(_list16.size);
- for (int _i17 = 0; _i17 < _list16.size; ++_i17)
- {
- OutputDataSettings _elem18;
- _elem18 = new OutputDataSettings();
- _elem18.read(iprot);
- struct.outputDataSettingsList.add(_elem18);
- }
- iprot.readListEnd();
- }
- struct.setOutputDataSettingsListIsSet(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, WorkflowOutputDataSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.outputDataSettingsList != null) {
- if (struct.isSetOutputDataSettingsList()) {
- oprot.writeFieldBegin(OUTPUT_DATA_SETTINGS_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.outputDataSettingsList.size()));
- for (OutputDataSettings _iter19 : struct.outputDataSettingsList)
- {
- _iter19.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class WorkflowOutputDataSettingsTupleSchemeFactory implements SchemeFactory {
- public WorkflowOutputDataSettingsTupleScheme getScheme() {
- return new WorkflowOutputDataSettingsTupleScheme();
- }
- }
-
- private static class WorkflowOutputDataSettingsTupleScheme extends TupleScheme<WorkflowOutputDataSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowOutputDataSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetOutputDataSettingsList()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetOutputDataSettingsList()) {
- {
- oprot.writeI32(struct.outputDataSettingsList.size());
- for (OutputDataSettings _iter20 : struct.outputDataSettingsList)
- {
- _iter20.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowOutputDataSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.outputDataSettingsList = new ArrayList<OutputDataSettings>(_list21.size);
- for (int _i22 = 0; _i22 < _list21.size; ++_i22)
- {
- OutputDataSettings _elem23;
- _elem23 = new OutputDataSettings();
- _elem23.read(iprot);
- struct.outputDataSettingsList.add(_elem23);
- }
- }
- struct.setOutputDataSettingsListIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowSchedulingSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowSchedulingSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowSchedulingSettings.java
deleted file mode 100644
index d69763f..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowSchedulingSettings.java
+++ /dev/null
@@ -1,461 +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.experiment.execution;
-
-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;
-
-public class WorkflowSchedulingSettings implements org.apache.thrift.TBase<WorkflowSchedulingSettings, WorkflowSchedulingSettings._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowSchedulingSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowSchedulingSettings");
-
- private static final org.apache.thrift.protocol.TField NODE_SETTINGS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeSettingsList", org.apache.thrift.protocol.TType.LIST, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkflowSchedulingSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkflowSchedulingSettingsTupleSchemeFactory());
- }
-
- public List<NodeSettings> nodeSettingsList; // 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 {
- NODE_SETTINGS_LIST((short)1, "nodeSettingsList");
-
- 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: // NODE_SETTINGS_LIST
- return NODE_SETTINGS_LIST;
- 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.NODE_SETTINGS_LIST};
- 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.NODE_SETTINGS_LIST, new org.apache.thrift.meta_data.FieldMetaData("nodeSettingsList", 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, NodeSettings.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowSchedulingSettings.class, metaDataMap);
- }
-
- public WorkflowSchedulingSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public WorkflowSchedulingSettings(WorkflowSchedulingSettings other) {
- if (other.isSetNodeSettingsList()) {
- List<NodeSettings> __this__nodeSettingsList = new ArrayList<NodeSettings>(other.nodeSettingsList.size());
- for (NodeSettings other_element : other.nodeSettingsList) {
- __this__nodeSettingsList.add(new NodeSettings(other_element));
- }
- this.nodeSettingsList = __this__nodeSettingsList;
- }
- }
-
- public WorkflowSchedulingSettings deepCopy() {
- return new WorkflowSchedulingSettings(this);
- }
-
- @Override
- public void clear() {
- this.nodeSettingsList = null;
- }
-
- public int getNodeSettingsListSize() {
- return (this.nodeSettingsList == null) ? 0 : this.nodeSettingsList.size();
- }
-
- public java.util.Iterator<NodeSettings> getNodeSettingsListIterator() {
- return (this.nodeSettingsList == null) ? null : this.nodeSettingsList.iterator();
- }
-
- public void addToNodeSettingsList(NodeSettings elem) {
- if (this.nodeSettingsList == null) {
- this.nodeSettingsList = new ArrayList<NodeSettings>();
- }
- this.nodeSettingsList.add(elem);
- }
-
- public List<NodeSettings> getNodeSettingsList() {
- return this.nodeSettingsList;
- }
-
- public WorkflowSchedulingSettings setNodeSettingsList(List<NodeSettings> nodeSettingsList) {
- this.nodeSettingsList = nodeSettingsList;
- return this;
- }
-
- public void unsetNodeSettingsList() {
- this.nodeSettingsList = null;
- }
-
- /** Returns true if field nodeSettingsList is set (has been assigned a value) and false otherwise */
- public boolean isSetNodeSettingsList() {
- return this.nodeSettingsList != null;
- }
-
- public void setNodeSettingsListIsSet(boolean value) {
- if (!value) {
- this.nodeSettingsList = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NODE_SETTINGS_LIST:
- if (value == null) {
- unsetNodeSettingsList();
- } else {
- setNodeSettingsList((List<NodeSettings>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NODE_SETTINGS_LIST:
- return getNodeSettingsList();
-
- }
- 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 NODE_SETTINGS_LIST:
- return isSetNodeSettingsList();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof WorkflowSchedulingSettings)
- return this.equals((WorkflowSchedulingSettings)that);
- return false;
- }
-
- public boolean equals(WorkflowSchedulingSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_nodeSettingsList = true && this.isSetNodeSettingsList();
- boolean that_present_nodeSettingsList = true && that.isSetNodeSettingsList();
- if (this_present_nodeSettingsList || that_present_nodeSettingsList) {
- if (!(this_present_nodeSettingsList && that_present_nodeSettingsList))
- return false;
- if (!this.nodeSettingsList.equals(that.nodeSettingsList))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(WorkflowSchedulingSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNodeSettingsList()).compareTo(other.isSetNodeSettingsList());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNodeSettingsList()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeSettingsList, other.nodeSettingsList);
- 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("WorkflowSchedulingSettings(");
- boolean first = true;
-
- if (isSetNodeSettingsList()) {
- sb.append("nodeSettingsList:");
- if (this.nodeSettingsList == null) {
- sb.append("null");
- } else {
- sb.append(this.nodeSettingsList);
- }
- 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 {
- 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 WorkflowSchedulingSettingsStandardSchemeFactory implements SchemeFactory {
- public WorkflowSchedulingSettingsStandardScheme getScheme() {
- return new WorkflowSchedulingSettingsStandardScheme();
- }
- }
-
- private static class WorkflowSchedulingSettingsStandardScheme extends StandardScheme<WorkflowSchedulingSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowSchedulingSettings 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: // NODE_SETTINGS_LIST
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.nodeSettingsList = new ArrayList<NodeSettings>(_list8.size);
- for (int _i9 = 0; _i9 < _list8.size; ++_i9)
- {
- NodeSettings _elem10;
- _elem10 = new NodeSettings();
- _elem10.read(iprot);
- struct.nodeSettingsList.add(_elem10);
- }
- iprot.readListEnd();
- }
- struct.setNodeSettingsListIsSet(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, WorkflowSchedulingSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.nodeSettingsList != null) {
- if (struct.isSetNodeSettingsList()) {
- oprot.writeFieldBegin(NODE_SETTINGS_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nodeSettingsList.size()));
- for (NodeSettings _iter11 : struct.nodeSettingsList)
- {
- _iter11.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class WorkflowSchedulingSettingsTupleSchemeFactory implements SchemeFactory {
- public WorkflowSchedulingSettingsTupleScheme getScheme() {
- return new WorkflowSchedulingSettingsTupleScheme();
- }
- }
-
- private static class WorkflowSchedulingSettingsTupleScheme extends TupleScheme<WorkflowSchedulingSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowSchedulingSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNodeSettingsList()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetNodeSettingsList()) {
- {
- oprot.writeI32(struct.nodeSettingsList.size());
- for (NodeSettings _iter12 : struct.nodeSettingsList)
- {
- _iter12.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowSchedulingSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.nodeSettingsList = new ArrayList<NodeSettings>(_list13.size);
- for (int _i14 = 0; _i14 < _list13.size; ++_i14)
- {
- NodeSettings _elem15;
- _elem15 = new NodeSettings();
- _elem15.read(iprot);
- struct.nodeSettingsList.add(_elem15);
- }
- }
- struct.setNodeSettingsListIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/resources/interpreter.thrift
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/resources/interpreter.thrift b/modules/thrift/interpreter-service/src/main/resources/interpreter.thrift
deleted file mode 100644
index d7d618c..0000000
--- a/modules/thrift/interpreter-service/src/main/resources/interpreter.thrift
+++ /dev/null
@@ -1,117 +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.experiment.execution
-
-
-struct HPCSettings {
- 1:optional string jobManager;
- 2:optional i32 cpuCount;
- 3:optional i32 nodeCount;
- 4:optional string queueName;
- 5:optional i32 maxWalltime;
-}
-
-struct HostSchedulingSettings {
- 1:optional string hostID;
- 2:optional bool isWSGramPreferred;
- 3:optional string gatekeeperEPR;
-}
-
-struct NameValuePairType {
- 1:optional string name;
- 2:optional string value;
- 3:optional string description;
-}
-
-struct NodeSettings {
- 1:optional string nodeId;
- 2:optional string serviceId;
- 3:optional HostSchedulingSettings hostSchedulingSettings;
- 4:optional HPCSettings hpcSettings;
- 5:optional list<NameValuePairType> nameValuePairList;
-}
-
-struct WorkflowSchedulingSettings {
- 1:optional list<NodeSettings> nodeSettingsList;
-}
-
-struct OutputDataSettings {
- 1:optional string nodeID;
- 2:optional string outputdataDir;
- 3:optional string dataRegURL;
- 4:optional bool isdataPersisted;
-}
-
-struct WorkflowOutputDataSettings{
- 1:optional list<OutputDataSettings> outputDataSettingsList;
-}
-
-struct SSHAuthenticationSettings {
- 1:optional string accessKeyID;
- 2:optional string secretAccessKey;
-}
-
-struct MyProxyRepositorySettings {
- 1:optional string userName;
- 2:optional string password;
- 3:optional string myproxyServer;
- 4:optional i32 lifetime;
-}
-
-struct CredentialStoreSecuritySettings {
- 1:optional string tokenId;
- 2:optional string portalUser;
- 3:optional string gatewayID;
-}
-
-struct AmazonWebServicesSettings {
- 1:optional string accessKey;
- 2:optional string amiID;
- 3:optional string instanceID;
- 4:optional string instanceType;
- 5:optional string secretAccessKey;
- 6:optional string username;
-}
-
-struct SecuritySettings {
- 1:optional AmazonWebServicesSettings amazonWSSettings;
- 2:optional CredentialStoreSecuritySettings credentialStoreSettings;
- 3:optional MyProxyRepositorySettings myproxySettings;
- 4:optional SSHAuthenticationSettings sshAuthSettings;
-}
-
-struct ExperimentAdvanceOptions {
- 1:optional string executionUser;
- 2:optional string metadata;
- 3:optional string experimentName;
- 4:optional string customExperimentId;
- 5:optional WorkflowSchedulingSettings workflowSchedulingSettings;
- 6:optional WorkflowOutputDataSettings workflowOutputDataSettings;
- 7:optional SecuritySettings securitySettings;
-}
-
-service InterpreterService {
- string runExperiment(1:string workflowTemplateName, 2:map<string,string> workflowInputs, 3: ExperimentAdvanceOptions experimentAdOptions),
- void cancelExperiment(1:string experimentID),
- void suspendExperiment(1:string experimentID),
- void resumeExperiment(1:string experimentID)
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/pom.xml
----------------------------------------------------------------------
diff --git a/modules/thrift/pom.xml b/modules/thrift/pom.xml
deleted file mode 100644
index bfe3c60..0000000
--- a/modules/thrift/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <parent>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata</artifactId>
- <version>0.12-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>thrift</artifactId>
- <packaging>pom</packaging>
- <name>Airavata Thrift</name>
- <url>http://airavata.apache.org/</url>
-
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>interpreter-service</module>
- <module>interpreter-service-client</module>
- <module>interpreter-service-handler</module>
- </modules>
- </profile>
- </profiles>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- </properties>
-</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 10744f1..ec8c6ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -430,7 +430,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
- <module>modules/airavata-api</module>
+ <module>airavata-api</module>
<module>modules/gfac</module>
<module>modules/ws-messenger</module>
<module>modules/workflow-model</module>
@@ -441,7 +441,6 @@
<module>modules/security</module>
<module>modules/credential-store</module>
<module>modules/rest</module>
- <module>modules/thrift</module>
<module>modules/orchestrator</module>
<module>tools</module>
<module>samples</module>
[6/7] Removing the proof of concept interpreter thrift implementation.
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java
deleted file mode 100644
index 5a4e612..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java
+++ /dev/null
@@ -1,611 +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.experiment.execution;
-
-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;
-
-public class CredentialStoreSecuritySettings implements org.apache.thrift.TBase<CredentialStoreSecuritySettings, CredentialStoreSecuritySettings._Fields>, java.io.Serializable, Cloneable, Comparable<CredentialStoreSecuritySettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialStoreSecuritySettings");
-
- private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PORTAL_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("portalUser", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayID", 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 CredentialStoreSecuritySettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CredentialStoreSecuritySettingsTupleSchemeFactory());
- }
-
- public String tokenId; // optional
- public String portalUser; // optional
- public String gatewayID; // 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 {
- TOKEN_ID((short)1, "tokenId"),
- PORTAL_USER((short)2, "portalUser"),
- GATEWAY_ID((short)3, "gatewayID");
-
- 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: // TOKEN_ID
- return TOKEN_ID;
- case 2: // PORTAL_USER
- return PORTAL_USER;
- case 3: // GATEWAY_ID
- return GATEWAY_ID;
- 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.TOKEN_ID,_Fields.PORTAL_USER,_Fields.GATEWAY_ID};
- 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.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PORTAL_USER, new org.apache.thrift.meta_data.FieldMetaData("portalUser", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayID", 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(CredentialStoreSecuritySettings.class, metaDataMap);
- }
-
- public CredentialStoreSecuritySettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public CredentialStoreSecuritySettings(CredentialStoreSecuritySettings other) {
- if (other.isSetTokenId()) {
- this.tokenId = other.tokenId;
- }
- if (other.isSetPortalUser()) {
- this.portalUser = other.portalUser;
- }
- if (other.isSetGatewayID()) {
- this.gatewayID = other.gatewayID;
- }
- }
-
- public CredentialStoreSecuritySettings deepCopy() {
- return new CredentialStoreSecuritySettings(this);
- }
-
- @Override
- public void clear() {
- this.tokenId = null;
- this.portalUser = null;
- this.gatewayID = null;
- }
-
- public String getTokenId() {
- return this.tokenId;
- }
-
- public CredentialStoreSecuritySettings setTokenId(String tokenId) {
- this.tokenId = tokenId;
- return this;
- }
-
- public void unsetTokenId() {
- this.tokenId = null;
- }
-
- /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
- public boolean isSetTokenId() {
- return this.tokenId != null;
- }
-
- public void setTokenIdIsSet(boolean value) {
- if (!value) {
- this.tokenId = null;
- }
- }
-
- public String getPortalUser() {
- return this.portalUser;
- }
-
- public CredentialStoreSecuritySettings setPortalUser(String portalUser) {
- this.portalUser = portalUser;
- return this;
- }
-
- public void unsetPortalUser() {
- this.portalUser = null;
- }
-
- /** Returns true if field portalUser is set (has been assigned a value) and false otherwise */
- public boolean isSetPortalUser() {
- return this.portalUser != null;
- }
-
- public void setPortalUserIsSet(boolean value) {
- if (!value) {
- this.portalUser = null;
- }
- }
-
- public String getGatewayID() {
- return this.gatewayID;
- }
-
- public CredentialStoreSecuritySettings setGatewayID(String gatewayID) {
- this.gatewayID = gatewayID;
- return this;
- }
-
- public void unsetGatewayID() {
- this.gatewayID = null;
- }
-
- /** Returns true if field gatewayID is set (has been assigned a value) and false otherwise */
- public boolean isSetGatewayID() {
- return this.gatewayID != null;
- }
-
- public void setGatewayIDIsSet(boolean value) {
- if (!value) {
- this.gatewayID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN_ID:
- if (value == null) {
- unsetTokenId();
- } else {
- setTokenId((String)value);
- }
- break;
-
- case PORTAL_USER:
- if (value == null) {
- unsetPortalUser();
- } else {
- setPortalUser((String)value);
- }
- break;
-
- case GATEWAY_ID:
- if (value == null) {
- unsetGatewayID();
- } else {
- setGatewayID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN_ID:
- return getTokenId();
-
- case PORTAL_USER:
- return getPortalUser();
-
- case GATEWAY_ID:
- return getGatewayID();
-
- }
- 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 TOKEN_ID:
- return isSetTokenId();
- case PORTAL_USER:
- return isSetPortalUser();
- case GATEWAY_ID:
- return isSetGatewayID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof CredentialStoreSecuritySettings)
- return this.equals((CredentialStoreSecuritySettings)that);
- return false;
- }
-
- public boolean equals(CredentialStoreSecuritySettings that) {
- if (that == null)
- return false;
-
- boolean this_present_tokenId = true && this.isSetTokenId();
- boolean that_present_tokenId = true && that.isSetTokenId();
- if (this_present_tokenId || that_present_tokenId) {
- if (!(this_present_tokenId && that_present_tokenId))
- return false;
- if (!this.tokenId.equals(that.tokenId))
- return false;
- }
-
- boolean this_present_portalUser = true && this.isSetPortalUser();
- boolean that_present_portalUser = true && that.isSetPortalUser();
- if (this_present_portalUser || that_present_portalUser) {
- if (!(this_present_portalUser && that_present_portalUser))
- return false;
- if (!this.portalUser.equals(that.portalUser))
- return false;
- }
-
- boolean this_present_gatewayID = true && this.isSetGatewayID();
- boolean that_present_gatewayID = true && that.isSetGatewayID();
- if (this_present_gatewayID || that_present_gatewayID) {
- if (!(this_present_gatewayID && that_present_gatewayID))
- return false;
- if (!this.gatewayID.equals(that.gatewayID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(CredentialStoreSecuritySettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTokenId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPortalUser()).compareTo(other.isSetPortalUser());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPortalUser()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.portalUser, other.portalUser);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGatewayID()).compareTo(other.isSetGatewayID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGatewayID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayID, other.gatewayID);
- 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("CredentialStoreSecuritySettings(");
- boolean first = true;
-
- if (isSetTokenId()) {
- sb.append("tokenId:");
- if (this.tokenId == null) {
- sb.append("null");
- } else {
- sb.append(this.tokenId);
- }
- first = false;
- }
- if (isSetPortalUser()) {
- if (!first) sb.append(", ");
- sb.append("portalUser:");
- if (this.portalUser == null) {
- sb.append("null");
- } else {
- sb.append(this.portalUser);
- }
- first = false;
- }
- if (isSetGatewayID()) {
- if (!first) sb.append(", ");
- sb.append("gatewayID:");
- if (this.gatewayID == null) {
- sb.append("null");
- } else {
- sb.append(this.gatewayID);
- }
- 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 {
- 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 CredentialStoreSecuritySettingsStandardSchemeFactory implements SchemeFactory {
- public CredentialStoreSecuritySettingsStandardScheme getScheme() {
- return new CredentialStoreSecuritySettingsStandardScheme();
- }
- }
-
- private static class CredentialStoreSecuritySettingsStandardScheme extends StandardScheme<CredentialStoreSecuritySettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialStoreSecuritySettings 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: // TOKEN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.tokenId = iprot.readString();
- struct.setTokenIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PORTAL_USER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.portalUser = iprot.readString();
- struct.setPortalUserIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // GATEWAY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.gatewayID = iprot.readString();
- struct.setGatewayIDIsSet(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, CredentialStoreSecuritySettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.tokenId != null) {
- if (struct.isSetTokenId()) {
- oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
- oprot.writeString(struct.tokenId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.portalUser != null) {
- if (struct.isSetPortalUser()) {
- oprot.writeFieldBegin(PORTAL_USER_FIELD_DESC);
- oprot.writeString(struct.portalUser);
- oprot.writeFieldEnd();
- }
- }
- if (struct.gatewayID != null) {
- if (struct.isSetGatewayID()) {
- oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
- oprot.writeString(struct.gatewayID);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class CredentialStoreSecuritySettingsTupleSchemeFactory implements SchemeFactory {
- public CredentialStoreSecuritySettingsTupleScheme getScheme() {
- return new CredentialStoreSecuritySettingsTupleScheme();
- }
- }
-
- private static class CredentialStoreSecuritySettingsTupleScheme extends TupleScheme<CredentialStoreSecuritySettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, CredentialStoreSecuritySettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetTokenId()) {
- optionals.set(0);
- }
- if (struct.isSetPortalUser()) {
- optionals.set(1);
- }
- if (struct.isSetGatewayID()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetTokenId()) {
- oprot.writeString(struct.tokenId);
- }
- if (struct.isSetPortalUser()) {
- oprot.writeString(struct.portalUser);
- }
- if (struct.isSetGatewayID()) {
- oprot.writeString(struct.gatewayID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, CredentialStoreSecuritySettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.tokenId = iprot.readString();
- struct.setTokenIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.portalUser = iprot.readString();
- struct.setPortalUserIsSet(true);
- }
- if (incoming.get(2)) {
- struct.gatewayID = iprot.readString();
- struct.setGatewayIDIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/ExperimentAdvanceOptions.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/ExperimentAdvanceOptions.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/ExperimentAdvanceOptions.java
deleted file mode 100644
index 100a549..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/ExperimentAdvanceOptions.java
+++ /dev/null
@@ -1,1034 +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.experiment.execution;
-
-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;
-
-public class ExperimentAdvanceOptions implements org.apache.thrift.TBase<ExperimentAdvanceOptions, ExperimentAdvanceOptions._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentAdvanceOptions> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentAdvanceOptions");
-
- private static final org.apache.thrift.protocol.TField EXECUTION_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("executionUser", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("metadata", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField EXPERIMENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentName", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField CUSTOM_EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customExperimentId", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField WORKFLOW_SCHEDULING_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowSchedulingSettings", org.apache.thrift.protocol.TType.STRUCT, (short)5);
- private static final org.apache.thrift.protocol.TField WORKFLOW_OUTPUT_DATA_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowOutputDataSettings", org.apache.thrift.protocol.TType.STRUCT, (short)6);
- private static final org.apache.thrift.protocol.TField SECURITY_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("securitySettings", org.apache.thrift.protocol.TType.STRUCT, (short)7);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ExperimentAdvanceOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExperimentAdvanceOptionsTupleSchemeFactory());
- }
-
- public String executionUser; // optional
- public String metadata; // optional
- public String experimentName; // optional
- public String customExperimentId; // optional
- public WorkflowSchedulingSettings workflowSchedulingSettings; // optional
- public WorkflowOutputDataSettings workflowOutputDataSettings; // optional
- public SecuritySettings securitySettings; // 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 {
- EXECUTION_USER((short)1, "executionUser"),
- METADATA((short)2, "metadata"),
- EXPERIMENT_NAME((short)3, "experimentName"),
- CUSTOM_EXPERIMENT_ID((short)4, "customExperimentId"),
- WORKFLOW_SCHEDULING_SETTINGS((short)5, "workflowSchedulingSettings"),
- WORKFLOW_OUTPUT_DATA_SETTINGS((short)6, "workflowOutputDataSettings"),
- SECURITY_SETTINGS((short)7, "securitySettings");
-
- 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: // EXECUTION_USER
- return EXECUTION_USER;
- case 2: // METADATA
- return METADATA;
- case 3: // EXPERIMENT_NAME
- return EXPERIMENT_NAME;
- case 4: // CUSTOM_EXPERIMENT_ID
- return CUSTOM_EXPERIMENT_ID;
- case 5: // WORKFLOW_SCHEDULING_SETTINGS
- return WORKFLOW_SCHEDULING_SETTINGS;
- case 6: // WORKFLOW_OUTPUT_DATA_SETTINGS
- return WORKFLOW_OUTPUT_DATA_SETTINGS;
- case 7: // SECURITY_SETTINGS
- return SECURITY_SETTINGS;
- 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.EXECUTION_USER,_Fields.METADATA,_Fields.EXPERIMENT_NAME,_Fields.CUSTOM_EXPERIMENT_ID,_Fields.WORKFLOW_SCHEDULING_SETTINGS,_Fields.WORKFLOW_OUTPUT_DATA_SETTINGS,_Fields.SECURITY_SETTINGS};
- 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.EXECUTION_USER, new org.apache.thrift.meta_data.FieldMetaData("executionUser", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.METADATA, new org.apache.thrift.meta_data.FieldMetaData("metadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.EXPERIMENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("experimentName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.CUSTOM_EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("customExperimentId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.WORKFLOW_SCHEDULING_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("workflowSchedulingSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowSchedulingSettings.class)));
- tmpMap.put(_Fields.WORKFLOW_OUTPUT_DATA_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("workflowOutputDataSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowOutputDataSettings.class)));
- tmpMap.put(_Fields.SECURITY_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("securitySettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SecuritySettings.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentAdvanceOptions.class, metaDataMap);
- }
-
- public ExperimentAdvanceOptions() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ExperimentAdvanceOptions(ExperimentAdvanceOptions other) {
- if (other.isSetExecutionUser()) {
- this.executionUser = other.executionUser;
- }
- if (other.isSetMetadata()) {
- this.metadata = other.metadata;
- }
- if (other.isSetExperimentName()) {
- this.experimentName = other.experimentName;
- }
- if (other.isSetCustomExperimentId()) {
- this.customExperimentId = other.customExperimentId;
- }
- if (other.isSetWorkflowSchedulingSettings()) {
- this.workflowSchedulingSettings = new WorkflowSchedulingSettings(other.workflowSchedulingSettings);
- }
- if (other.isSetWorkflowOutputDataSettings()) {
- this.workflowOutputDataSettings = new WorkflowOutputDataSettings(other.workflowOutputDataSettings);
- }
- if (other.isSetSecuritySettings()) {
- this.securitySettings = new SecuritySettings(other.securitySettings);
- }
- }
-
- public ExperimentAdvanceOptions deepCopy() {
- return new ExperimentAdvanceOptions(this);
- }
-
- @Override
- public void clear() {
- this.executionUser = null;
- this.metadata = null;
- this.experimentName = null;
- this.customExperimentId = null;
- this.workflowSchedulingSettings = null;
- this.workflowOutputDataSettings = null;
- this.securitySettings = null;
- }
-
- public String getExecutionUser() {
- return this.executionUser;
- }
-
- public ExperimentAdvanceOptions setExecutionUser(String executionUser) {
- this.executionUser = executionUser;
- return this;
- }
-
- public void unsetExecutionUser() {
- this.executionUser = null;
- }
-
- /** Returns true if field executionUser is set (has been assigned a value) and false otherwise */
- public boolean isSetExecutionUser() {
- return this.executionUser != null;
- }
-
- public void setExecutionUserIsSet(boolean value) {
- if (!value) {
- this.executionUser = null;
- }
- }
-
- public String getMetadata() {
- return this.metadata;
- }
-
- public ExperimentAdvanceOptions setMetadata(String metadata) {
- this.metadata = metadata;
- return this;
- }
-
- public void unsetMetadata() {
- this.metadata = null;
- }
-
- /** Returns true if field metadata is set (has been assigned a value) and false otherwise */
- public boolean isSetMetadata() {
- return this.metadata != null;
- }
-
- public void setMetadataIsSet(boolean value) {
- if (!value) {
- this.metadata = null;
- }
- }
-
- public String getExperimentName() {
- return this.experimentName;
- }
-
- public ExperimentAdvanceOptions setExperimentName(String experimentName) {
- this.experimentName = experimentName;
- return this;
- }
-
- public void unsetExperimentName() {
- this.experimentName = null;
- }
-
- /** Returns true if field experimentName is set (has been assigned a value) and false otherwise */
- public boolean isSetExperimentName() {
- return this.experimentName != null;
- }
-
- public void setExperimentNameIsSet(boolean value) {
- if (!value) {
- this.experimentName = null;
- }
- }
-
- public String getCustomExperimentId() {
- return this.customExperimentId;
- }
-
- public ExperimentAdvanceOptions setCustomExperimentId(String customExperimentId) {
- this.customExperimentId = customExperimentId;
- return this;
- }
-
- public void unsetCustomExperimentId() {
- this.customExperimentId = null;
- }
-
- /** Returns true if field customExperimentId is set (has been assigned a value) and false otherwise */
- public boolean isSetCustomExperimentId() {
- return this.customExperimentId != null;
- }
-
- public void setCustomExperimentIdIsSet(boolean value) {
- if (!value) {
- this.customExperimentId = null;
- }
- }
-
- public WorkflowSchedulingSettings getWorkflowSchedulingSettings() {
- return this.workflowSchedulingSettings;
- }
-
- public ExperimentAdvanceOptions setWorkflowSchedulingSettings(WorkflowSchedulingSettings workflowSchedulingSettings) {
- this.workflowSchedulingSettings = workflowSchedulingSettings;
- return this;
- }
-
- public void unsetWorkflowSchedulingSettings() {
- this.workflowSchedulingSettings = null;
- }
-
- /** Returns true if field workflowSchedulingSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetWorkflowSchedulingSettings() {
- return this.workflowSchedulingSettings != null;
- }
-
- public void setWorkflowSchedulingSettingsIsSet(boolean value) {
- if (!value) {
- this.workflowSchedulingSettings = null;
- }
- }
-
- public WorkflowOutputDataSettings getWorkflowOutputDataSettings() {
- return this.workflowOutputDataSettings;
- }
-
- public ExperimentAdvanceOptions setWorkflowOutputDataSettings(WorkflowOutputDataSettings workflowOutputDataSettings) {
- this.workflowOutputDataSettings = workflowOutputDataSettings;
- return this;
- }
-
- public void unsetWorkflowOutputDataSettings() {
- this.workflowOutputDataSettings = null;
- }
-
- /** Returns true if field workflowOutputDataSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetWorkflowOutputDataSettings() {
- return this.workflowOutputDataSettings != null;
- }
-
- public void setWorkflowOutputDataSettingsIsSet(boolean value) {
- if (!value) {
- this.workflowOutputDataSettings = null;
- }
- }
-
- public SecuritySettings getSecuritySettings() {
- return this.securitySettings;
- }
-
- public ExperimentAdvanceOptions setSecuritySettings(SecuritySettings securitySettings) {
- this.securitySettings = securitySettings;
- return this;
- }
-
- public void unsetSecuritySettings() {
- this.securitySettings = null;
- }
-
- /** Returns true if field securitySettings is set (has been assigned a value) and false otherwise */
- public boolean isSetSecuritySettings() {
- return this.securitySettings != null;
- }
-
- public void setSecuritySettingsIsSet(boolean value) {
- if (!value) {
- this.securitySettings = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case EXECUTION_USER:
- if (value == null) {
- unsetExecutionUser();
- } else {
- setExecutionUser((String)value);
- }
- break;
-
- case METADATA:
- if (value == null) {
- unsetMetadata();
- } else {
- setMetadata((String)value);
- }
- break;
-
- case EXPERIMENT_NAME:
- if (value == null) {
- unsetExperimentName();
- } else {
- setExperimentName((String)value);
- }
- break;
-
- case CUSTOM_EXPERIMENT_ID:
- if (value == null) {
- unsetCustomExperimentId();
- } else {
- setCustomExperimentId((String)value);
- }
- break;
-
- case WORKFLOW_SCHEDULING_SETTINGS:
- if (value == null) {
- unsetWorkflowSchedulingSettings();
- } else {
- setWorkflowSchedulingSettings((WorkflowSchedulingSettings)value);
- }
- break;
-
- case WORKFLOW_OUTPUT_DATA_SETTINGS:
- if (value == null) {
- unsetWorkflowOutputDataSettings();
- } else {
- setWorkflowOutputDataSettings((WorkflowOutputDataSettings)value);
- }
- break;
-
- case SECURITY_SETTINGS:
- if (value == null) {
- unsetSecuritySettings();
- } else {
- setSecuritySettings((SecuritySettings)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case EXECUTION_USER:
- return getExecutionUser();
-
- case METADATA:
- return getMetadata();
-
- case EXPERIMENT_NAME:
- return getExperimentName();
-
- case CUSTOM_EXPERIMENT_ID:
- return getCustomExperimentId();
-
- case WORKFLOW_SCHEDULING_SETTINGS:
- return getWorkflowSchedulingSettings();
-
- case WORKFLOW_OUTPUT_DATA_SETTINGS:
- return getWorkflowOutputDataSettings();
-
- case SECURITY_SETTINGS:
- return getSecuritySettings();
-
- }
- 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 EXECUTION_USER:
- return isSetExecutionUser();
- case METADATA:
- return isSetMetadata();
- case EXPERIMENT_NAME:
- return isSetExperimentName();
- case CUSTOM_EXPERIMENT_ID:
- return isSetCustomExperimentId();
- case WORKFLOW_SCHEDULING_SETTINGS:
- return isSetWorkflowSchedulingSettings();
- case WORKFLOW_OUTPUT_DATA_SETTINGS:
- return isSetWorkflowOutputDataSettings();
- case SECURITY_SETTINGS:
- return isSetSecuritySettings();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ExperimentAdvanceOptions)
- return this.equals((ExperimentAdvanceOptions)that);
- return false;
- }
-
- public boolean equals(ExperimentAdvanceOptions that) {
- if (that == null)
- return false;
-
- boolean this_present_executionUser = true && this.isSetExecutionUser();
- boolean that_present_executionUser = true && that.isSetExecutionUser();
- if (this_present_executionUser || that_present_executionUser) {
- if (!(this_present_executionUser && that_present_executionUser))
- return false;
- if (!this.executionUser.equals(that.executionUser))
- return false;
- }
-
- boolean this_present_metadata = true && this.isSetMetadata();
- boolean that_present_metadata = true && that.isSetMetadata();
- if (this_present_metadata || that_present_metadata) {
- if (!(this_present_metadata && that_present_metadata))
- return false;
- if (!this.metadata.equals(that.metadata))
- return false;
- }
-
- boolean this_present_experimentName = true && this.isSetExperimentName();
- boolean that_present_experimentName = true && that.isSetExperimentName();
- if (this_present_experimentName || that_present_experimentName) {
- if (!(this_present_experimentName && that_present_experimentName))
- return false;
- if (!this.experimentName.equals(that.experimentName))
- return false;
- }
-
- boolean this_present_customExperimentId = true && this.isSetCustomExperimentId();
- boolean that_present_customExperimentId = true && that.isSetCustomExperimentId();
- if (this_present_customExperimentId || that_present_customExperimentId) {
- if (!(this_present_customExperimentId && that_present_customExperimentId))
- return false;
- if (!this.customExperimentId.equals(that.customExperimentId))
- return false;
- }
-
- boolean this_present_workflowSchedulingSettings = true && this.isSetWorkflowSchedulingSettings();
- boolean that_present_workflowSchedulingSettings = true && that.isSetWorkflowSchedulingSettings();
- if (this_present_workflowSchedulingSettings || that_present_workflowSchedulingSettings) {
- if (!(this_present_workflowSchedulingSettings && that_present_workflowSchedulingSettings))
- return false;
- if (!this.workflowSchedulingSettings.equals(that.workflowSchedulingSettings))
- return false;
- }
-
- boolean this_present_workflowOutputDataSettings = true && this.isSetWorkflowOutputDataSettings();
- boolean that_present_workflowOutputDataSettings = true && that.isSetWorkflowOutputDataSettings();
- if (this_present_workflowOutputDataSettings || that_present_workflowOutputDataSettings) {
- if (!(this_present_workflowOutputDataSettings && that_present_workflowOutputDataSettings))
- return false;
- if (!this.workflowOutputDataSettings.equals(that.workflowOutputDataSettings))
- return false;
- }
-
- boolean this_present_securitySettings = true && this.isSetSecuritySettings();
- boolean that_present_securitySettings = true && that.isSetSecuritySettings();
- if (this_present_securitySettings || that_present_securitySettings) {
- if (!(this_present_securitySettings && that_present_securitySettings))
- return false;
- if (!this.securitySettings.equals(that.securitySettings))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ExperimentAdvanceOptions other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetExecutionUser()).compareTo(other.isSetExecutionUser());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExecutionUser()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionUser, other.executionUser);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMetadata()).compareTo(other.isSetMetadata());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMetadata()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadata, other.metadata);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetExperimentName()).compareTo(other.isSetExperimentName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExperimentName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentName, other.experimentName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCustomExperimentId()).compareTo(other.isSetCustomExperimentId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCustomExperimentId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customExperimentId, other.customExperimentId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetWorkflowSchedulingSettings()).compareTo(other.isSetWorkflowSchedulingSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetWorkflowSchedulingSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowSchedulingSettings, other.workflowSchedulingSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetWorkflowOutputDataSettings()).compareTo(other.isSetWorkflowOutputDataSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetWorkflowOutputDataSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowOutputDataSettings, other.workflowOutputDataSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSecuritySettings()).compareTo(other.isSetSecuritySettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSecuritySettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securitySettings, other.securitySettings);
- 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("ExperimentAdvanceOptions(");
- boolean first = true;
-
- if (isSetExecutionUser()) {
- sb.append("executionUser:");
- if (this.executionUser == null) {
- sb.append("null");
- } else {
- sb.append(this.executionUser);
- }
- first = false;
- }
- if (isSetMetadata()) {
- if (!first) sb.append(", ");
- sb.append("metadata:");
- if (this.metadata == null) {
- sb.append("null");
- } else {
- sb.append(this.metadata);
- }
- first = false;
- }
- if (isSetExperimentName()) {
- if (!first) sb.append(", ");
- sb.append("experimentName:");
- if (this.experimentName == null) {
- sb.append("null");
- } else {
- sb.append(this.experimentName);
- }
- first = false;
- }
- if (isSetCustomExperimentId()) {
- if (!first) sb.append(", ");
- sb.append("customExperimentId:");
- if (this.customExperimentId == null) {
- sb.append("null");
- } else {
- sb.append(this.customExperimentId);
- }
- first = false;
- }
- if (isSetWorkflowSchedulingSettings()) {
- if (!first) sb.append(", ");
- sb.append("workflowSchedulingSettings:");
- if (this.workflowSchedulingSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.workflowSchedulingSettings);
- }
- first = false;
- }
- if (isSetWorkflowOutputDataSettings()) {
- if (!first) sb.append(", ");
- sb.append("workflowOutputDataSettings:");
- if (this.workflowOutputDataSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.workflowOutputDataSettings);
- }
- first = false;
- }
- if (isSetSecuritySettings()) {
- if (!first) sb.append(", ");
- sb.append("securitySettings:");
- if (this.securitySettings == null) {
- sb.append("null");
- } else {
- sb.append(this.securitySettings);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (workflowSchedulingSettings != null) {
- workflowSchedulingSettings.validate();
- }
- if (workflowOutputDataSettings != null) {
- workflowOutputDataSettings.validate();
- }
- if (securitySettings != null) {
- securitySettings.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 ExperimentAdvanceOptionsStandardSchemeFactory implements SchemeFactory {
- public ExperimentAdvanceOptionsStandardScheme getScheme() {
- return new ExperimentAdvanceOptionsStandardScheme();
- }
- }
-
- private static class ExperimentAdvanceOptionsStandardScheme extends StandardScheme<ExperimentAdvanceOptions> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentAdvanceOptions 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: // EXECUTION_USER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.executionUser = iprot.readString();
- struct.setExecutionUserIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // METADATA
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.metadata = iprot.readString();
- struct.setMetadataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // EXPERIMENT_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.experimentName = iprot.readString();
- struct.setExperimentNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CUSTOM_EXPERIMENT_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.customExperimentId = iprot.readString();
- struct.setCustomExperimentIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // WORKFLOW_SCHEDULING_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.workflowSchedulingSettings = new WorkflowSchedulingSettings();
- struct.workflowSchedulingSettings.read(iprot);
- struct.setWorkflowSchedulingSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // WORKFLOW_OUTPUT_DATA_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.workflowOutputDataSettings = new WorkflowOutputDataSettings();
- struct.workflowOutputDataSettings.read(iprot);
- struct.setWorkflowOutputDataSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // SECURITY_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.securitySettings = new SecuritySettings();
- struct.securitySettings.read(iprot);
- struct.setSecuritySettingsIsSet(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, ExperimentAdvanceOptions struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.executionUser != null) {
- if (struct.isSetExecutionUser()) {
- oprot.writeFieldBegin(EXECUTION_USER_FIELD_DESC);
- oprot.writeString(struct.executionUser);
- oprot.writeFieldEnd();
- }
- }
- if (struct.metadata != null) {
- if (struct.isSetMetadata()) {
- oprot.writeFieldBegin(METADATA_FIELD_DESC);
- oprot.writeString(struct.metadata);
- oprot.writeFieldEnd();
- }
- }
- if (struct.experimentName != null) {
- if (struct.isSetExperimentName()) {
- oprot.writeFieldBegin(EXPERIMENT_NAME_FIELD_DESC);
- oprot.writeString(struct.experimentName);
- oprot.writeFieldEnd();
- }
- }
- if (struct.customExperimentId != null) {
- if (struct.isSetCustomExperimentId()) {
- oprot.writeFieldBegin(CUSTOM_EXPERIMENT_ID_FIELD_DESC);
- oprot.writeString(struct.customExperimentId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.workflowSchedulingSettings != null) {
- if (struct.isSetWorkflowSchedulingSettings()) {
- oprot.writeFieldBegin(WORKFLOW_SCHEDULING_SETTINGS_FIELD_DESC);
- struct.workflowSchedulingSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.workflowOutputDataSettings != null) {
- if (struct.isSetWorkflowOutputDataSettings()) {
- oprot.writeFieldBegin(WORKFLOW_OUTPUT_DATA_SETTINGS_FIELD_DESC);
- struct.workflowOutputDataSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.securitySettings != null) {
- if (struct.isSetSecuritySettings()) {
- oprot.writeFieldBegin(SECURITY_SETTINGS_FIELD_DESC);
- struct.securitySettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ExperimentAdvanceOptionsTupleSchemeFactory implements SchemeFactory {
- public ExperimentAdvanceOptionsTupleScheme getScheme() {
- return new ExperimentAdvanceOptionsTupleScheme();
- }
- }
-
- private static class ExperimentAdvanceOptionsTupleScheme extends TupleScheme<ExperimentAdvanceOptions> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentAdvanceOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetExecutionUser()) {
- optionals.set(0);
- }
- if (struct.isSetMetadata()) {
- optionals.set(1);
- }
- if (struct.isSetExperimentName()) {
- optionals.set(2);
- }
- if (struct.isSetCustomExperimentId()) {
- optionals.set(3);
- }
- if (struct.isSetWorkflowSchedulingSettings()) {
- optionals.set(4);
- }
- if (struct.isSetWorkflowOutputDataSettings()) {
- optionals.set(5);
- }
- if (struct.isSetSecuritySettings()) {
- optionals.set(6);
- }
- oprot.writeBitSet(optionals, 7);
- if (struct.isSetExecutionUser()) {
- oprot.writeString(struct.executionUser);
- }
- if (struct.isSetMetadata()) {
- oprot.writeString(struct.metadata);
- }
- if (struct.isSetExperimentName()) {
- oprot.writeString(struct.experimentName);
- }
- if (struct.isSetCustomExperimentId()) {
- oprot.writeString(struct.customExperimentId);
- }
- if (struct.isSetWorkflowSchedulingSettings()) {
- struct.workflowSchedulingSettings.write(oprot);
- }
- if (struct.isSetWorkflowOutputDataSettings()) {
- struct.workflowOutputDataSettings.write(oprot);
- }
- if (struct.isSetSecuritySettings()) {
- struct.securitySettings.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentAdvanceOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
- if (incoming.get(0)) {
- struct.executionUser = iprot.readString();
- struct.setExecutionUserIsSet(true);
- }
- if (incoming.get(1)) {
- struct.metadata = iprot.readString();
- struct.setMetadataIsSet(true);
- }
- if (incoming.get(2)) {
- struct.experimentName = iprot.readString();
- struct.setExperimentNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.customExperimentId = iprot.readString();
- struct.setCustomExperimentIdIsSet(true);
- }
- if (incoming.get(4)) {
- struct.workflowSchedulingSettings = new WorkflowSchedulingSettings();
- struct.workflowSchedulingSettings.read(iprot);
- struct.setWorkflowSchedulingSettingsIsSet(true);
- }
- if (incoming.get(5)) {
- struct.workflowOutputDataSettings = new WorkflowOutputDataSettings();
- struct.workflowOutputDataSettings.read(iprot);
- struct.setWorkflowOutputDataSettingsIsSet(true);
- }
- if (incoming.get(6)) {
- struct.securitySettings = new SecuritySettings();
- struct.securitySettings.read(iprot);
- struct.setSecuritySettingsIsSet(true);
- }
- }
- }
-
-}
-
[2/7] Removing the proof of concept interpreter thrift implementation.
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java
deleted file mode 100644
index 11bdc2e..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java
+++ /dev/null
@@ -1,710 +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.experiment.execution;
-
-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;
-
-public class OutputDataSettings implements org.apache.thrift.TBase<OutputDataSettings, OutputDataSettings._Fields>, java.io.Serializable, Cloneable, Comparable<OutputDataSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputDataSettings");
-
- private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField OUTPUTDATA_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("outputdataDir", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField DATA_REG_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataRegURL", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField ISDATA_PERSISTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isdataPersisted", org.apache.thrift.protocol.TType.BOOL, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OutputDataSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OutputDataSettingsTupleSchemeFactory());
- }
-
- public String nodeID; // optional
- public String outputdataDir; // optional
- public String dataRegURL; // optional
- public boolean isdataPersisted; // 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 {
- NODE_ID((short)1, "nodeID"),
- OUTPUTDATA_DIR((short)2, "outputdataDir"),
- DATA_REG_URL((short)3, "dataRegURL"),
- ISDATA_PERSISTED((short)4, "isdataPersisted");
-
- 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: // NODE_ID
- return NODE_ID;
- case 2: // OUTPUTDATA_DIR
- return OUTPUTDATA_DIR;
- case 3: // DATA_REG_URL
- return DATA_REG_URL;
- case 4: // ISDATA_PERSISTED
- return ISDATA_PERSISTED;
- 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 __ISDATAPERSISTED_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.NODE_ID,_Fields.OUTPUTDATA_DIR,_Fields.DATA_REG_URL,_Fields.ISDATA_PERSISTED};
- 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.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeID", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OUTPUTDATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("outputdataDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DATA_REG_URL, new org.apache.thrift.meta_data.FieldMetaData("dataRegURL", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ISDATA_PERSISTED, new org.apache.thrift.meta_data.FieldMetaData("isdataPersisted", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputDataSettings.class, metaDataMap);
- }
-
- public OutputDataSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public OutputDataSettings(OutputDataSettings other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetNodeID()) {
- this.nodeID = other.nodeID;
- }
- if (other.isSetOutputdataDir()) {
- this.outputdataDir = other.outputdataDir;
- }
- if (other.isSetDataRegURL()) {
- this.dataRegURL = other.dataRegURL;
- }
- this.isdataPersisted = other.isdataPersisted;
- }
-
- public OutputDataSettings deepCopy() {
- return new OutputDataSettings(this);
- }
-
- @Override
- public void clear() {
- this.nodeID = null;
- this.outputdataDir = null;
- this.dataRegURL = null;
- setIsdataPersistedIsSet(false);
- this.isdataPersisted = false;
- }
-
- public String getNodeID() {
- return this.nodeID;
- }
-
- public OutputDataSettings setNodeID(String nodeID) {
- this.nodeID = nodeID;
- return this;
- }
-
- public void unsetNodeID() {
- this.nodeID = null;
- }
-
- /** Returns true if field nodeID is set (has been assigned a value) and false otherwise */
- public boolean isSetNodeID() {
- return this.nodeID != null;
- }
-
- public void setNodeIDIsSet(boolean value) {
- if (!value) {
- this.nodeID = null;
- }
- }
-
- public String getOutputdataDir() {
- return this.outputdataDir;
- }
-
- public OutputDataSettings setOutputdataDir(String outputdataDir) {
- this.outputdataDir = outputdataDir;
- return this;
- }
-
- public void unsetOutputdataDir() {
- this.outputdataDir = null;
- }
-
- /** Returns true if field outputdataDir is set (has been assigned a value) and false otherwise */
- public boolean isSetOutputdataDir() {
- return this.outputdataDir != null;
- }
-
- public void setOutputdataDirIsSet(boolean value) {
- if (!value) {
- this.outputdataDir = null;
- }
- }
-
- public String getDataRegURL() {
- return this.dataRegURL;
- }
-
- public OutputDataSettings setDataRegURL(String dataRegURL) {
- this.dataRegURL = dataRegURL;
- return this;
- }
-
- public void unsetDataRegURL() {
- this.dataRegURL = null;
- }
-
- /** Returns true if field dataRegURL is set (has been assigned a value) and false otherwise */
- public boolean isSetDataRegURL() {
- return this.dataRegURL != null;
- }
-
- public void setDataRegURLIsSet(boolean value) {
- if (!value) {
- this.dataRegURL = null;
- }
- }
-
- public boolean isIsdataPersisted() {
- return this.isdataPersisted;
- }
-
- public OutputDataSettings setIsdataPersisted(boolean isdataPersisted) {
- this.isdataPersisted = isdataPersisted;
- setIsdataPersistedIsSet(true);
- return this;
- }
-
- public void unsetIsdataPersisted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDATAPERSISTED_ISSET_ID);
- }
-
- /** Returns true if field isdataPersisted is set (has been assigned a value) and false otherwise */
- public boolean isSetIsdataPersisted() {
- return EncodingUtils.testBit(__isset_bitfield, __ISDATAPERSISTED_ISSET_ID);
- }
-
- public void setIsdataPersistedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDATAPERSISTED_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NODE_ID:
- if (value == null) {
- unsetNodeID();
- } else {
- setNodeID((String)value);
- }
- break;
-
- case OUTPUTDATA_DIR:
- if (value == null) {
- unsetOutputdataDir();
- } else {
- setOutputdataDir((String)value);
- }
- break;
-
- case DATA_REG_URL:
- if (value == null) {
- unsetDataRegURL();
- } else {
- setDataRegURL((String)value);
- }
- break;
-
- case ISDATA_PERSISTED:
- if (value == null) {
- unsetIsdataPersisted();
- } else {
- setIsdataPersisted((Boolean)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NODE_ID:
- return getNodeID();
-
- case OUTPUTDATA_DIR:
- return getOutputdataDir();
-
- case DATA_REG_URL:
- return getDataRegURL();
-
- case ISDATA_PERSISTED:
- return Boolean.valueOf(isIsdataPersisted());
-
- }
- 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 NODE_ID:
- return isSetNodeID();
- case OUTPUTDATA_DIR:
- return isSetOutputdataDir();
- case DATA_REG_URL:
- return isSetDataRegURL();
- case ISDATA_PERSISTED:
- return isSetIsdataPersisted();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof OutputDataSettings)
- return this.equals((OutputDataSettings)that);
- return false;
- }
-
- public boolean equals(OutputDataSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_nodeID = true && this.isSetNodeID();
- boolean that_present_nodeID = true && that.isSetNodeID();
- if (this_present_nodeID || that_present_nodeID) {
- if (!(this_present_nodeID && that_present_nodeID))
- return false;
- if (!this.nodeID.equals(that.nodeID))
- return false;
- }
-
- boolean this_present_outputdataDir = true && this.isSetOutputdataDir();
- boolean that_present_outputdataDir = true && that.isSetOutputdataDir();
- if (this_present_outputdataDir || that_present_outputdataDir) {
- if (!(this_present_outputdataDir && that_present_outputdataDir))
- return false;
- if (!this.outputdataDir.equals(that.outputdataDir))
- return false;
- }
-
- boolean this_present_dataRegURL = true && this.isSetDataRegURL();
- boolean that_present_dataRegURL = true && that.isSetDataRegURL();
- if (this_present_dataRegURL || that_present_dataRegURL) {
- if (!(this_present_dataRegURL && that_present_dataRegURL))
- return false;
- if (!this.dataRegURL.equals(that.dataRegURL))
- return false;
- }
-
- boolean this_present_isdataPersisted = true && this.isSetIsdataPersisted();
- boolean that_present_isdataPersisted = true && that.isSetIsdataPersisted();
- if (this_present_isdataPersisted || that_present_isdataPersisted) {
- if (!(this_present_isdataPersisted && that_present_isdataPersisted))
- return false;
- if (this.isdataPersisted != that.isdataPersisted)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(OutputDataSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNodeID()).compareTo(other.isSetNodeID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNodeID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeID, other.nodeID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOutputdataDir()).compareTo(other.isSetOutputdataDir());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOutputdataDir()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.outputdataDir, other.outputdataDir);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDataRegURL()).compareTo(other.isSetDataRegURL());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDataRegURL()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataRegURL, other.dataRegURL);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsdataPersisted()).compareTo(other.isSetIsdataPersisted());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsdataPersisted()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isdataPersisted, other.isdataPersisted);
- 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("OutputDataSettings(");
- boolean first = true;
-
- if (isSetNodeID()) {
- sb.append("nodeID:");
- if (this.nodeID == null) {
- sb.append("null");
- } else {
- sb.append(this.nodeID);
- }
- first = false;
- }
- if (isSetOutputdataDir()) {
- if (!first) sb.append(", ");
- sb.append("outputdataDir:");
- if (this.outputdataDir == null) {
- sb.append("null");
- } else {
- sb.append(this.outputdataDir);
- }
- first = false;
- }
- if (isSetDataRegURL()) {
- if (!first) sb.append(", ");
- sb.append("dataRegURL:");
- if (this.dataRegURL == null) {
- sb.append("null");
- } else {
- sb.append(this.dataRegURL);
- }
- first = false;
- }
- if (isSetIsdataPersisted()) {
- if (!first) sb.append(", ");
- sb.append("isdataPersisted:");
- sb.append(this.isdataPersisted);
- 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 OutputDataSettingsStandardSchemeFactory implements SchemeFactory {
- public OutputDataSettingsStandardScheme getScheme() {
- return new OutputDataSettingsStandardScheme();
- }
- }
-
- private static class OutputDataSettingsStandardScheme extends StandardScheme<OutputDataSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, OutputDataSettings 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: // NODE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.nodeID = iprot.readString();
- struct.setNodeIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // OUTPUTDATA_DIR
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.outputdataDir = iprot.readString();
- struct.setOutputdataDirIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // DATA_REG_URL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.dataRegURL = iprot.readString();
- struct.setDataRegURLIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // ISDATA_PERSISTED
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isdataPersisted = iprot.readBool();
- struct.setIsdataPersistedIsSet(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, OutputDataSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.nodeID != null) {
- if (struct.isSetNodeID()) {
- oprot.writeFieldBegin(NODE_ID_FIELD_DESC);
- oprot.writeString(struct.nodeID);
- oprot.writeFieldEnd();
- }
- }
- if (struct.outputdataDir != null) {
- if (struct.isSetOutputdataDir()) {
- oprot.writeFieldBegin(OUTPUTDATA_DIR_FIELD_DESC);
- oprot.writeString(struct.outputdataDir);
- oprot.writeFieldEnd();
- }
- }
- if (struct.dataRegURL != null) {
- if (struct.isSetDataRegURL()) {
- oprot.writeFieldBegin(DATA_REG_URL_FIELD_DESC);
- oprot.writeString(struct.dataRegURL);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetIsdataPersisted()) {
- oprot.writeFieldBegin(ISDATA_PERSISTED_FIELD_DESC);
- oprot.writeBool(struct.isdataPersisted);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class OutputDataSettingsTupleSchemeFactory implements SchemeFactory {
- public OutputDataSettingsTupleScheme getScheme() {
- return new OutputDataSettingsTupleScheme();
- }
- }
-
- private static class OutputDataSettingsTupleScheme extends TupleScheme<OutputDataSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, OutputDataSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNodeID()) {
- optionals.set(0);
- }
- if (struct.isSetOutputdataDir()) {
- optionals.set(1);
- }
- if (struct.isSetDataRegURL()) {
- optionals.set(2);
- }
- if (struct.isSetIsdataPersisted()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetNodeID()) {
- oprot.writeString(struct.nodeID);
- }
- if (struct.isSetOutputdataDir()) {
- oprot.writeString(struct.outputdataDir);
- }
- if (struct.isSetDataRegURL()) {
- oprot.writeString(struct.dataRegURL);
- }
- if (struct.isSetIsdataPersisted()) {
- oprot.writeBool(struct.isdataPersisted);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, OutputDataSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.nodeID = iprot.readString();
- struct.setNodeIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.outputdataDir = iprot.readString();
- struct.setOutputdataDirIsSet(true);
- }
- if (incoming.get(2)) {
- struct.dataRegURL = iprot.readString();
- struct.setDataRegURLIsSet(true);
- }
- if (incoming.get(3)) {
- struct.isdataPersisted = iprot.readBool();
- struct.setIsdataPersistedIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java
deleted file mode 100644
index 5d201d4..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java
+++ /dev/null
@@ -1,509 +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.experiment.execution;
-
-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;
-
-public class SSHAuthenticationSettings implements org.apache.thrift.TBase<SSHAuthenticationSettings, SSHAuthenticationSettings._Fields>, java.io.Serializable, Cloneable, Comparable<SSHAuthenticationSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHAuthenticationSettings");
-
- private static final org.apache.thrift.protocol.TField ACCESS_KEY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("accessKeyID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField SECRET_ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("secretAccessKey", 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 SSHAuthenticationSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SSHAuthenticationSettingsTupleSchemeFactory());
- }
-
- public String accessKeyID; // optional
- public String secretAccessKey; // 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 {
- ACCESS_KEY_ID((short)1, "accessKeyID"),
- SECRET_ACCESS_KEY((short)2, "secretAccessKey");
-
- 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: // ACCESS_KEY_ID
- return ACCESS_KEY_ID;
- case 2: // SECRET_ACCESS_KEY
- return SECRET_ACCESS_KEY;
- 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.ACCESS_KEY_ID,_Fields.SECRET_ACCESS_KEY};
- 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.ACCESS_KEY_ID, new org.apache.thrift.meta_data.FieldMetaData("accessKeyID", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SECRET_ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("secretAccessKey", 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(SSHAuthenticationSettings.class, metaDataMap);
- }
-
- public SSHAuthenticationSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SSHAuthenticationSettings(SSHAuthenticationSettings other) {
- if (other.isSetAccessKeyID()) {
- this.accessKeyID = other.accessKeyID;
- }
- if (other.isSetSecretAccessKey()) {
- this.secretAccessKey = other.secretAccessKey;
- }
- }
-
- public SSHAuthenticationSettings deepCopy() {
- return new SSHAuthenticationSettings(this);
- }
-
- @Override
- public void clear() {
- this.accessKeyID = null;
- this.secretAccessKey = null;
- }
-
- public String getAccessKeyID() {
- return this.accessKeyID;
- }
-
- public SSHAuthenticationSettings setAccessKeyID(String accessKeyID) {
- this.accessKeyID = accessKeyID;
- return this;
- }
-
- public void unsetAccessKeyID() {
- this.accessKeyID = null;
- }
-
- /** Returns true if field accessKeyID is set (has been assigned a value) and false otherwise */
- public boolean isSetAccessKeyID() {
- return this.accessKeyID != null;
- }
-
- public void setAccessKeyIDIsSet(boolean value) {
- if (!value) {
- this.accessKeyID = null;
- }
- }
-
- public String getSecretAccessKey() {
- return this.secretAccessKey;
- }
-
- public SSHAuthenticationSettings setSecretAccessKey(String secretAccessKey) {
- this.secretAccessKey = secretAccessKey;
- return this;
- }
-
- public void unsetSecretAccessKey() {
- this.secretAccessKey = null;
- }
-
- /** Returns true if field secretAccessKey is set (has been assigned a value) and false otherwise */
- public boolean isSetSecretAccessKey() {
- return this.secretAccessKey != null;
- }
-
- public void setSecretAccessKeyIsSet(boolean value) {
- if (!value) {
- this.secretAccessKey = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ACCESS_KEY_ID:
- if (value == null) {
- unsetAccessKeyID();
- } else {
- setAccessKeyID((String)value);
- }
- break;
-
- case SECRET_ACCESS_KEY:
- if (value == null) {
- unsetSecretAccessKey();
- } else {
- setSecretAccessKey((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ACCESS_KEY_ID:
- return getAccessKeyID();
-
- case SECRET_ACCESS_KEY:
- return getSecretAccessKey();
-
- }
- 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 ACCESS_KEY_ID:
- return isSetAccessKeyID();
- case SECRET_ACCESS_KEY:
- return isSetSecretAccessKey();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SSHAuthenticationSettings)
- return this.equals((SSHAuthenticationSettings)that);
- return false;
- }
-
- public boolean equals(SSHAuthenticationSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_accessKeyID = true && this.isSetAccessKeyID();
- boolean that_present_accessKeyID = true && that.isSetAccessKeyID();
- if (this_present_accessKeyID || that_present_accessKeyID) {
- if (!(this_present_accessKeyID && that_present_accessKeyID))
- return false;
- if (!this.accessKeyID.equals(that.accessKeyID))
- return false;
- }
-
- boolean this_present_secretAccessKey = true && this.isSetSecretAccessKey();
- boolean that_present_secretAccessKey = true && that.isSetSecretAccessKey();
- if (this_present_secretAccessKey || that_present_secretAccessKey) {
- if (!(this_present_secretAccessKey && that_present_secretAccessKey))
- return false;
- if (!this.secretAccessKey.equals(that.secretAccessKey))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(SSHAuthenticationSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetAccessKeyID()).compareTo(other.isSetAccessKeyID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAccessKeyID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessKeyID, other.accessKeyID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSecretAccessKey()).compareTo(other.isSetSecretAccessKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSecretAccessKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secretAccessKey, other.secretAccessKey);
- 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("SSHAuthenticationSettings(");
- boolean first = true;
-
- if (isSetAccessKeyID()) {
- sb.append("accessKeyID:");
- if (this.accessKeyID == null) {
- sb.append("null");
- } else {
- sb.append(this.accessKeyID);
- }
- first = false;
- }
- if (isSetSecretAccessKey()) {
- if (!first) sb.append(", ");
- sb.append("secretAccessKey:");
- if (this.secretAccessKey == null) {
- sb.append("null");
- } else {
- sb.append(this.secretAccessKey);
- }
- 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 {
- 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 SSHAuthenticationSettingsStandardSchemeFactory implements SchemeFactory {
- public SSHAuthenticationSettingsStandardScheme getScheme() {
- return new SSHAuthenticationSettingsStandardScheme();
- }
- }
-
- private static class SSHAuthenticationSettingsStandardScheme extends StandardScheme<SSHAuthenticationSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, SSHAuthenticationSettings 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: // ACCESS_KEY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.accessKeyID = iprot.readString();
- struct.setAccessKeyIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SECRET_ACCESS_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.secretAccessKey = iprot.readString();
- struct.setSecretAccessKeyIsSet(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, SSHAuthenticationSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.accessKeyID != null) {
- if (struct.isSetAccessKeyID()) {
- oprot.writeFieldBegin(ACCESS_KEY_ID_FIELD_DESC);
- oprot.writeString(struct.accessKeyID);
- oprot.writeFieldEnd();
- }
- }
- if (struct.secretAccessKey != null) {
- if (struct.isSetSecretAccessKey()) {
- oprot.writeFieldBegin(SECRET_ACCESS_KEY_FIELD_DESC);
- oprot.writeString(struct.secretAccessKey);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class SSHAuthenticationSettingsTupleSchemeFactory implements SchemeFactory {
- public SSHAuthenticationSettingsTupleScheme getScheme() {
- return new SSHAuthenticationSettingsTupleScheme();
- }
- }
-
- private static class SSHAuthenticationSettingsTupleScheme extends TupleScheme<SSHAuthenticationSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SSHAuthenticationSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetAccessKeyID()) {
- optionals.set(0);
- }
- if (struct.isSetSecretAccessKey()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetAccessKeyID()) {
- oprot.writeString(struct.accessKeyID);
- }
- if (struct.isSetSecretAccessKey()) {
- oprot.writeString(struct.secretAccessKey);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SSHAuthenticationSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.accessKeyID = iprot.readString();
- struct.setAccessKeyIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.secretAccessKey = iprot.readString();
- struct.setSecretAccessKeyIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java
deleted file mode 100644
index de2c622..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java
+++ /dev/null
@@ -1,733 +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.experiment.execution;
-
-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;
-
-public class SecuritySettings implements org.apache.thrift.TBase<SecuritySettings, SecuritySettings._Fields>, java.io.Serializable, Cloneable, Comparable<SecuritySettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SecuritySettings");
-
- private static final org.apache.thrift.protocol.TField AMAZON_WSSETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonWSSettings", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField CREDENTIAL_STORE_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentialStoreSettings", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift.protocol.TField MYPROXY_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("myproxySettings", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final org.apache.thrift.protocol.TField SSH_AUTH_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("sshAuthSettings", org.apache.thrift.protocol.TType.STRUCT, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SecuritySettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SecuritySettingsTupleSchemeFactory());
- }
-
- public AmazonWebServicesSettings amazonWSSettings; // optional
- public CredentialStoreSecuritySettings credentialStoreSettings; // optional
- public MyProxyRepositorySettings myproxySettings; // optional
- public SSHAuthenticationSettings sshAuthSettings; // 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 {
- AMAZON_WSSETTINGS((short)1, "amazonWSSettings"),
- CREDENTIAL_STORE_SETTINGS((short)2, "credentialStoreSettings"),
- MYPROXY_SETTINGS((short)3, "myproxySettings"),
- SSH_AUTH_SETTINGS((short)4, "sshAuthSettings");
-
- 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: // AMAZON_WSSETTINGS
- return AMAZON_WSSETTINGS;
- case 2: // CREDENTIAL_STORE_SETTINGS
- return CREDENTIAL_STORE_SETTINGS;
- case 3: // MYPROXY_SETTINGS
- return MYPROXY_SETTINGS;
- case 4: // SSH_AUTH_SETTINGS
- return SSH_AUTH_SETTINGS;
- 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.AMAZON_WSSETTINGS,_Fields.CREDENTIAL_STORE_SETTINGS,_Fields.MYPROXY_SETTINGS,_Fields.SSH_AUTH_SETTINGS};
- 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.AMAZON_WSSETTINGS, new org.apache.thrift.meta_data.FieldMetaData("amazonWSSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonWebServicesSettings.class)));
- tmpMap.put(_Fields.CREDENTIAL_STORE_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("credentialStoreSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CredentialStoreSecuritySettings.class)));
- tmpMap.put(_Fields.MYPROXY_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("myproxySettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MyProxyRepositorySettings.class)));
- tmpMap.put(_Fields.SSH_AUTH_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("sshAuthSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SSHAuthenticationSettings.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SecuritySettings.class, metaDataMap);
- }
-
- public SecuritySettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SecuritySettings(SecuritySettings other) {
- if (other.isSetAmazonWSSettings()) {
- this.amazonWSSettings = new AmazonWebServicesSettings(other.amazonWSSettings);
- }
- if (other.isSetCredentialStoreSettings()) {
- this.credentialStoreSettings = new CredentialStoreSecuritySettings(other.credentialStoreSettings);
- }
- if (other.isSetMyproxySettings()) {
- this.myproxySettings = new MyProxyRepositorySettings(other.myproxySettings);
- }
- if (other.isSetSshAuthSettings()) {
- this.sshAuthSettings = new SSHAuthenticationSettings(other.sshAuthSettings);
- }
- }
-
- public SecuritySettings deepCopy() {
- return new SecuritySettings(this);
- }
-
- @Override
- public void clear() {
- this.amazonWSSettings = null;
- this.credentialStoreSettings = null;
- this.myproxySettings = null;
- this.sshAuthSettings = null;
- }
-
- public AmazonWebServicesSettings getAmazonWSSettings() {
- return this.amazonWSSettings;
- }
-
- public SecuritySettings setAmazonWSSettings(AmazonWebServicesSettings amazonWSSettings) {
- this.amazonWSSettings = amazonWSSettings;
- return this;
- }
-
- public void unsetAmazonWSSettings() {
- this.amazonWSSettings = null;
- }
-
- /** Returns true if field amazonWSSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetAmazonWSSettings() {
- return this.amazonWSSettings != null;
- }
-
- public void setAmazonWSSettingsIsSet(boolean value) {
- if (!value) {
- this.amazonWSSettings = null;
- }
- }
-
- public CredentialStoreSecuritySettings getCredentialStoreSettings() {
- return this.credentialStoreSettings;
- }
-
- public SecuritySettings setCredentialStoreSettings(CredentialStoreSecuritySettings credentialStoreSettings) {
- this.credentialStoreSettings = credentialStoreSettings;
- return this;
- }
-
- public void unsetCredentialStoreSettings() {
- this.credentialStoreSettings = null;
- }
-
- /** Returns true if field credentialStoreSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetCredentialStoreSettings() {
- return this.credentialStoreSettings != null;
- }
-
- public void setCredentialStoreSettingsIsSet(boolean value) {
- if (!value) {
- this.credentialStoreSettings = null;
- }
- }
-
- public MyProxyRepositorySettings getMyproxySettings() {
- return this.myproxySettings;
- }
-
- public SecuritySettings setMyproxySettings(MyProxyRepositorySettings myproxySettings) {
- this.myproxySettings = myproxySettings;
- return this;
- }
-
- public void unsetMyproxySettings() {
- this.myproxySettings = null;
- }
-
- /** Returns true if field myproxySettings is set (has been assigned a value) and false otherwise */
- public boolean isSetMyproxySettings() {
- return this.myproxySettings != null;
- }
-
- public void setMyproxySettingsIsSet(boolean value) {
- if (!value) {
- this.myproxySettings = null;
- }
- }
-
- public SSHAuthenticationSettings getSshAuthSettings() {
- return this.sshAuthSettings;
- }
-
- public SecuritySettings setSshAuthSettings(SSHAuthenticationSettings sshAuthSettings) {
- this.sshAuthSettings = sshAuthSettings;
- return this;
- }
-
- public void unsetSshAuthSettings() {
- this.sshAuthSettings = null;
- }
-
- /** Returns true if field sshAuthSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetSshAuthSettings() {
- return this.sshAuthSettings != null;
- }
-
- public void setSshAuthSettingsIsSet(boolean value) {
- if (!value) {
- this.sshAuthSettings = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case AMAZON_WSSETTINGS:
- if (value == null) {
- unsetAmazonWSSettings();
- } else {
- setAmazonWSSettings((AmazonWebServicesSettings)value);
- }
- break;
-
- case CREDENTIAL_STORE_SETTINGS:
- if (value == null) {
- unsetCredentialStoreSettings();
- } else {
- setCredentialStoreSettings((CredentialStoreSecuritySettings)value);
- }
- break;
-
- case MYPROXY_SETTINGS:
- if (value == null) {
- unsetMyproxySettings();
- } else {
- setMyproxySettings((MyProxyRepositorySettings)value);
- }
- break;
-
- case SSH_AUTH_SETTINGS:
- if (value == null) {
- unsetSshAuthSettings();
- } else {
- setSshAuthSettings((SSHAuthenticationSettings)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case AMAZON_WSSETTINGS:
- return getAmazonWSSettings();
-
- case CREDENTIAL_STORE_SETTINGS:
- return getCredentialStoreSettings();
-
- case MYPROXY_SETTINGS:
- return getMyproxySettings();
-
- case SSH_AUTH_SETTINGS:
- return getSshAuthSettings();
-
- }
- 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 AMAZON_WSSETTINGS:
- return isSetAmazonWSSettings();
- case CREDENTIAL_STORE_SETTINGS:
- return isSetCredentialStoreSettings();
- case MYPROXY_SETTINGS:
- return isSetMyproxySettings();
- case SSH_AUTH_SETTINGS:
- return isSetSshAuthSettings();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SecuritySettings)
- return this.equals((SecuritySettings)that);
- return false;
- }
-
- public boolean equals(SecuritySettings that) {
- if (that == null)
- return false;
-
- boolean this_present_amazonWSSettings = true && this.isSetAmazonWSSettings();
- boolean that_present_amazonWSSettings = true && that.isSetAmazonWSSettings();
- if (this_present_amazonWSSettings || that_present_amazonWSSettings) {
- if (!(this_present_amazonWSSettings && that_present_amazonWSSettings))
- return false;
- if (!this.amazonWSSettings.equals(that.amazonWSSettings))
- return false;
- }
-
- boolean this_present_credentialStoreSettings = true && this.isSetCredentialStoreSettings();
- boolean that_present_credentialStoreSettings = true && that.isSetCredentialStoreSettings();
- if (this_present_credentialStoreSettings || that_present_credentialStoreSettings) {
- if (!(this_present_credentialStoreSettings && that_present_credentialStoreSettings))
- return false;
- if (!this.credentialStoreSettings.equals(that.credentialStoreSettings))
- return false;
- }
-
- boolean this_present_myproxySettings = true && this.isSetMyproxySettings();
- boolean that_present_myproxySettings = true && that.isSetMyproxySettings();
- if (this_present_myproxySettings || that_present_myproxySettings) {
- if (!(this_present_myproxySettings && that_present_myproxySettings))
- return false;
- if (!this.myproxySettings.equals(that.myproxySettings))
- return false;
- }
-
- boolean this_present_sshAuthSettings = true && this.isSetSshAuthSettings();
- boolean that_present_sshAuthSettings = true && that.isSetSshAuthSettings();
- if (this_present_sshAuthSettings || that_present_sshAuthSettings) {
- if (!(this_present_sshAuthSettings && that_present_sshAuthSettings))
- return false;
- if (!this.sshAuthSettings.equals(that.sshAuthSettings))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(SecuritySettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetAmazonWSSettings()).compareTo(other.isSetAmazonWSSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAmazonWSSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonWSSettings, other.amazonWSSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCredentialStoreSettings()).compareTo(other.isSetCredentialStoreSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCredentialStoreSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentialStoreSettings, other.credentialStoreSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMyproxySettings()).compareTo(other.isSetMyproxySettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMyproxySettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myproxySettings, other.myproxySettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSshAuthSettings()).compareTo(other.isSetSshAuthSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSshAuthSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshAuthSettings, other.sshAuthSettings);
- 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("SecuritySettings(");
- boolean first = true;
-
- if (isSetAmazonWSSettings()) {
- sb.append("amazonWSSettings:");
- if (this.amazonWSSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.amazonWSSettings);
- }
- first = false;
- }
- if (isSetCredentialStoreSettings()) {
- if (!first) sb.append(", ");
- sb.append("credentialStoreSettings:");
- if (this.credentialStoreSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.credentialStoreSettings);
- }
- first = false;
- }
- if (isSetMyproxySettings()) {
- if (!first) sb.append(", ");
- sb.append("myproxySettings:");
- if (this.myproxySettings == null) {
- sb.append("null");
- } else {
- sb.append(this.myproxySettings);
- }
- first = false;
- }
- if (isSetSshAuthSettings()) {
- if (!first) sb.append(", ");
- sb.append("sshAuthSettings:");
- if (this.sshAuthSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.sshAuthSettings);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (amazonWSSettings != null) {
- amazonWSSettings.validate();
- }
- if (credentialStoreSettings != null) {
- credentialStoreSettings.validate();
- }
- if (myproxySettings != null) {
- myproxySettings.validate();
- }
- if (sshAuthSettings != null) {
- sshAuthSettings.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 SecuritySettingsStandardSchemeFactory implements SchemeFactory {
- public SecuritySettingsStandardScheme getScheme() {
- return new SecuritySettingsStandardScheme();
- }
- }
-
- private static class SecuritySettingsStandardScheme extends StandardScheme<SecuritySettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, SecuritySettings 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: // AMAZON_WSSETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.amazonWSSettings = new AmazonWebServicesSettings();
- struct.amazonWSSettings.read(iprot);
- struct.setAmazonWSSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CREDENTIAL_STORE_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.credentialStoreSettings = new CredentialStoreSecuritySettings();
- struct.credentialStoreSettings.read(iprot);
- struct.setCredentialStoreSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // MYPROXY_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.myproxySettings = new MyProxyRepositorySettings();
- struct.myproxySettings.read(iprot);
- struct.setMyproxySettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // SSH_AUTH_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.sshAuthSettings = new SSHAuthenticationSettings();
- struct.sshAuthSettings.read(iprot);
- struct.setSshAuthSettingsIsSet(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, SecuritySettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.amazonWSSettings != null) {
- if (struct.isSetAmazonWSSettings()) {
- oprot.writeFieldBegin(AMAZON_WSSETTINGS_FIELD_DESC);
- struct.amazonWSSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.credentialStoreSettings != null) {
- if (struct.isSetCredentialStoreSettings()) {
- oprot.writeFieldBegin(CREDENTIAL_STORE_SETTINGS_FIELD_DESC);
- struct.credentialStoreSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.myproxySettings != null) {
- if (struct.isSetMyproxySettings()) {
- oprot.writeFieldBegin(MYPROXY_SETTINGS_FIELD_DESC);
- struct.myproxySettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.sshAuthSettings != null) {
- if (struct.isSetSshAuthSettings()) {
- oprot.writeFieldBegin(SSH_AUTH_SETTINGS_FIELD_DESC);
- struct.sshAuthSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class SecuritySettingsTupleSchemeFactory implements SchemeFactory {
- public SecuritySettingsTupleScheme getScheme() {
- return new SecuritySettingsTupleScheme();
- }
- }
-
- private static class SecuritySettingsTupleScheme extends TupleScheme<SecuritySettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SecuritySettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetAmazonWSSettings()) {
- optionals.set(0);
- }
- if (struct.isSetCredentialStoreSettings()) {
- optionals.set(1);
- }
- if (struct.isSetMyproxySettings()) {
- optionals.set(2);
- }
- if (struct.isSetSshAuthSettings()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetAmazonWSSettings()) {
- struct.amazonWSSettings.write(oprot);
- }
- if (struct.isSetCredentialStoreSettings()) {
- struct.credentialStoreSettings.write(oprot);
- }
- if (struct.isSetMyproxySettings()) {
- struct.myproxySettings.write(oprot);
- }
- if (struct.isSetSshAuthSettings()) {
- struct.sshAuthSettings.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SecuritySettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.amazonWSSettings = new AmazonWebServicesSettings();
- struct.amazonWSSettings.read(iprot);
- struct.setAmazonWSSettingsIsSet(true);
- }
- if (incoming.get(1)) {
- struct.credentialStoreSettings = new CredentialStoreSecuritySettings();
- struct.credentialStoreSettings.read(iprot);
- struct.setCredentialStoreSettingsIsSet(true);
- }
- if (incoming.get(2)) {
- struct.myproxySettings = new MyProxyRepositorySettings();
- struct.myproxySettings.read(iprot);
- struct.setMyproxySettingsIsSet(true);
- }
- if (incoming.get(3)) {
- struct.sshAuthSettings = new SSHAuthenticationSettings();
- struct.sshAuthSettings.read(iprot);
- struct.setSshAuthSettingsIsSet(true);
- }
- }
- }
-
-}
-
[7/7] git commit: Removing the proof of concept interpreter thrift
implementation.
Posted by sm...@apache.org.
Removing the proof of concept interpreter thrift implementation.
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/77d4925d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/77d4925d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/77d4925d
Branch: refs/heads/master
Commit: 77d4925d680b54568d93000b4160ec52d3d1be09
Parents: 3070c3d
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Feb 7 11:35:35 2014 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Feb 7 11:35:35 2014 -0500
----------------------------------------------------------------------
.../thrift/interpreter-service-client/pom.xml | 48 -
.../service/client/ExecutionClient.java | 47 -
.../thrift/interpreter-service-handler/pom.xml | 48 -
.../handler/InterpreterServiceHandler.java | 204 --
.../service/handler/MappingUtils.java | 157 -
.../service/handler/SimpleThriftServer.java | 48 -
modules/thrift/interpreter-service/pom.xml | 39 -
.../execution/AmazonWebServicesSettings.java | 917 -----
.../CredentialStoreSecuritySettings.java | 611 ----
.../execution/ExperimentAdvanceOptions.java | 1034 ------
.../experiment/execution/HPCSettings.java | 798 ----
.../execution/HostSchedulingSettings.java | 608 ----
.../execution/InterpreterService.java | 3427 ------------------
.../execution/MyProxyRepositorySettings.java | 710 ----
.../experiment/execution/NameValuePairType.java | 611 ----
.../experiment/execution/NodeSettings.java | 879 -----
.../execution/OutputDataSettings.java | 710 ----
.../execution/SSHAuthenticationSettings.java | 509 ---
.../experiment/execution/SecuritySettings.java | 733 ----
.../execution/WorkflowOutputDataSettings.java | 461 ---
.../execution/WorkflowSchedulingSettings.java | 461 ---
.../src/main/resources/interpreter.thrift | 117 -
modules/thrift/pom.xml | 43 -
pom.xml | 3 +-
24 files changed, 1 insertion(+), 13222 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service-client/pom.xml b/modules/thrift/interpreter-service-client/pom.xml
deleted file mode 100644
index f9782b9..0000000
--- a/modules/thrift/interpreter-service-client/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-
- <parent>
- <groupId>org.apache.airavata</groupId>
- <artifactId>thrift</artifactId>
- <version>0.12-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-interpreter-service-client</artifactId>
- <packaging>jar</packaging>
- <name>Airavata Interpreter Service Client</name>
- <url>http://airavata.apache.org/</url>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.9.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-interpreter-service</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-common-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.7.5</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java b/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java
deleted file mode 100644
index 813eea8..0000000
--- a/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java
+++ /dev/null
@@ -1,47 +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.
- *
- */
-
-package org.apache.airavata.interpreter.service.client;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.experiment.execution.InterpreterService;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TSocket;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-import org.apache.airavata.common.utils.ClientSettings;
-
-public class ExecutionClient {
- public static final int THRIFT_SERVER_PORT = 9090 ;
-
- public InterpreterService.Client getInterpreterServiceClient (){
- try {
- TTransport transport = new TSocket("localhost", THRIFT_SERVER_PORT);
- transport.open();
- TProtocol protocol = new TBinaryProtocol(transport);
- return new InterpreterService.Client(protocol);
- } catch (TTransportException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service-handler/pom.xml
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service-handler/pom.xml b/modules/thrift/interpreter-service-handler/pom.xml
deleted file mode 100644
index e2f396a..0000000
--- a/modules/thrift/interpreter-service-handler/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-
- <parent>
- <groupId>org.apache.airavata</groupId>
- <artifactId>thrift</artifactId>
- <version>0.12-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-interpreter-service-handler</artifactId>
- <packaging>jar</packaging>
- <name>Airavata Interpreter Service Handler</name>
- <url>http://airavata.apache.org/</url>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.9.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-xbaya-gui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>airavata-interpreter-service</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.7.5</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/InterpreterServiceHandler.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/InterpreterServiceHandler.java b/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/InterpreterServiceHandler.java
deleted file mode 100644
index 798291d..0000000
--- a/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/InterpreterServiceHandler.java
+++ /dev/null
@@ -1,204 +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.
- *
- */
-
-package org.apache.airavata.interpreter.service.handler;
-
-
-import org.apache.airavata.client.AiravataAPIFactory;
-import org.apache.airavata.client.AiravataAPIUtils;
-import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.experiment.execution.ExperimentAdvanceOptions;
-import org.apache.airavata.experiment.execution.InterpreterService;
-import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.ws.monitor.*;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpretorSkeleton;
-import org.apache.thrift.TException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.UUID;
-
-public class InterpreterServiceHandler implements InterpreterService.Iface{
- private static final Logger log = LoggerFactory.getLogger(InterpreterServiceHandler.class);
- private WorkflowInterpretorSkeleton interpreterService;
- private AiravataAPI airavataAPI;
-
- public String runExperiment(String workflowTemplateName, Map<String, String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions) throws TException {
- String user = getAiravataAPI().getUserManager().getAiravataUser();
- String gatewayId = getAiravataAPI().getGateway();
- String experimentID;
- Workflow workflowObj;
- try {
- workflowObj = extractWorkflow(workflowTemplateName);
- experimentID = experimentAdOptions.getCustomExperimentId();
- workflowTemplateName = workflowObj.getName();
- if (experimentID == null || experimentID.isEmpty()) {
- experimentID = workflowTemplateName + "_" + UUID.randomUUID();
- }
- experimentAdOptions.setCustomExperimentId(experimentID);
- getAiravataAPI().getProvenanceManager().setWorkflowInstanceTemplateName(experimentID, workflowTemplateName);
-
- String submissionUser = getAiravataAPI().getUserManager().getAiravataUser();
- String executionUser=experimentAdOptions.getExecutionUser();
- if (executionUser==null){
- executionUser=submissionUser;
- }
- experimentAdOptions.setExecutionUser(executionUser);
- runPreWorkflowExecutionTasks(experimentID, executionUser, experimentAdOptions.getMetadata(), experimentAdOptions.getExperimentName());
-
- EventDataListener listener = new EventDataListenerAdapter() {
- @Override
- public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-
- }
- };
-
- getExperimentMonitor(experimentID, listener).startMonitoring();
- String workflowContent = extractWorkflowContent(workflowTemplateName);
-
- return getInterpreterService().setupAndLaunch(workflowContent,
- experimentID,
- gatewayId,
- user,
- workflowInputs,
- true,
- AiravataAPIUtils.createWorkflowContextHeaderBuilder(MappingUtils.getExperimentOptionsObject(experimentAdOptions), experimentAdOptions.getExecutionUser(), user));
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public Monitor getExperimentMonitor(String experimentId, EventDataListener listener) throws AiravataAPIInvocationException {
- MonitorConfiguration monitorConfiguration;
- try {
- monitorConfiguration = new MonitorConfiguration(
- getAiravataAPI().getAiravataManager().getMessageBoxServiceURL(), experimentId,
- true, getAiravataAPI().getAiravataManager().getMessageBoxServiceURL());
- final Monitor monitor = new Monitor(monitorConfiguration);
- monitor.printRawMessage(false);
- if (listener!=null) {
- monitor.getEventDataRepository().registerEventListener(listener);
- listener.setExperimentMonitor(monitor);
- }
- if (!monitor.getExperimentId().equals(">")){
- monitor.getEventDataRepository().registerEventListener(new EventDataListenerAdapter() {
- public void notify(EventDataRepository eventDataRepo, EventData eventData) {
- if (eventData.getType()== MonitorUtil.EventType.WORKFLOW_TERMINATED || eventData.getType()== MonitorUtil.EventType.SENDING_FAULT){
- monitor.stopMonitoring();
- }
- }
- });
- }
- return monitor;
- } catch (Exception e) {
- throw new AiravataAPIInvocationException(e);
- }
- }
-
- private void runPreWorkflowExecutionTasks(String experimentId, String user,
- String metadata, String experimentName) throws AiravataAPIInvocationException {
- if (user != null) {
- getAiravataAPI().getProvenanceManager().setExperimentUser(experimentId, user);
- }
- if (metadata != null) {
- getAiravataAPI().getProvenanceManager().setExperimentMetadata(experimentId, metadata);
- }
- if (experimentName == null) {
- experimentName = experimentId;
- }
- getAiravataAPI().getProvenanceManager().setExperimentName(experimentId, experimentName);
- }
-
- private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
- Workflow workflowObj = null;
- //FIXME - There should be a better way to figure-out if the passed string is a name or an xml
- if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
- workflowObj = getAiravataAPI().getWorkflowManager().getWorkflow(workflowName);
- }else {
- try{
- workflowObj = getAiravataAPI().getWorkflowManager().getWorkflowFromString(workflowName);
- }catch (AiravataAPIInvocationException e){
- getAiravataAPI().getWorkflowManager().getWorkflow(workflowName);
- }
- }
- return workflowObj;
- }
-
- private AiravataAPI getAiravataAPI(){
- if (airavataAPI==null) {
- try {
- String systemUserName = ServerSettings.getSystemUser();
- String gateway = ServerSettings.getSystemUserGateway();
- airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
- } catch (ApplicationSettingsException e) {
- log.error("Unable to read the properties file", e);
- } catch (AiravataAPIInvocationException e) {
- log.error("Unable to create Airavata API", e);
- }
- }
- return airavataAPI;
- }
-
- private String extractWorkflowContent(String workflowName) throws AiravataAPIInvocationException {
- if(workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
- return workflowName;
- }else {
- return getAiravataAPI().getWorkflowManager().getWorkflowAsString(workflowName);
- }
- }
-
- public void cancelExperiment(String experimentID) throws TException {
- try {
- getInterpreterService().haltWorkflow(experimentID);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void suspendExperiment(String experimentID) throws TException {
- try {
- getInterpreterService().suspendWorkflow(experimentID);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void resumeExperiment(String experimentID) throws TException {
- try {
- getInterpreterService().resumeWorkflow(experimentID);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public WorkflowInterpretorSkeleton getInterpreterService() {
- if (interpreterService==null){
- interpreterService=new WorkflowInterpretorSkeleton();
- }
- return interpreterService;
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/MappingUtils.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/MappingUtils.java b/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/MappingUtils.java
deleted file mode 100644
index 5f4beae..0000000
--- a/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/MappingUtils.java
+++ /dev/null
@@ -1,157 +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.
- *
- */
-
-package org.apache.airavata.interpreter.service.handler;
-
-import org.apache.airavata.client.api.*;
-import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.impl.*;
-import org.apache.airavata.client.tools.NameValuePairType;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class MappingUtils {
- public static ExperimentAdvanceOptions getExperimentOptionsObject(org.apache.airavata.experiment.execution.ExperimentAdvanceOptions advanceOptions){
- try {
- ExperimentAdvanceOptions experimentAdvanceOptions = new ExperimentAdvanceOptions();
- experimentAdvanceOptions.setCustomExperimentId(advanceOptions.getCustomExperimentId());
- experimentAdvanceOptions.setExperimentExecutionUser(advanceOptions.getExecutionUser());
- experimentAdvanceOptions.setExperimentCustomMetadata(advanceOptions.getMetadata());
- experimentAdvanceOptions.setExperimentName(advanceOptions.getExperimentName());
-
- if (advanceOptions.getWorkflowSchedulingSettings() != null){
- List<org.apache.airavata.experiment.execution.NodeSettings> nodeSettingsList = advanceOptions.getWorkflowSchedulingSettings().getNodeSettingsList();
- for (org.apache.airavata.experiment.execution.NodeSettings nodeSettings : nodeSettingsList){
- NodeSettings n = getNodeSettingObject(nodeSettings);
- org.apache.airavata.experiment.execution.HPCSettings hpcSettings = nodeSettings.getHpcSettings();
- HPCSettings hpcSettingsObject = getHPCSettingsObject(hpcSettings);
- n.setHPCSettings(hpcSettingsObject);
- org.apache.airavata.experiment.execution.HostSchedulingSettings hostSchedulingSettings = nodeSettings.getHostSchedulingSettings();
- HostSchedulingSettings hostSchedulingSettingsObj = getHostSchedulingSettingsObj(hostSchedulingSettings);
- n.setHostSettings(hostSchedulingSettingsObj);
- experimentAdvanceOptions.getCustomWorkflowSchedulingSettings().addNewNodeSettings(n);
- }
- }
-
- org.apache.airavata.experiment.execution.WorkflowOutputDataSettings workflowOutputDataSettings = advanceOptions.getWorkflowOutputDataSettings();
- if (workflowOutputDataSettings != null){
- WorkflowOutputDataSettings dataSettings = getWorkflowOutputDataSettingsObject(workflowOutputDataSettings);
- experimentAdvanceOptions.getCustomWorkflowOutputDataSettings().addNewOutputDataSettings(dataSettings.getOutputDataSettingsList());
- }
-
- SecuritySettings securitySettings = experimentAdvanceOptions.getCustomSecuritySettings();
- org.apache.airavata.experiment.execution.SecuritySettings securitySettings1 = advanceOptions.getSecuritySettings();
- if (securitySettings != null && securitySettings1 != null){
- AmazonWebServicesSettings amazonWSSettings = securitySettings.getAmazonWSSettings();
- if (amazonWSSettings != null){
- amazonWSSettings.setAccessKeyId(securitySettings1.getAmazonWSSettings().getAccessKey());
- amazonWSSettings.setAMIId(securitySettings1.getAmazonWSSettings().getAmiID());
- amazonWSSettings.setInstanceId(securitySettings1.getAmazonWSSettings().getInstanceID());
- amazonWSSettings.setInstanceType(securitySettings1.getAmazonWSSettings().getInstanceType());
- amazonWSSettings.setSecretAccessKey(securitySettings1.getAmazonWSSettings().getSecretAccessKey());
- amazonWSSettings.setUsername(securitySettings1.getAmazonWSSettings().getUsername());
- }
- CredentialStoreSecuritySettings storeSecuritySettings = securitySettings.getCredentialStoreSecuritySettings();
- if (storeSecuritySettings != null){
- storeSecuritySettings.setGatewayId(securitySettings1.getCredentialStoreSettings().getGatewayID());
- storeSecuritySettings.setPortalUser(securitySettings1.getCredentialStoreSettings().getPortalUser());
- storeSecuritySettings.setTokenId(securitySettings1.getCredentialStoreSettings().getTokenId());
- }
-
-// GridMyProxyRepositorySettings myProxyRepositorySettings = securitySettings.getGridMyProxyRepositorySettings();
-// if (myProxyRepositorySettings != null){
-// myProxyRepositorySettings.setUsername(securitySettings1.getMyproxySettings().getUserName());
-// myProxyRepositorySettings.setPassword(securitySettings1.getMyproxySettings().getPassword());
-// myProxyRepositorySettings.setLifeTime(securitySettings1.getMyproxySettings().getLifetime());
-// myProxyRepositorySettings.setMyProxyServer(securitySettings1.getMyproxySettings().getMyproxyServer());
-// }
-//
-// SSHAuthenticationSettings authenticationSettings = securitySettings.getSSHAuthenticationSettings();
-// if (authenticationSettings != null){
-// authenticationSettings.setAccessKeyId(securitySettings1.getSshAuthSettings().getAccessKeyID());
-// authenticationSettings.setSecretAccessKey(securitySettings1.getSshAuthSettings().getSecretAccessKey());
-// }
- }
- return experimentAdvanceOptions;
- } catch (AiravataAPIInvocationException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-
- public static NodeSettingsImpl getNodeSettingObject (org.apache.airavata.experiment.execution.NodeSettings nodeSettings){
- NodeSettings n = new NodeSettingsImpl(nodeSettings.getNodeId());
- n.setServiceId(nodeSettings.getServiceId());
- List<NameValuePairType> nameValuePairTypes = new ArrayList<NameValuePairType>();
- List<org.apache.airavata.experiment.execution.NameValuePairType> nameValuePairList = nodeSettings.getNameValuePairList();
- for (org.apache.airavata.experiment.execution.NameValuePairType np : nameValuePairList) {
- NameValuePairType nameValuePairObject = getNameValuePairObject(np);
- nameValuePairTypes.add(nameValuePairObject);
- }
- n.setNameValuePair(nameValuePairTypes);
- return (NodeSettingsImpl)n;
-
- }
-
- public static NameValuePairType getNameValuePairObject(org.apache.airavata.experiment.execution.NameValuePairType nameValuePairType){
- NameValuePairType nameValuePair = new NameValuePairType();
- nameValuePair.setName(nameValuePairType.getName());
- nameValuePair.setValue(nameValuePairType.getValue());
- nameValuePair.setDescription(nameValuePairType.getDescription());
- return nameValuePair;
- }
-
- public static HPCSettings getHPCSettingsObject (org.apache.airavata.experiment.execution.HPCSettings hsettings){
- HPCSettings hpcSettings = new HPCSettingsImpl();
- hpcSettings.setCPUCount(hsettings.getCpuCount());
- hpcSettings.setJobManager(hsettings.getJobManager());
- hpcSettings.setMaxWallTime(hsettings.getMaxWalltime());
- hpcSettings.setNodeCount(hsettings.getNodeCount());
- hpcSettings.setQueueName(hsettings.getQueueName());
- return hpcSettings;
- }
-
- public static HostSchedulingSettings getHostSchedulingSettingsObj (org.apache.airavata.experiment.execution.HostSchedulingSettings schedulingSettings){
- HostSchedulingSettings hostSchedulingSettings = new HostSchedulingSettingsImpl();
- hostSchedulingSettings.setHostId(schedulingSettings.getHostID());
- hostSchedulingSettings.setGatekeeperEPR(schedulingSettings.getGatekeeperEPR());
- hostSchedulingSettings.setWSGramPreffered(schedulingSettings.isIsWSGramPreferred());
- return hostSchedulingSettings;
- }
-
- public static WorkflowOutputDataSettings getWorkflowOutputDataSettingsObject(org.apache.airavata.experiment.execution.WorkflowOutputDataSettings wfods) {
- WorkflowOutputDataSettings wfOutDataSettings = new WorkflowOutputDataSettingsImpl();
- List<org.apache.airavata.experiment.execution.OutputDataSettings> dataSettingsList = wfods.getOutputDataSettingsList();
- for (org.apache.airavata.experiment.execution.OutputDataSettings outPutDSettng : dataSettingsList) {
- OutputDataSettings outputDataSettings = new ApplicationOutputDataSettingsImpl(outPutDSettng.getNodeID());
- outputDataSettings.setDataPersistent(outPutDSettng.isIsdataPersisted());
- outputDataSettings.setDataRegistryUrl(outPutDSettng.getDataRegURL());
- outputDataSettings.setOutputDataDirectory(outPutDSettng.getOutputdataDir());
- wfOutDataSettings.addNewOutputDataSettings(outputDataSettings);
- }
- return wfOutDataSettings;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/SimpleThriftServer.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/SimpleThriftServer.java b/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/SimpleThriftServer.java
deleted file mode 100644
index 5968349..0000000
--- a/modules/thrift/interpreter-service-handler/src/main/java/org/apache/airavata/interpreter/service/handler/SimpleThriftServer.java
+++ /dev/null
@@ -1,48 +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.
- *
- */
-
-package org.apache.airavata.interpreter.service.handler;
-
-import org.apache.airavata.experiment.execution.InterpreterService;
-import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TSimpleServer;
-import org.apache.thrift.transport.TServerSocket;
-import org.apache.thrift.transport.TServerTransport;
-
-public class SimpleThriftServer {
- public static void StartsimpleServer(InterpreterService.Processor<InterpreterServiceHandler> processor) {
- try {
- TServerTransport serverTransport = new TServerSocket(9090);
- TServer server = new TSimpleServer(
- new TServer.Args(serverTransport).processor(processor));
-
- System.out.println("Starting the simple server...");
- server.serve();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void main(String[] args) {
- InterpreterService.Processor<InterpreterServiceHandler> processor = new InterpreterService.Processor<InterpreterServiceHandler>(new InterpreterServiceHandler());
- StartsimpleServer(processor);
- }
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/pom.xml b/modules/thrift/interpreter-service/pom.xml
deleted file mode 100644
index e4211c9..0000000
--- a/modules/thrift/interpreter-service/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--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. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-
- <parent>
- <groupId>org.apache.airavata</groupId>
- <artifactId>thrift</artifactId>
- <version>0.12-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>airavata-interpreter-service</artifactId>
- <packaging>jar</packaging>
- <name>Airavata Interpreter Service</name>
- <url>http://airavata.apache.org/</url>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.9.1</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.7.5</version>
- </dependency>
-
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java
deleted file mode 100644
index d1a16eb..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java
+++ /dev/null
@@ -1,917 +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.experiment.execution;
-
-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;
-
-public class AmazonWebServicesSettings implements org.apache.thrift.TBase<AmazonWebServicesSettings, AmazonWebServicesSettings._Fields>, java.io.Serializable, Cloneable, Comparable<AmazonWebServicesSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AmazonWebServicesSettings");
-
- private static final org.apache.thrift.protocol.TField ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("accessKey", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField AMI_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("amiID", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceID", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField INSTANCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceType", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField SECRET_ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("secretAccessKey", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", 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 AmazonWebServicesSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AmazonWebServicesSettingsTupleSchemeFactory());
- }
-
- public String accessKey; // optional
- public String amiID; // optional
- public String instanceID; // optional
- public String instanceType; // optional
- public String secretAccessKey; // optional
- public String username; // 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 {
- ACCESS_KEY((short)1, "accessKey"),
- AMI_ID((short)2, "amiID"),
- INSTANCE_ID((short)3, "instanceID"),
- INSTANCE_TYPE((short)4, "instanceType"),
- SECRET_ACCESS_KEY((short)5, "secretAccessKey"),
- USERNAME((short)6, "username");
-
- 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: // ACCESS_KEY
- return ACCESS_KEY;
- case 2: // AMI_ID
- return AMI_ID;
- case 3: // INSTANCE_ID
- return INSTANCE_ID;
- case 4: // INSTANCE_TYPE
- return INSTANCE_TYPE;
- case 5: // SECRET_ACCESS_KEY
- return SECRET_ACCESS_KEY;
- case 6: // USERNAME
- return USERNAME;
- 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.ACCESS_KEY,_Fields.AMI_ID,_Fields.INSTANCE_ID,_Fields.INSTANCE_TYPE,_Fields.SECRET_ACCESS_KEY,_Fields.USERNAME};
- 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.ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("accessKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.AMI_ID, new org.apache.thrift.meta_data.FieldMetaData("amiID", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("instanceID", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.INSTANCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("instanceType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SECRET_ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("secretAccessKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", 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(AmazonWebServicesSettings.class, metaDataMap);
- }
-
- public AmazonWebServicesSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AmazonWebServicesSettings(AmazonWebServicesSettings other) {
- if (other.isSetAccessKey()) {
- this.accessKey = other.accessKey;
- }
- if (other.isSetAmiID()) {
- this.amiID = other.amiID;
- }
- if (other.isSetInstanceID()) {
- this.instanceID = other.instanceID;
- }
- if (other.isSetInstanceType()) {
- this.instanceType = other.instanceType;
- }
- if (other.isSetSecretAccessKey()) {
- this.secretAccessKey = other.secretAccessKey;
- }
- if (other.isSetUsername()) {
- this.username = other.username;
- }
- }
-
- public AmazonWebServicesSettings deepCopy() {
- return new AmazonWebServicesSettings(this);
- }
-
- @Override
- public void clear() {
- this.accessKey = null;
- this.amiID = null;
- this.instanceID = null;
- this.instanceType = null;
- this.secretAccessKey = null;
- this.username = null;
- }
-
- public String getAccessKey() {
- return this.accessKey;
- }
-
- public AmazonWebServicesSettings setAccessKey(String accessKey) {
- this.accessKey = accessKey;
- return this;
- }
-
- public void unsetAccessKey() {
- this.accessKey = null;
- }
-
- /** Returns true if field accessKey is set (has been assigned a value) and false otherwise */
- public boolean isSetAccessKey() {
- return this.accessKey != null;
- }
-
- public void setAccessKeyIsSet(boolean value) {
- if (!value) {
- this.accessKey = null;
- }
- }
-
- public String getAmiID() {
- return this.amiID;
- }
-
- public AmazonWebServicesSettings setAmiID(String amiID) {
- this.amiID = amiID;
- return this;
- }
-
- public void unsetAmiID() {
- this.amiID = null;
- }
-
- /** Returns true if field amiID is set (has been assigned a value) and false otherwise */
- public boolean isSetAmiID() {
- return this.amiID != null;
- }
-
- public void setAmiIDIsSet(boolean value) {
- if (!value) {
- this.amiID = null;
- }
- }
-
- public String getInstanceID() {
- return this.instanceID;
- }
-
- public AmazonWebServicesSettings setInstanceID(String instanceID) {
- this.instanceID = instanceID;
- return this;
- }
-
- public void unsetInstanceID() {
- this.instanceID = null;
- }
-
- /** Returns true if field instanceID is set (has been assigned a value) and false otherwise */
- public boolean isSetInstanceID() {
- return this.instanceID != null;
- }
-
- public void setInstanceIDIsSet(boolean value) {
- if (!value) {
- this.instanceID = null;
- }
- }
-
- public String getInstanceType() {
- return this.instanceType;
- }
-
- public AmazonWebServicesSettings setInstanceType(String instanceType) {
- this.instanceType = instanceType;
- return this;
- }
-
- public void unsetInstanceType() {
- this.instanceType = null;
- }
-
- /** Returns true if field instanceType is set (has been assigned a value) and false otherwise */
- public boolean isSetInstanceType() {
- return this.instanceType != null;
- }
-
- public void setInstanceTypeIsSet(boolean value) {
- if (!value) {
- this.instanceType = null;
- }
- }
-
- public String getSecretAccessKey() {
- return this.secretAccessKey;
- }
-
- public AmazonWebServicesSettings setSecretAccessKey(String secretAccessKey) {
- this.secretAccessKey = secretAccessKey;
- return this;
- }
-
- public void unsetSecretAccessKey() {
- this.secretAccessKey = null;
- }
-
- /** Returns true if field secretAccessKey is set (has been assigned a value) and false otherwise */
- public boolean isSetSecretAccessKey() {
- return this.secretAccessKey != null;
- }
-
- public void setSecretAccessKeyIsSet(boolean value) {
- if (!value) {
- this.secretAccessKey = null;
- }
- }
-
- public String getUsername() {
- return this.username;
- }
-
- public AmazonWebServicesSettings setUsername(String username) {
- this.username = username;
- return this;
- }
-
- public void unsetUsername() {
- this.username = null;
- }
-
- /** Returns true if field username is set (has been assigned a value) and false otherwise */
- public boolean isSetUsername() {
- return this.username != null;
- }
-
- public void setUsernameIsSet(boolean value) {
- if (!value) {
- this.username = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ACCESS_KEY:
- if (value == null) {
- unsetAccessKey();
- } else {
- setAccessKey((String)value);
- }
- break;
-
- case AMI_ID:
- if (value == null) {
- unsetAmiID();
- } else {
- setAmiID((String)value);
- }
- break;
-
- case INSTANCE_ID:
- if (value == null) {
- unsetInstanceID();
- } else {
- setInstanceID((String)value);
- }
- break;
-
- case INSTANCE_TYPE:
- if (value == null) {
- unsetInstanceType();
- } else {
- setInstanceType((String)value);
- }
- break;
-
- case SECRET_ACCESS_KEY:
- if (value == null) {
- unsetSecretAccessKey();
- } else {
- setSecretAccessKey((String)value);
- }
- break;
-
- case USERNAME:
- if (value == null) {
- unsetUsername();
- } else {
- setUsername((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ACCESS_KEY:
- return getAccessKey();
-
- case AMI_ID:
- return getAmiID();
-
- case INSTANCE_ID:
- return getInstanceID();
-
- case INSTANCE_TYPE:
- return getInstanceType();
-
- case SECRET_ACCESS_KEY:
- return getSecretAccessKey();
-
- case USERNAME:
- return getUsername();
-
- }
- 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 ACCESS_KEY:
- return isSetAccessKey();
- case AMI_ID:
- return isSetAmiID();
- case INSTANCE_ID:
- return isSetInstanceID();
- case INSTANCE_TYPE:
- return isSetInstanceType();
- case SECRET_ACCESS_KEY:
- return isSetSecretAccessKey();
- case USERNAME:
- return isSetUsername();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AmazonWebServicesSettings)
- return this.equals((AmazonWebServicesSettings)that);
- return false;
- }
-
- public boolean equals(AmazonWebServicesSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_accessKey = true && this.isSetAccessKey();
- boolean that_present_accessKey = true && that.isSetAccessKey();
- if (this_present_accessKey || that_present_accessKey) {
- if (!(this_present_accessKey && that_present_accessKey))
- return false;
- if (!this.accessKey.equals(that.accessKey))
- return false;
- }
-
- boolean this_present_amiID = true && this.isSetAmiID();
- boolean that_present_amiID = true && that.isSetAmiID();
- if (this_present_amiID || that_present_amiID) {
- if (!(this_present_amiID && that_present_amiID))
- return false;
- if (!this.amiID.equals(that.amiID))
- return false;
- }
-
- boolean this_present_instanceID = true && this.isSetInstanceID();
- boolean that_present_instanceID = true && that.isSetInstanceID();
- if (this_present_instanceID || that_present_instanceID) {
- if (!(this_present_instanceID && that_present_instanceID))
- return false;
- if (!this.instanceID.equals(that.instanceID))
- return false;
- }
-
- boolean this_present_instanceType = true && this.isSetInstanceType();
- boolean that_present_instanceType = true && that.isSetInstanceType();
- if (this_present_instanceType || that_present_instanceType) {
- if (!(this_present_instanceType && that_present_instanceType))
- return false;
- if (!this.instanceType.equals(that.instanceType))
- return false;
- }
-
- boolean this_present_secretAccessKey = true && this.isSetSecretAccessKey();
- boolean that_present_secretAccessKey = true && that.isSetSecretAccessKey();
- if (this_present_secretAccessKey || that_present_secretAccessKey) {
- if (!(this_present_secretAccessKey && that_present_secretAccessKey))
- return false;
- if (!this.secretAccessKey.equals(that.secretAccessKey))
- return false;
- }
-
- boolean this_present_username = true && this.isSetUsername();
- boolean that_present_username = true && that.isSetUsername();
- if (this_present_username || that_present_username) {
- if (!(this_present_username && that_present_username))
- return false;
- if (!this.username.equals(that.username))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AmazonWebServicesSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetAccessKey()).compareTo(other.isSetAccessKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAccessKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessKey, other.accessKey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetAmiID()).compareTo(other.isSetAmiID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAmiID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amiID, other.amiID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetInstanceID()).compareTo(other.isSetInstanceID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInstanceID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instanceID, other.instanceID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetInstanceType()).compareTo(other.isSetInstanceType());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInstanceType()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instanceType, other.instanceType);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSecretAccessKey()).compareTo(other.isSetSecretAccessKey());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSecretAccessKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secretAccessKey, other.secretAccessKey);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUsername()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
- 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("AmazonWebServicesSettings(");
- boolean first = true;
-
- if (isSetAccessKey()) {
- sb.append("accessKey:");
- if (this.accessKey == null) {
- sb.append("null");
- } else {
- sb.append(this.accessKey);
- }
- first = false;
- }
- if (isSetAmiID()) {
- if (!first) sb.append(", ");
- sb.append("amiID:");
- if (this.amiID == null) {
- sb.append("null");
- } else {
- sb.append(this.amiID);
- }
- first = false;
- }
- if (isSetInstanceID()) {
- if (!first) sb.append(", ");
- sb.append("instanceID:");
- if (this.instanceID == null) {
- sb.append("null");
- } else {
- sb.append(this.instanceID);
- }
- first = false;
- }
- if (isSetInstanceType()) {
- if (!first) sb.append(", ");
- sb.append("instanceType:");
- if (this.instanceType == null) {
- sb.append("null");
- } else {
- sb.append(this.instanceType);
- }
- first = false;
- }
- if (isSetSecretAccessKey()) {
- if (!first) sb.append(", ");
- sb.append("secretAccessKey:");
- if (this.secretAccessKey == null) {
- sb.append("null");
- } else {
- sb.append(this.secretAccessKey);
- }
- first = false;
- }
- if (isSetUsername()) {
- if (!first) sb.append(", ");
- sb.append("username:");
- if (this.username == null) {
- sb.append("null");
- } else {
- sb.append(this.username);
- }
- 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 {
- 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 AmazonWebServicesSettingsStandardSchemeFactory implements SchemeFactory {
- public AmazonWebServicesSettingsStandardScheme getScheme() {
- return new AmazonWebServicesSettingsStandardScheme();
- }
- }
-
- private static class AmazonWebServicesSettingsStandardScheme extends StandardScheme<AmazonWebServicesSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AmazonWebServicesSettings 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: // ACCESS_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.accessKey = iprot.readString();
- struct.setAccessKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // AMI_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.amiID = iprot.readString();
- struct.setAmiIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // INSTANCE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.instanceID = iprot.readString();
- struct.setInstanceIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // INSTANCE_TYPE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.instanceType = iprot.readString();
- struct.setInstanceTypeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // SECRET_ACCESS_KEY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.secretAccessKey = iprot.readString();
- struct.setSecretAccessKeyIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // USERNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(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, AmazonWebServicesSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.accessKey != null) {
- if (struct.isSetAccessKey()) {
- oprot.writeFieldBegin(ACCESS_KEY_FIELD_DESC);
- oprot.writeString(struct.accessKey);
- oprot.writeFieldEnd();
- }
- }
- if (struct.amiID != null) {
- if (struct.isSetAmiID()) {
- oprot.writeFieldBegin(AMI_ID_FIELD_DESC);
- oprot.writeString(struct.amiID);
- oprot.writeFieldEnd();
- }
- }
- if (struct.instanceID != null) {
- if (struct.isSetInstanceID()) {
- oprot.writeFieldBegin(INSTANCE_ID_FIELD_DESC);
- oprot.writeString(struct.instanceID);
- oprot.writeFieldEnd();
- }
- }
- if (struct.instanceType != null) {
- if (struct.isSetInstanceType()) {
- oprot.writeFieldBegin(INSTANCE_TYPE_FIELD_DESC);
- oprot.writeString(struct.instanceType);
- oprot.writeFieldEnd();
- }
- }
- if (struct.secretAccessKey != null) {
- if (struct.isSetSecretAccessKey()) {
- oprot.writeFieldBegin(SECRET_ACCESS_KEY_FIELD_DESC);
- oprot.writeString(struct.secretAccessKey);
- oprot.writeFieldEnd();
- }
- }
- if (struct.username != null) {
- if (struct.isSetUsername()) {
- oprot.writeFieldBegin(USERNAME_FIELD_DESC);
- oprot.writeString(struct.username);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AmazonWebServicesSettingsTupleSchemeFactory implements SchemeFactory {
- public AmazonWebServicesSettingsTupleScheme getScheme() {
- return new AmazonWebServicesSettingsTupleScheme();
- }
- }
-
- private static class AmazonWebServicesSettingsTupleScheme extends TupleScheme<AmazonWebServicesSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AmazonWebServicesSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetAccessKey()) {
- optionals.set(0);
- }
- if (struct.isSetAmiID()) {
- optionals.set(1);
- }
- if (struct.isSetInstanceID()) {
- optionals.set(2);
- }
- if (struct.isSetInstanceType()) {
- optionals.set(3);
- }
- if (struct.isSetSecretAccessKey()) {
- optionals.set(4);
- }
- if (struct.isSetUsername()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetAccessKey()) {
- oprot.writeString(struct.accessKey);
- }
- if (struct.isSetAmiID()) {
- oprot.writeString(struct.amiID);
- }
- if (struct.isSetInstanceID()) {
- oprot.writeString(struct.instanceID);
- }
- if (struct.isSetInstanceType()) {
- oprot.writeString(struct.instanceType);
- }
- if (struct.isSetSecretAccessKey()) {
- oprot.writeString(struct.secretAccessKey);
- }
- if (struct.isSetUsername()) {
- oprot.writeString(struct.username);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AmazonWebServicesSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.accessKey = iprot.readString();
- struct.setAccessKeyIsSet(true);
- }
- if (incoming.get(1)) {
- struct.amiID = iprot.readString();
- struct.setAmiIDIsSet(true);
- }
- if (incoming.get(2)) {
- struct.instanceID = iprot.readString();
- struct.setInstanceIDIsSet(true);
- }
- if (incoming.get(3)) {
- struct.instanceType = iprot.readString();
- struct.setInstanceTypeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.secretAccessKey = iprot.readString();
- struct.setSecretAccessKeyIsSet(true);
- }
- if (incoming.get(5)) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- }
- }
- }
-
-}
-
[4/7] Removing the proof of concept interpreter thrift implementation.
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/InterpreterService.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/InterpreterService.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/InterpreterService.java
deleted file mode 100644
index 447f652..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/InterpreterService.java
+++ /dev/null
@@ -1,3427 +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.experiment.execution;
-
-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;
-
-public class InterpreterService {
-
- public interface Iface {
-
- public String runExperiment(String workflowTemplateName, Map<String,String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions) throws org.apache.thrift.TException;
-
- public void cancelExperiment(String experimentID) throws org.apache.thrift.TException;
-
- public void suspendExperiment(String experimentID) throws org.apache.thrift.TException;
-
- public void resumeExperiment(String experimentID) throws org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void runExperiment(String workflowTemplateName, Map<String,String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void cancelExperiment(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void suspendExperiment(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void resumeExperiment(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public String runExperiment(String workflowTemplateName, Map<String,String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions) throws org.apache.thrift.TException
- {
- send_runExperiment(workflowTemplateName, workflowInputs, experimentAdOptions);
- return recv_runExperiment();
- }
-
- public void send_runExperiment(String workflowTemplateName, Map<String,String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions) throws org.apache.thrift.TException
- {
- runExperiment_args args = new runExperiment_args();
- args.setWorkflowTemplateName(workflowTemplateName);
- args.setWorkflowInputs(workflowInputs);
- args.setExperimentAdOptions(experimentAdOptions);
- sendBase("runExperiment", args);
- }
-
- public String recv_runExperiment() throws org.apache.thrift.TException
- {
- runExperiment_result result = new runExperiment_result();
- receiveBase(result, "runExperiment");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "runExperiment failed: unknown result");
- }
-
- public void cancelExperiment(String experimentID) throws org.apache.thrift.TException
- {
- send_cancelExperiment(experimentID);
- recv_cancelExperiment();
- }
-
- public void send_cancelExperiment(String experimentID) throws org.apache.thrift.TException
- {
- cancelExperiment_args args = new cancelExperiment_args();
- args.setExperimentID(experimentID);
- sendBase("cancelExperiment", args);
- }
-
- public void recv_cancelExperiment() throws org.apache.thrift.TException
- {
- cancelExperiment_result result = new cancelExperiment_result();
- receiveBase(result, "cancelExperiment");
- return;
- }
-
- public void suspendExperiment(String experimentID) throws org.apache.thrift.TException
- {
- send_suspendExperiment(experimentID);
- recv_suspendExperiment();
- }
-
- public void send_suspendExperiment(String experimentID) throws org.apache.thrift.TException
- {
- suspendExperiment_args args = new suspendExperiment_args();
- args.setExperimentID(experimentID);
- sendBase("suspendExperiment", args);
- }
-
- public void recv_suspendExperiment() throws org.apache.thrift.TException
- {
- suspendExperiment_result result = new suspendExperiment_result();
- receiveBase(result, "suspendExperiment");
- return;
- }
-
- public void resumeExperiment(String experimentID) throws org.apache.thrift.TException
- {
- send_resumeExperiment(experimentID);
- recv_resumeExperiment();
- }
-
- public void send_resumeExperiment(String experimentID) throws org.apache.thrift.TException
- {
- resumeExperiment_args args = new resumeExperiment_args();
- args.setExperimentID(experimentID);
- sendBase("resumeExperiment", args);
- }
-
- public void recv_resumeExperiment() throws org.apache.thrift.TException
- {
- resumeExperiment_result result = new resumeExperiment_result();
- receiveBase(result, "resumeExperiment");
- return;
- }
-
- }
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
- public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void runExperiment(String workflowTemplateName, Map<String,String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- runExperiment_call method_call = new runExperiment_call(workflowTemplateName, workflowInputs, experimentAdOptions, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class runExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String workflowTemplateName;
- private Map<String,String> workflowInputs;
- private ExperimentAdvanceOptions experimentAdOptions;
- public runExperiment_call(String workflowTemplateName, Map<String,String> workflowInputs, ExperimentAdvanceOptions experimentAdOptions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.workflowTemplateName = workflowTemplateName;
- this.workflowInputs = workflowInputs;
- this.experimentAdOptions = experimentAdOptions;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("runExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- runExperiment_args args = new runExperiment_args();
- args.setWorkflowTemplateName(workflowTemplateName);
- args.setWorkflowInputs(workflowInputs);
- args.setExperimentAdOptions(experimentAdOptions);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_runExperiment();
- }
- }
-
- public void cancelExperiment(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- cancelExperiment_call method_call = new cancelExperiment_call(experimentID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class cancelExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String experimentID;
- public cancelExperiment_call(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.experimentID = experimentID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- cancelExperiment_args args = new cancelExperiment_args();
- args.setExperimentID(experimentID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_cancelExperiment();
- }
- }
-
- public void suspendExperiment(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- suspendExperiment_call method_call = new suspendExperiment_call(experimentID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class suspendExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String experimentID;
- public suspendExperiment_call(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.experimentID = experimentID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("suspendExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- suspendExperiment_args args = new suspendExperiment_args();
- args.setExperimentID(experimentID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_suspendExperiment();
- }
- }
-
- public void resumeExperiment(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- resumeExperiment_call method_call = new resumeExperiment_call(experimentID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class resumeExperiment_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String experimentID;
- public resumeExperiment_call(String experimentID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.experimentID = experimentID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resumeExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
- resumeExperiment_args args = new resumeExperiment_args();
- args.setExperimentID(experimentID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_resumeExperiment();
- }
- }
-
- }
-
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("runExperiment", new runExperiment());
- processMap.put("cancelExperiment", new cancelExperiment());
- processMap.put("suspendExperiment", new suspendExperiment());
- processMap.put("resumeExperiment", new resumeExperiment());
- return processMap;
- }
-
- public static class runExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, runExperiment_args> {
- public runExperiment() {
- super("runExperiment");
- }
-
- public runExperiment_args getEmptyArgsInstance() {
- return new runExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public runExperiment_result getResult(I iface, runExperiment_args args) throws org.apache.thrift.TException {
- runExperiment_result result = new runExperiment_result();
- result.success = iface.runExperiment(args.workflowTemplateName, args.workflowInputs, args.experimentAdOptions);
- return result;
- }
- }
-
- public static class cancelExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelExperiment_args> {
- public cancelExperiment() {
- super("cancelExperiment");
- }
-
- public cancelExperiment_args getEmptyArgsInstance() {
- return new cancelExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public cancelExperiment_result getResult(I iface, cancelExperiment_args args) throws org.apache.thrift.TException {
- cancelExperiment_result result = new cancelExperiment_result();
- iface.cancelExperiment(args.experimentID);
- return result;
- }
- }
-
- public static class suspendExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, suspendExperiment_args> {
- public suspendExperiment() {
- super("suspendExperiment");
- }
-
- public suspendExperiment_args getEmptyArgsInstance() {
- return new suspendExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public suspendExperiment_result getResult(I iface, suspendExperiment_args args) throws org.apache.thrift.TException {
- suspendExperiment_result result = new suspendExperiment_result();
- iface.suspendExperiment(args.experimentID);
- return result;
- }
- }
-
- public static class resumeExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resumeExperiment_args> {
- public resumeExperiment() {
- super("resumeExperiment");
- }
-
- public resumeExperiment_args getEmptyArgsInstance() {
- return new resumeExperiment_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public resumeExperiment_result getResult(I iface, resumeExperiment_args args) throws org.apache.thrift.TException {
- resumeExperiment_result result = new resumeExperiment_result();
- iface.resumeExperiment(args.experimentID);
- return result;
- }
- }
-
- }
-
- public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- processMap.put("runExperiment", new runExperiment());
- processMap.put("cancelExperiment", new cancelExperiment());
- processMap.put("suspendExperiment", new suspendExperiment());
- processMap.put("resumeExperiment", new resumeExperiment());
- return processMap;
- }
-
- public static class runExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, runExperiment_args, String> {
- public runExperiment() {
- super("runExperiment");
- }
-
- public runExperiment_args getEmptyArgsInstance() {
- return new runExperiment_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- runExperiment_result result = new runExperiment_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- runExperiment_result result = new runExperiment_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, runExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.runExperiment(args.workflowTemplateName, args.workflowInputs, args.experimentAdOptions,resultHandler);
- }
- }
-
- public static class cancelExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelExperiment_args, Void> {
- public cancelExperiment() {
- super("cancelExperiment");
- }
-
- public cancelExperiment_args getEmptyArgsInstance() {
- return new cancelExperiment_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- cancelExperiment_result result = new cancelExperiment_result();
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- cancelExperiment_result result = new cancelExperiment_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, cancelExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.cancelExperiment(args.experimentID,resultHandler);
- }
- }
-
- public static class suspendExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, suspendExperiment_args, Void> {
- public suspendExperiment() {
- super("suspendExperiment");
- }
-
- public suspendExperiment_args getEmptyArgsInstance() {
- return new suspendExperiment_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- suspendExperiment_result result = new suspendExperiment_result();
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- suspendExperiment_result result = new suspendExperiment_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, suspendExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.suspendExperiment(args.experimentID,resultHandler);
- }
- }
-
- public static class resumeExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, resumeExperiment_args, Void> {
- public resumeExperiment() {
- super("resumeExperiment");
- }
-
- public resumeExperiment_args getEmptyArgsInstance() {
- return new resumeExperiment_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- resumeExperiment_result result = new resumeExperiment_result();
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- resumeExperiment_result result = new resumeExperiment_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, resumeExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.resumeExperiment(args.experimentID,resultHandler);
- }
- }
-
- }
-
- public static class runExperiment_args implements org.apache.thrift.TBase<runExperiment_args, runExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<runExperiment_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("runExperiment_args");
-
- private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField WORKFLOW_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowInputs", org.apache.thrift.protocol.TType.MAP, (short)2);
- private static final org.apache.thrift.protocol.TField EXPERIMENT_AD_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentAdOptions", 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 runExperiment_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new runExperiment_argsTupleSchemeFactory());
- }
-
- public String workflowTemplateName; // required
- public Map<String,String> workflowInputs; // required
- public ExperimentAdvanceOptions experimentAdOptions; // 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 {
- WORKFLOW_TEMPLATE_NAME((short)1, "workflowTemplateName"),
- WORKFLOW_INPUTS((short)2, "workflowInputs"),
- EXPERIMENT_AD_OPTIONS((short)3, "experimentAdOptions");
-
- 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: // WORKFLOW_TEMPLATE_NAME
- return WORKFLOW_TEMPLATE_NAME;
- case 2: // WORKFLOW_INPUTS
- return WORKFLOW_INPUTS;
- case 3: // EXPERIMENT_AD_OPTIONS
- return EXPERIMENT_AD_OPTIONS;
- 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.WORKFLOW_TEMPLATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.WORKFLOW_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("workflowInputs", org.apache.thrift.TFieldRequirementType.DEFAULT,
- 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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.EXPERIMENT_AD_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("experimentAdOptions", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExperimentAdvanceOptions.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(runExperiment_args.class, metaDataMap);
- }
-
- public runExperiment_args() {
- }
-
- public runExperiment_args(
- String workflowTemplateName,
- Map<String,String> workflowInputs,
- ExperimentAdvanceOptions experimentAdOptions)
- {
- this();
- this.workflowTemplateName = workflowTemplateName;
- this.workflowInputs = workflowInputs;
- this.experimentAdOptions = experimentAdOptions;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public runExperiment_args(runExperiment_args other) {
- if (other.isSetWorkflowTemplateName()) {
- this.workflowTemplateName = other.workflowTemplateName;
- }
- if (other.isSetWorkflowInputs()) {
- Map<String,String> __this__workflowInputs = new HashMap<String,String>(other.workflowInputs);
- this.workflowInputs = __this__workflowInputs;
- }
- if (other.isSetExperimentAdOptions()) {
- this.experimentAdOptions = new ExperimentAdvanceOptions(other.experimentAdOptions);
- }
- }
-
- public runExperiment_args deepCopy() {
- return new runExperiment_args(this);
- }
-
- @Override
- public void clear() {
- this.workflowTemplateName = null;
- this.workflowInputs = null;
- this.experimentAdOptions = null;
- }
-
- public String getWorkflowTemplateName() {
- return this.workflowTemplateName;
- }
-
- public runExperiment_args setWorkflowTemplateName(String workflowTemplateName) {
- this.workflowTemplateName = workflowTemplateName;
- return this;
- }
-
- public void unsetWorkflowTemplateName() {
- this.workflowTemplateName = null;
- }
-
- /** Returns true if field workflowTemplateName is set (has been assigned a value) and false otherwise */
- public boolean isSetWorkflowTemplateName() {
- return this.workflowTemplateName != null;
- }
-
- public void setWorkflowTemplateNameIsSet(boolean value) {
- if (!value) {
- this.workflowTemplateName = null;
- }
- }
-
- public int getWorkflowInputsSize() {
- return (this.workflowInputs == null) ? 0 : this.workflowInputs.size();
- }
-
- public void putToWorkflowInputs(String key, String val) {
- if (this.workflowInputs == null) {
- this.workflowInputs = new HashMap<String,String>();
- }
- this.workflowInputs.put(key, val);
- }
-
- public Map<String,String> getWorkflowInputs() {
- return this.workflowInputs;
- }
-
- public runExperiment_args setWorkflowInputs(Map<String,String> workflowInputs) {
- this.workflowInputs = workflowInputs;
- return this;
- }
-
- public void unsetWorkflowInputs() {
- this.workflowInputs = null;
- }
-
- /** Returns true if field workflowInputs is set (has been assigned a value) and false otherwise */
- public boolean isSetWorkflowInputs() {
- return this.workflowInputs != null;
- }
-
- public void setWorkflowInputsIsSet(boolean value) {
- if (!value) {
- this.workflowInputs = null;
- }
- }
-
- public ExperimentAdvanceOptions getExperimentAdOptions() {
- return this.experimentAdOptions;
- }
-
- public runExperiment_args setExperimentAdOptions(ExperimentAdvanceOptions experimentAdOptions) {
- this.experimentAdOptions = experimentAdOptions;
- return this;
- }
-
- public void unsetExperimentAdOptions() {
- this.experimentAdOptions = null;
- }
-
- /** Returns true if field experimentAdOptions is set (has been assigned a value) and false otherwise */
- public boolean isSetExperimentAdOptions() {
- return this.experimentAdOptions != null;
- }
-
- public void setExperimentAdOptionsIsSet(boolean value) {
- if (!value) {
- this.experimentAdOptions = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case WORKFLOW_TEMPLATE_NAME:
- if (value == null) {
- unsetWorkflowTemplateName();
- } else {
- setWorkflowTemplateName((String)value);
- }
- break;
-
- case WORKFLOW_INPUTS:
- if (value == null) {
- unsetWorkflowInputs();
- } else {
- setWorkflowInputs((Map<String,String>)value);
- }
- break;
-
- case EXPERIMENT_AD_OPTIONS:
- if (value == null) {
- unsetExperimentAdOptions();
- } else {
- setExperimentAdOptions((ExperimentAdvanceOptions)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case WORKFLOW_TEMPLATE_NAME:
- return getWorkflowTemplateName();
-
- case WORKFLOW_INPUTS:
- return getWorkflowInputs();
-
- case EXPERIMENT_AD_OPTIONS:
- return getExperimentAdOptions();
-
- }
- 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 WORKFLOW_TEMPLATE_NAME:
- return isSetWorkflowTemplateName();
- case WORKFLOW_INPUTS:
- return isSetWorkflowInputs();
- case EXPERIMENT_AD_OPTIONS:
- return isSetExperimentAdOptions();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof runExperiment_args)
- return this.equals((runExperiment_args)that);
- return false;
- }
-
- public boolean equals(runExperiment_args that) {
- if (that == null)
- return false;
-
- boolean this_present_workflowTemplateName = true && this.isSetWorkflowTemplateName();
- boolean that_present_workflowTemplateName = true && that.isSetWorkflowTemplateName();
- if (this_present_workflowTemplateName || that_present_workflowTemplateName) {
- if (!(this_present_workflowTemplateName && that_present_workflowTemplateName))
- return false;
- if (!this.workflowTemplateName.equals(that.workflowTemplateName))
- return false;
- }
-
- boolean this_present_workflowInputs = true && this.isSetWorkflowInputs();
- boolean that_present_workflowInputs = true && that.isSetWorkflowInputs();
- if (this_present_workflowInputs || that_present_workflowInputs) {
- if (!(this_present_workflowInputs && that_present_workflowInputs))
- return false;
- if (!this.workflowInputs.equals(that.workflowInputs))
- return false;
- }
-
- boolean this_present_experimentAdOptions = true && this.isSetExperimentAdOptions();
- boolean that_present_experimentAdOptions = true && that.isSetExperimentAdOptions();
- if (this_present_experimentAdOptions || that_present_experimentAdOptions) {
- if (!(this_present_experimentAdOptions && that_present_experimentAdOptions))
- return false;
- if (!this.experimentAdOptions.equals(that.experimentAdOptions))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(runExperiment_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetWorkflowTemplateName()).compareTo(other.isSetWorkflowTemplateName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetWorkflowTemplateName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateName, other.workflowTemplateName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetWorkflowInputs()).compareTo(other.isSetWorkflowInputs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetWorkflowInputs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowInputs, other.workflowInputs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetExperimentAdOptions()).compareTo(other.isSetExperimentAdOptions());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExperimentAdOptions()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentAdOptions, other.experimentAdOptions);
- 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("runExperiment_args(");
- boolean first = true;
-
- sb.append("workflowTemplateName:");
- if (this.workflowTemplateName == null) {
- sb.append("null");
- } else {
- sb.append(this.workflowTemplateName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("workflowInputs:");
- if (this.workflowInputs == null) {
- sb.append("null");
- } else {
- sb.append(this.workflowInputs);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("experimentAdOptions:");
- if (this.experimentAdOptions == null) {
- sb.append("null");
- } else {
- sb.append(this.experimentAdOptions);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (experimentAdOptions != null) {
- experimentAdOptions.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 runExperiment_argsStandardSchemeFactory implements SchemeFactory {
- public runExperiment_argsStandardScheme getScheme() {
- return new runExperiment_argsStandardScheme();
- }
- }
-
- private static class runExperiment_argsStandardScheme extends StandardScheme<runExperiment_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, runExperiment_args 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: // WORKFLOW_TEMPLATE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.workflowTemplateName = iprot.readString();
- struct.setWorkflowTemplateNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // WORKFLOW_INPUTS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
- struct.workflowInputs = new HashMap<String,String>(2*_map24.size);
- for (int _i25 = 0; _i25 < _map24.size; ++_i25)
- {
- String _key26;
- String _val27;
- _key26 = iprot.readString();
- _val27 = iprot.readString();
- struct.workflowInputs.put(_key26, _val27);
- }
- iprot.readMapEnd();
- }
- struct.setWorkflowInputsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // EXPERIMENT_AD_OPTIONS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.experimentAdOptions = new ExperimentAdvanceOptions();
- struct.experimentAdOptions.read(iprot);
- struct.setExperimentAdOptionsIsSet(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, runExperiment_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.workflowTemplateName != null) {
- oprot.writeFieldBegin(WORKFLOW_TEMPLATE_NAME_FIELD_DESC);
- oprot.writeString(struct.workflowTemplateName);
- oprot.writeFieldEnd();
- }
- if (struct.workflowInputs != null) {
- oprot.writeFieldBegin(WORKFLOW_INPUTS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.workflowInputs.size()));
- for (Map.Entry<String, String> _iter28 : struct.workflowInputs.entrySet())
- {
- oprot.writeString(_iter28.getKey());
- oprot.writeString(_iter28.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.experimentAdOptions != null) {
- oprot.writeFieldBegin(EXPERIMENT_AD_OPTIONS_FIELD_DESC);
- struct.experimentAdOptions.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class runExperiment_argsTupleSchemeFactory implements SchemeFactory {
- public runExperiment_argsTupleScheme getScheme() {
- return new runExperiment_argsTupleScheme();
- }
- }
-
- private static class runExperiment_argsTupleScheme extends TupleScheme<runExperiment_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, runExperiment_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetWorkflowTemplateName()) {
- optionals.set(0);
- }
- if (struct.isSetWorkflowInputs()) {
- optionals.set(1);
- }
- if (struct.isSetExperimentAdOptions()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetWorkflowTemplateName()) {
- oprot.writeString(struct.workflowTemplateName);
- }
- if (struct.isSetWorkflowInputs()) {
- {
- oprot.writeI32(struct.workflowInputs.size());
- for (Map.Entry<String, String> _iter29 : struct.workflowInputs.entrySet())
- {
- oprot.writeString(_iter29.getKey());
- oprot.writeString(_iter29.getValue());
- }
- }
- }
- if (struct.isSetExperimentAdOptions()) {
- struct.experimentAdOptions.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, runExperiment_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.workflowTemplateName = iprot.readString();
- struct.setWorkflowTemplateNameIsSet(true);
- }
- if (incoming.get(1)) {
- {
- org.apache.thrift.protocol.TMap _map30 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.workflowInputs = new HashMap<String,String>(2*_map30.size);
- for (int _i31 = 0; _i31 < _map30.size; ++_i31)
- {
- String _key32;
- String _val33;
- _key32 = iprot.readString();
- _val33 = iprot.readString();
- struct.workflowInputs.put(_key32, _val33);
- }
- }
- struct.setWorkflowInputsIsSet(true);
- }
- if (incoming.get(2)) {
- struct.experimentAdOptions = new ExperimentAdvanceOptions();
- struct.experimentAdOptions.read(iprot);
- struct.setExperimentAdOptionsIsSet(true);
- }
- }
- }
-
- }
-
- public static class runExperiment_result implements org.apache.thrift.TBase<runExperiment_result, runExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<runExperiment_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("runExperiment_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new runExperiment_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new runExperiment_resultTupleSchemeFactory());
- }
-
- public String success; // 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 {
- SUCCESS((short)0, "success");
-
- 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 0: // SUCCESS
- return SUCCESS;
- 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(runExperiment_result.class, metaDataMap);
- }
-
- public runExperiment_result() {
- }
-
- public runExperiment_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public runExperiment_result(runExperiment_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public runExperiment_result deepCopy() {
- return new runExperiment_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public runExperiment_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- 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 SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof runExperiment_result)
- return this.equals((runExperiment_result)that);
- return false;
- }
-
- public boolean equals(runExperiment_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(runExperiment_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- 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("runExperiment_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- 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 {
- 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 runExperiment_resultStandardSchemeFactory implements SchemeFactory {
- public runExperiment_resultStandardScheme getScheme() {
- return new runExperiment_resultStandardScheme();
- }
- }
-
- private static class runExperiment_resultStandardScheme extends StandardScheme<runExperiment_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, runExperiment_result 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 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(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, runExperiment_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class runExperiment_resultTupleSchemeFactory implements SchemeFactory {
- public runExperiment_resultTupleScheme getScheme() {
- return new runExperiment_resultTupleScheme();
- }
- }
-
- private static class runExperiment_resultTupleScheme extends TupleScheme<runExperiment_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, runExperiment_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, runExperiment_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class cancelExperiment_args implements org.apache.thrift.TBase<cancelExperiment_args, cancelExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelExperiment_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelExperiment_args");
-
- private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentID", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new cancelExperiment_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new cancelExperiment_argsTupleSchemeFactory());
- }
-
- public String experimentID; // 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 {
- EXPERIMENT_ID((short)1, "experimentID");
-
- 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: // EXPERIMENT_ID
- return EXPERIMENT_ID;
- 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.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelExperiment_args.class, metaDataMap);
- }
-
- public cancelExperiment_args() {
- }
-
- public cancelExperiment_args(
- String experimentID)
- {
- this();
- this.experimentID = experimentID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public cancelExperiment_args(cancelExperiment_args other) {
- if (other.isSetExperimentID()) {
- this.experimentID = other.experimentID;
- }
- }
-
- public cancelExperiment_args deepCopy() {
- return new cancelExperiment_args(this);
- }
-
- @Override
- public void clear() {
- this.experimentID = null;
- }
-
- public String getExperimentID() {
- return this.experimentID;
- }
-
- public cancelExperiment_args setExperimentID(String experimentID) {
- this.experimentID = experimentID;
- return this;
- }
-
- public void unsetExperimentID() {
- this.experimentID = null;
- }
-
- /** Returns true if field experimentID is set (has been assigned a value) and false otherwise */
- public boolean isSetExperimentID() {
- return this.experimentID != null;
- }
-
- public void setExperimentIDIsSet(boolean value) {
- if (!value) {
- this.experimentID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case EXPERIMENT_ID:
- if (value == null) {
- unsetExperimentID();
- } else {
- setExperimentID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case EXPERIMENT_ID:
- return getExperimentID();
-
- }
- 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 EXPERIMENT_ID:
- return isSetExperimentID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof cancelExperiment_args)
- return this.equals((cancelExperiment_args)that);
- return false;
- }
-
- public boolean equals(cancelExperiment_args that) {
- if (that == null)
- return false;
-
- boolean this_present_experimentID = true && this.isSetExperimentID();
- boolean that_present_experimentID = true && that.isSetExperimentID();
- if (this_present_experimentID || that_present_experimentID) {
- if (!(this_present_experimentID && that_present_experimentID))
- return false;
- if (!this.experimentID.equals(that.experimentID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(cancelExperiment_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetExperimentID()).compareTo(other.isSetExperimentID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExperimentID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentID, other.experimentID);
- 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("cancelExperiment_args(");
- boolean first = true;
-
- sb.append("experimentID:");
- if (this.experimentID == null) {
- sb.append("null");
- } else {
- sb.append(this.experimentID);
- }
- 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 {
- 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 cancelExperiment_argsStandardSchemeFactory implements SchemeFactory {
- public cancelExperiment_argsStandardScheme getScheme() {
- return new cancelExperiment_argsStandardScheme();
- }
- }
-
- private static class cancelExperiment_argsStandardScheme extends StandardScheme<cancelExperiment_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, cancelExperiment_args 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: // EXPERIMENT_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.experimentID = iprot.readString();
- struct.setExperimentIDIsSet(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, cancelExperiment_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.experimentID != null) {
- oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
- oprot.writeString(struct.experimentID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class cancelExperiment_argsTupleSchemeFactory implements SchemeFactory {
- public cancelExperiment_argsTupleScheme getScheme() {
- return new cancelExperiment_argsTupleScheme();
- }
- }
-
- private static class cancelExperiment_argsTupleScheme extends TupleScheme<cancelExperiment_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, cancelExperiment_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetExperimentID()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetExperimentID()) {
- oprot.writeString(struct.experimentID);
-
<TRUNCATED>
[5/7] Removing the proof of concept interpreter thrift implementation.
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java
deleted file mode 100644
index dfb293f..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java
+++ /dev/null
@@ -1,798 +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.experiment.execution;
-
-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;
-
-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.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;
- }
-
- /**
- * 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 __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 {
- 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);
- }
-
- public HPCSettings() {
- }
-
- /**
- * 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;
- }
-
- 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;
- }
-
- 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;
- }
-
- @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;
-
- 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);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HostSchedulingSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HostSchedulingSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HostSchedulingSettings.java
deleted file mode 100644
index f768083..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HostSchedulingSettings.java
+++ /dev/null
@@ -1,608 +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.experiment.execution;
-
-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;
-
-public class HostSchedulingSettings implements org.apache.thrift.TBase<HostSchedulingSettings, HostSchedulingSettings._Fields>, java.io.Serializable, Cloneable, Comparable<HostSchedulingSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HostSchedulingSettings");
-
- private static final org.apache.thrift.protocol.TField HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hostID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField IS_WSGRAM_PREFERRED_FIELD_DESC = new org.apache.thrift.protocol.TField("isWSGramPreferred", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final org.apache.thrift.protocol.TField GATEKEEPER_EPR_FIELD_DESC = new org.apache.thrift.protocol.TField("gatekeeperEPR", 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 HostSchedulingSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HostSchedulingSettingsTupleSchemeFactory());
- }
-
- public String hostID; // optional
- public boolean isWSGramPreferred; // optional
- public String gatekeeperEPR; // 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 {
- HOST_ID((short)1, "hostID"),
- IS_WSGRAM_PREFERRED((short)2, "isWSGramPreferred"),
- GATEKEEPER_EPR((short)3, "gatekeeperEPR");
-
- 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: // HOST_ID
- return HOST_ID;
- case 2: // IS_WSGRAM_PREFERRED
- return IS_WSGRAM_PREFERRED;
- case 3: // GATEKEEPER_EPR
- return GATEKEEPER_EPR;
- 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 __ISWSGRAMPREFERRED_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.HOST_ID,_Fields.IS_WSGRAM_PREFERRED,_Fields.GATEKEEPER_EPR};
- 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.HOST_ID, new org.apache.thrift.meta_data.FieldMetaData("hostID", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_WSGRAM_PREFERRED, new org.apache.thrift.meta_data.FieldMetaData("isWSGramPreferred", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.GATEKEEPER_EPR, new org.apache.thrift.meta_data.FieldMetaData("gatekeeperEPR", 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(HostSchedulingSettings.class, metaDataMap);
- }
-
- public HostSchedulingSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public HostSchedulingSettings(HostSchedulingSettings other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetHostID()) {
- this.hostID = other.hostID;
- }
- this.isWSGramPreferred = other.isWSGramPreferred;
- if (other.isSetGatekeeperEPR()) {
- this.gatekeeperEPR = other.gatekeeperEPR;
- }
- }
-
- public HostSchedulingSettings deepCopy() {
- return new HostSchedulingSettings(this);
- }
-
- @Override
- public void clear() {
- this.hostID = null;
- setIsWSGramPreferredIsSet(false);
- this.isWSGramPreferred = false;
- this.gatekeeperEPR = null;
- }
-
- public String getHostID() {
- return this.hostID;
- }
-
- public HostSchedulingSettings setHostID(String hostID) {
- this.hostID = hostID;
- return this;
- }
-
- public void unsetHostID() {
- this.hostID = null;
- }
-
- /** Returns true if field hostID is set (has been assigned a value) and false otherwise */
- public boolean isSetHostID() {
- return this.hostID != null;
- }
-
- public void setHostIDIsSet(boolean value) {
- if (!value) {
- this.hostID = null;
- }
- }
-
- public boolean isIsWSGramPreferred() {
- return this.isWSGramPreferred;
- }
-
- public HostSchedulingSettings setIsWSGramPreferred(boolean isWSGramPreferred) {
- this.isWSGramPreferred = isWSGramPreferred;
- setIsWSGramPreferredIsSet(true);
- return this;
- }
-
- public void unsetIsWSGramPreferred() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISWSGRAMPREFERRED_ISSET_ID);
- }
-
- /** Returns true if field isWSGramPreferred is set (has been assigned a value) and false otherwise */
- public boolean isSetIsWSGramPreferred() {
- return EncodingUtils.testBit(__isset_bitfield, __ISWSGRAMPREFERRED_ISSET_ID);
- }
-
- public void setIsWSGramPreferredIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISWSGRAMPREFERRED_ISSET_ID, value);
- }
-
- public String getGatekeeperEPR() {
- return this.gatekeeperEPR;
- }
-
- public HostSchedulingSettings setGatekeeperEPR(String gatekeeperEPR) {
- this.gatekeeperEPR = gatekeeperEPR;
- return this;
- }
-
- public void unsetGatekeeperEPR() {
- this.gatekeeperEPR = null;
- }
-
- /** Returns true if field gatekeeperEPR is set (has been assigned a value) and false otherwise */
- public boolean isSetGatekeeperEPR() {
- return this.gatekeeperEPR != null;
- }
-
- public void setGatekeeperEPRIsSet(boolean value) {
- if (!value) {
- this.gatekeeperEPR = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case HOST_ID:
- if (value == null) {
- unsetHostID();
- } else {
- setHostID((String)value);
- }
- break;
-
- case IS_WSGRAM_PREFERRED:
- if (value == null) {
- unsetIsWSGramPreferred();
- } else {
- setIsWSGramPreferred((Boolean)value);
- }
- break;
-
- case GATEKEEPER_EPR:
- if (value == null) {
- unsetGatekeeperEPR();
- } else {
- setGatekeeperEPR((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case HOST_ID:
- return getHostID();
-
- case IS_WSGRAM_PREFERRED:
- return Boolean.valueOf(isIsWSGramPreferred());
-
- case GATEKEEPER_EPR:
- return getGatekeeperEPR();
-
- }
- 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 HOST_ID:
- return isSetHostID();
- case IS_WSGRAM_PREFERRED:
- return isSetIsWSGramPreferred();
- case GATEKEEPER_EPR:
- return isSetGatekeeperEPR();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof HostSchedulingSettings)
- return this.equals((HostSchedulingSettings)that);
- return false;
- }
-
- public boolean equals(HostSchedulingSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_hostID = true && this.isSetHostID();
- boolean that_present_hostID = true && that.isSetHostID();
- if (this_present_hostID || that_present_hostID) {
- if (!(this_present_hostID && that_present_hostID))
- return false;
- if (!this.hostID.equals(that.hostID))
- return false;
- }
-
- boolean this_present_isWSGramPreferred = true && this.isSetIsWSGramPreferred();
- boolean that_present_isWSGramPreferred = true && that.isSetIsWSGramPreferred();
- if (this_present_isWSGramPreferred || that_present_isWSGramPreferred) {
- if (!(this_present_isWSGramPreferred && that_present_isWSGramPreferred))
- return false;
- if (this.isWSGramPreferred != that.isWSGramPreferred)
- return false;
- }
-
- boolean this_present_gatekeeperEPR = true && this.isSetGatekeeperEPR();
- boolean that_present_gatekeeperEPR = true && that.isSetGatekeeperEPR();
- if (this_present_gatekeeperEPR || that_present_gatekeeperEPR) {
- if (!(this_present_gatekeeperEPR && that_present_gatekeeperEPR))
- return false;
- if (!this.gatekeeperEPR.equals(that.gatekeeperEPR))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(HostSchedulingSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetHostID()).compareTo(other.isSetHostID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHostID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostID, other.hostID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsWSGramPreferred()).compareTo(other.isSetIsWSGramPreferred());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsWSGramPreferred()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isWSGramPreferred, other.isWSGramPreferred);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGatekeeperEPR()).compareTo(other.isSetGatekeeperEPR());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGatekeeperEPR()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatekeeperEPR, other.gatekeeperEPR);
- 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("HostSchedulingSettings(");
- boolean first = true;
-
- if (isSetHostID()) {
- sb.append("hostID:");
- if (this.hostID == null) {
- sb.append("null");
- } else {
- sb.append(this.hostID);
- }
- first = false;
- }
- if (isSetIsWSGramPreferred()) {
- if (!first) sb.append(", ");
- sb.append("isWSGramPreferred:");
- sb.append(this.isWSGramPreferred);
- first = false;
- }
- if (isSetGatekeeperEPR()) {
- if (!first) sb.append(", ");
- sb.append("gatekeeperEPR:");
- if (this.gatekeeperEPR == null) {
- sb.append("null");
- } else {
- sb.append(this.gatekeeperEPR);
- }
- 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 HostSchedulingSettingsStandardSchemeFactory implements SchemeFactory {
- public HostSchedulingSettingsStandardScheme getScheme() {
- return new HostSchedulingSettingsStandardScheme();
- }
- }
-
- private static class HostSchedulingSettingsStandardScheme extends StandardScheme<HostSchedulingSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, HostSchedulingSettings 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: // HOST_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.hostID = iprot.readString();
- struct.setHostIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // IS_WSGRAM_PREFERRED
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isWSGramPreferred = iprot.readBool();
- struct.setIsWSGramPreferredIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // GATEKEEPER_EPR
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.gatekeeperEPR = iprot.readString();
- struct.setGatekeeperEPRIsSet(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, HostSchedulingSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.hostID != null) {
- if (struct.isSetHostID()) {
- oprot.writeFieldBegin(HOST_ID_FIELD_DESC);
- oprot.writeString(struct.hostID);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetIsWSGramPreferred()) {
- oprot.writeFieldBegin(IS_WSGRAM_PREFERRED_FIELD_DESC);
- oprot.writeBool(struct.isWSGramPreferred);
- oprot.writeFieldEnd();
- }
- if (struct.gatekeeperEPR != null) {
- if (struct.isSetGatekeeperEPR()) {
- oprot.writeFieldBegin(GATEKEEPER_EPR_FIELD_DESC);
- oprot.writeString(struct.gatekeeperEPR);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class HostSchedulingSettingsTupleSchemeFactory implements SchemeFactory {
- public HostSchedulingSettingsTupleScheme getScheme() {
- return new HostSchedulingSettingsTupleScheme();
- }
- }
-
- private static class HostSchedulingSettingsTupleScheme extends TupleScheme<HostSchedulingSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, HostSchedulingSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetHostID()) {
- optionals.set(0);
- }
- if (struct.isSetIsWSGramPreferred()) {
- optionals.set(1);
- }
- if (struct.isSetGatekeeperEPR()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetHostID()) {
- oprot.writeString(struct.hostID);
- }
- if (struct.isSetIsWSGramPreferred()) {
- oprot.writeBool(struct.isWSGramPreferred);
- }
- if (struct.isSetGatekeeperEPR()) {
- oprot.writeString(struct.gatekeeperEPR);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, HostSchedulingSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.hostID = iprot.readString();
- struct.setHostIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.isWSGramPreferred = iprot.readBool();
- struct.setIsWSGramPreferredIsSet(true);
- }
- if (incoming.get(2)) {
- struct.gatekeeperEPR = iprot.readString();
- struct.setGatekeeperEPRIsSet(true);
- }
- }
- }
-
-}
-
[3/7] Removing the proof of concept interpreter thrift implementation.
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java
deleted file mode 100644
index c11183e..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java
+++ /dev/null
@@ -1,710 +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.experiment.execution;
-
-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;
-
-public class MyProxyRepositorySettings implements org.apache.thrift.TBase<MyProxyRepositorySettings, MyProxyRepositorySettings._Fields>, java.io.Serializable, Cloneable, Comparable<MyProxyRepositorySettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MyProxyRepositorySettings");
-
- private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField MYPROXY_SERVER_FIELD_DESC = new org.apache.thrift.protocol.TField("myproxyServer", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField LIFETIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lifetime", org.apache.thrift.protocol.TType.I32, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MyProxyRepositorySettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MyProxyRepositorySettingsTupleSchemeFactory());
- }
-
- public String userName; // optional
- public String password; // optional
- public String myproxyServer; // optional
- public int lifetime; // 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 {
- USER_NAME((short)1, "userName"),
- PASSWORD((short)2, "password"),
- MYPROXY_SERVER((short)3, "myproxyServer"),
- LIFETIME((short)4, "lifetime");
-
- 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: // USER_NAME
- return USER_NAME;
- case 2: // PASSWORD
- return PASSWORD;
- case 3: // MYPROXY_SERVER
- return MYPROXY_SERVER;
- case 4: // LIFETIME
- return LIFETIME;
- 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 __LIFETIME_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.USER_NAME,_Fields.PASSWORD,_Fields.MYPROXY_SERVER,_Fields.LIFETIME};
- 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MYPROXY_SERVER, new org.apache.thrift.meta_data.FieldMetaData("myproxyServer", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LIFETIME, new org.apache.thrift.meta_data.FieldMetaData("lifetime", 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(MyProxyRepositorySettings.class, metaDataMap);
- }
-
- public MyProxyRepositorySettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public MyProxyRepositorySettings(MyProxyRepositorySettings other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetUserName()) {
- this.userName = other.userName;
- }
- if (other.isSetPassword()) {
- this.password = other.password;
- }
- if (other.isSetMyproxyServer()) {
- this.myproxyServer = other.myproxyServer;
- }
- this.lifetime = other.lifetime;
- }
-
- public MyProxyRepositorySettings deepCopy() {
- return new MyProxyRepositorySettings(this);
- }
-
- @Override
- public void clear() {
- this.userName = null;
- this.password = null;
- this.myproxyServer = null;
- setLifetimeIsSet(false);
- this.lifetime = 0;
- }
-
- public String getUserName() {
- return this.userName;
- }
-
- public MyProxyRepositorySettings setUserName(String userName) {
- this.userName = userName;
- return this;
- }
-
- public void unsetUserName() {
- this.userName = null;
- }
-
- /** Returns true if field userName is set (has been assigned a value) and false otherwise */
- public boolean isSetUserName() {
- return this.userName != null;
- }
-
- public void setUserNameIsSet(boolean value) {
- if (!value) {
- this.userName = null;
- }
- }
-
- public String getPassword() {
- return this.password;
- }
-
- public MyProxyRepositorySettings setPassword(String password) {
- this.password = password;
- return this;
- }
-
- public void unsetPassword() {
- this.password = null;
- }
-
- /** Returns true if field password is set (has been assigned a value) and false otherwise */
- public boolean isSetPassword() {
- return this.password != null;
- }
-
- public void setPasswordIsSet(boolean value) {
- if (!value) {
- this.password = null;
- }
- }
-
- public String getMyproxyServer() {
- return this.myproxyServer;
- }
-
- public MyProxyRepositorySettings setMyproxyServer(String myproxyServer) {
- this.myproxyServer = myproxyServer;
- return this;
- }
-
- public void unsetMyproxyServer() {
- this.myproxyServer = null;
- }
-
- /** Returns true if field myproxyServer is set (has been assigned a value) and false otherwise */
- public boolean isSetMyproxyServer() {
- return this.myproxyServer != null;
- }
-
- public void setMyproxyServerIsSet(boolean value) {
- if (!value) {
- this.myproxyServer = null;
- }
- }
-
- public int getLifetime() {
- return this.lifetime;
- }
-
- public MyProxyRepositorySettings setLifetime(int lifetime) {
- this.lifetime = lifetime;
- setLifetimeIsSet(true);
- return this;
- }
-
- public void unsetLifetime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
- }
-
- /** Returns true if field lifetime is set (has been assigned a value) and false otherwise */
- public boolean isSetLifetime() {
- return EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
- }
-
- public void setLifetimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_NAME:
- if (value == null) {
- unsetUserName();
- } else {
- setUserName((String)value);
- }
- break;
-
- case PASSWORD:
- if (value == null) {
- unsetPassword();
- } else {
- setPassword((String)value);
- }
- break;
-
- case MYPROXY_SERVER:
- if (value == null) {
- unsetMyproxyServer();
- } else {
- setMyproxyServer((String)value);
- }
- break;
-
- case LIFETIME:
- if (value == null) {
- unsetLifetime();
- } else {
- setLifetime((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_NAME:
- return getUserName();
-
- case PASSWORD:
- return getPassword();
-
- case MYPROXY_SERVER:
- return getMyproxyServer();
-
- case LIFETIME:
- return Integer.valueOf(getLifetime());
-
- }
- 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 USER_NAME:
- return isSetUserName();
- case PASSWORD:
- return isSetPassword();
- case MYPROXY_SERVER:
- return isSetMyproxyServer();
- case LIFETIME:
- return isSetLifetime();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof MyProxyRepositorySettings)
- return this.equals((MyProxyRepositorySettings)that);
- return false;
- }
-
- public boolean equals(MyProxyRepositorySettings that) {
- if (that == null)
- return false;
-
- boolean this_present_userName = true && this.isSetUserName();
- boolean that_present_userName = true && that.isSetUserName();
- if (this_present_userName || that_present_userName) {
- if (!(this_present_userName && that_present_userName))
- return false;
- if (!this.userName.equals(that.userName))
- return false;
- }
-
- boolean this_present_password = true && this.isSetPassword();
- boolean that_present_password = true && that.isSetPassword();
- if (this_present_password || that_present_password) {
- if (!(this_present_password && that_present_password))
- return false;
- if (!this.password.equals(that.password))
- return false;
- }
-
- boolean this_present_myproxyServer = true && this.isSetMyproxyServer();
- boolean that_present_myproxyServer = true && that.isSetMyproxyServer();
- if (this_present_myproxyServer || that_present_myproxyServer) {
- if (!(this_present_myproxyServer && that_present_myproxyServer))
- return false;
- if (!this.myproxyServer.equals(that.myproxyServer))
- return false;
- }
-
- boolean this_present_lifetime = true && this.isSetLifetime();
- boolean that_present_lifetime = true && that.isSetLifetime();
- if (this_present_lifetime || that_present_lifetime) {
- if (!(this_present_lifetime && that_present_lifetime))
- return false;
- if (this.lifetime != that.lifetime)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(MyProxyRepositorySettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPassword()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMyproxyServer()).compareTo(other.isSetMyproxyServer());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMyproxyServer()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myproxyServer, other.myproxyServer);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLifetime()).compareTo(other.isSetLifetime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLifetime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lifetime, other.lifetime);
- 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("MyProxyRepositorySettings(");
- boolean first = true;
-
- if (isSetUserName()) {
- sb.append("userName:");
- if (this.userName == null) {
- sb.append("null");
- } else {
- sb.append(this.userName);
- }
- first = false;
- }
- if (isSetPassword()) {
- if (!first) sb.append(", ");
- sb.append("password:");
- if (this.password == null) {
- sb.append("null");
- } else {
- sb.append(this.password);
- }
- first = false;
- }
- if (isSetMyproxyServer()) {
- if (!first) sb.append(", ");
- sb.append("myproxyServer:");
- if (this.myproxyServer == null) {
- sb.append("null");
- } else {
- sb.append(this.myproxyServer);
- }
- first = false;
- }
- if (isSetLifetime()) {
- if (!first) sb.append(", ");
- sb.append("lifetime:");
- sb.append(this.lifetime);
- 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 MyProxyRepositorySettingsStandardSchemeFactory implements SchemeFactory {
- public MyProxyRepositorySettingsStandardScheme getScheme() {
- return new MyProxyRepositorySettingsStandardScheme();
- }
- }
-
- private static class MyProxyRepositorySettingsStandardScheme extends StandardScheme<MyProxyRepositorySettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, MyProxyRepositorySettings 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: // USER_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PASSWORD
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // MYPROXY_SERVER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.myproxyServer = iprot.readString();
- struct.setMyproxyServerIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // LIFETIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.lifetime = iprot.readI32();
- struct.setLifetimeIsSet(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, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userName != null) {
- if (struct.isSetUserName()) {
- oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
- oprot.writeString(struct.userName);
- oprot.writeFieldEnd();
- }
- }
- if (struct.password != null) {
- if (struct.isSetPassword()) {
- oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
- oprot.writeString(struct.password);
- oprot.writeFieldEnd();
- }
- }
- if (struct.myproxyServer != null) {
- if (struct.isSetMyproxyServer()) {
- oprot.writeFieldBegin(MYPROXY_SERVER_FIELD_DESC);
- oprot.writeString(struct.myproxyServer);
- oprot.writeFieldEnd();
- }
- }
- if (struct.isSetLifetime()) {
- oprot.writeFieldBegin(LIFETIME_FIELD_DESC);
- oprot.writeI32(struct.lifetime);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class MyProxyRepositorySettingsTupleSchemeFactory implements SchemeFactory {
- public MyProxyRepositorySettingsTupleScheme getScheme() {
- return new MyProxyRepositorySettingsTupleScheme();
- }
- }
-
- private static class MyProxyRepositorySettingsTupleScheme extends TupleScheme<MyProxyRepositorySettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserName()) {
- optionals.set(0);
- }
- if (struct.isSetPassword()) {
- optionals.set(1);
- }
- if (struct.isSetMyproxyServer()) {
- optionals.set(2);
- }
- if (struct.isSetLifetime()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetUserName()) {
- oprot.writeString(struct.userName);
- }
- if (struct.isSetPassword()) {
- oprot.writeString(struct.password);
- }
- if (struct.isSetMyproxyServer()) {
- oprot.writeString(struct.myproxyServer);
- }
- if (struct.isSetLifetime()) {
- oprot.writeI32(struct.lifetime);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- }
- if (incoming.get(2)) {
- struct.myproxyServer = iprot.readString();
- struct.setMyproxyServerIsSet(true);
- }
- if (incoming.get(3)) {
- struct.lifetime = iprot.readI32();
- struct.setLifetimeIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java
deleted file mode 100644
index e572ad2..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java
+++ /dev/null
@@ -1,611 +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.experiment.execution;
-
-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;
-
-public class NameValuePairType implements org.apache.thrift.TBase<NameValuePairType, NameValuePairType._Fields>, java.io.Serializable, Cloneable, Comparable<NameValuePairType> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NameValuePairType");
-
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", 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 NameValuePairTypeStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NameValuePairTypeTupleSchemeFactory());
- }
-
- public String name; // optional
- public String value; // optional
- public String description; // 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 {
- NAME((short)1, "name"),
- VALUE((short)2, "value"),
- DESCRIPTION((short)3, "description");
-
- 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: // NAME
- return NAME;
- case 2: // VALUE
- return VALUE;
- case 3: // DESCRIPTION
- return DESCRIPTION;
- 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.NAME,_Fields.VALUE,_Fields.DESCRIPTION};
- 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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(NameValuePairType.class, metaDataMap);
- }
-
- public NameValuePairType() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public NameValuePairType(NameValuePairType other) {
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetValue()) {
- this.value = other.value;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- }
-
- public NameValuePairType deepCopy() {
- return new NameValuePairType(this);
- }
-
- @Override
- public void clear() {
- this.name = null;
- this.value = null;
- this.description = null;
- }
-
- public String getName() {
- return this.name;
- }
-
- public NameValuePairType setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getValue() {
- return this.value;
- }
-
- public NameValuePairType setValue(String value) {
- this.value = value;
- return this;
- }
-
- public void unsetValue() {
- this.value = null;
- }
-
- /** Returns true if field value is set (has been assigned a value) and false otherwise */
- public boolean isSetValue() {
- return this.value != null;
- }
-
- public void setValueIsSet(boolean value) {
- if (!value) {
- this.value = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public NameValuePairType setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NAME:
- return getName();
-
- case VALUE:
- return getValue();
-
- case DESCRIPTION:
- return getDescription();
-
- }
- 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 NAME:
- return isSetName();
- case VALUE:
- return isSetValue();
- case DESCRIPTION:
- return isSetDescription();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof NameValuePairType)
- return this.equals((NameValuePairType)that);
- return false;
- }
-
- public boolean equals(NameValuePairType that) {
- if (that == null)
- return false;
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_value = true && this.isSetValue();
- boolean that_present_value = true && that.isSetValue();
- if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value))
- return false;
- if (!this.value.equals(that.value))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(NameValuePairType other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- 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("NameValuePairType(");
- boolean first = true;
-
- if (isSetName()) {
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- }
- if (isSetValue()) {
- if (!first) sb.append(", ");
- sb.append("value:");
- if (this.value == null) {
- sb.append("null");
- } else {
- sb.append(this.value);
- }
- first = false;
- }
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- 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 {
- 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 NameValuePairTypeStandardSchemeFactory implements SchemeFactory {
- public NameValuePairTypeStandardScheme getScheme() {
- return new NameValuePairTypeStandardScheme();
- }
- }
-
- private static class NameValuePairTypeStandardScheme extends StandardScheme<NameValuePairType> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, NameValuePairType 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: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VALUE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.value = iprot.readString();
- struct.setValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(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, NameValuePairType struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.name != null) {
- if (struct.isSetName()) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- }
- if (struct.value != null) {
- if (struct.isSetValue()) {
- oprot.writeFieldBegin(VALUE_FIELD_DESC);
- oprot.writeString(struct.value);
- oprot.writeFieldEnd();
- }
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class NameValuePairTypeTupleSchemeFactory implements SchemeFactory {
- public NameValuePairTypeTupleScheme getScheme() {
- return new NameValuePairTypeTupleScheme();
- }
- }
-
- private static class NameValuePairTypeTupleScheme extends TupleScheme<NameValuePairType> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetName()) {
- optionals.set(0);
- }
- if (struct.isSetValue()) {
- optionals.set(1);
- }
- if (struct.isSetDescription()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetValue()) {
- oprot.writeString(struct.value);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.value = iprot.readString();
- struct.setValueIsSet(true);
- }
- if (incoming.get(2)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/77d4925d/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java
----------------------------------------------------------------------
diff --git a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java b/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java
deleted file mode 100644
index 2b0f58a..0000000
--- a/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java
+++ /dev/null
@@ -1,879 +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.experiment.execution;
-
-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;
-
-public class NodeSettings implements org.apache.thrift.TBase<NodeSettings, NodeSettings._Fields>, java.io.Serializable, Cloneable, Comparable<NodeSettings> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NodeSettings");
-
- private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField SERVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField HOST_SCHEDULING_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("hostSchedulingSettings", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final org.apache.thrift.protocol.TField HPC_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("hpcSettings", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final org.apache.thrift.protocol.TField NAME_VALUE_PAIR_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("nameValuePairList", org.apache.thrift.protocol.TType.LIST, (short)5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NodeSettingsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NodeSettingsTupleSchemeFactory());
- }
-
- public String nodeId; // optional
- public String serviceId; // optional
- public HostSchedulingSettings hostSchedulingSettings; // optional
- public HPCSettings hpcSettings; // optional
- public List<NameValuePairType> nameValuePairList; // 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 {
- NODE_ID((short)1, "nodeId"),
- SERVICE_ID((short)2, "serviceId"),
- HOST_SCHEDULING_SETTINGS((short)3, "hostSchedulingSettings"),
- HPC_SETTINGS((short)4, "hpcSettings"),
- NAME_VALUE_PAIR_LIST((short)5, "nameValuePairList");
-
- 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: // NODE_ID
- return NODE_ID;
- case 2: // SERVICE_ID
- return SERVICE_ID;
- case 3: // HOST_SCHEDULING_SETTINGS
- return HOST_SCHEDULING_SETTINGS;
- case 4: // HPC_SETTINGS
- return HPC_SETTINGS;
- case 5: // NAME_VALUE_PAIR_LIST
- return NAME_VALUE_PAIR_LIST;
- 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.NODE_ID,_Fields.SERVICE_ID,_Fields.HOST_SCHEDULING_SETTINGS,_Fields.HPC_SETTINGS,_Fields.NAME_VALUE_PAIR_LIST};
- 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.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SERVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("serviceId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.HOST_SCHEDULING_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("hostSchedulingSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HostSchedulingSettings.class)));
- tmpMap.put(_Fields.HPC_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("hpcSettings", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HPCSettings.class)));
- tmpMap.put(_Fields.NAME_VALUE_PAIR_LIST, new org.apache.thrift.meta_data.FieldMetaData("nameValuePairList", 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, NameValuePairType.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NodeSettings.class, metaDataMap);
- }
-
- public NodeSettings() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public NodeSettings(NodeSettings other) {
- if (other.isSetNodeId()) {
- this.nodeId = other.nodeId;
- }
- if (other.isSetServiceId()) {
- this.serviceId = other.serviceId;
- }
- if (other.isSetHostSchedulingSettings()) {
- this.hostSchedulingSettings = new HostSchedulingSettings(other.hostSchedulingSettings);
- }
- if (other.isSetHpcSettings()) {
- this.hpcSettings = new HPCSettings(other.hpcSettings);
- }
- if (other.isSetNameValuePairList()) {
- List<NameValuePairType> __this__nameValuePairList = new ArrayList<NameValuePairType>(other.nameValuePairList.size());
- for (NameValuePairType other_element : other.nameValuePairList) {
- __this__nameValuePairList.add(new NameValuePairType(other_element));
- }
- this.nameValuePairList = __this__nameValuePairList;
- }
- }
-
- public NodeSettings deepCopy() {
- return new NodeSettings(this);
- }
-
- @Override
- public void clear() {
- this.nodeId = null;
- this.serviceId = null;
- this.hostSchedulingSettings = null;
- this.hpcSettings = null;
- this.nameValuePairList = null;
- }
-
- public String getNodeId() {
- return this.nodeId;
- }
-
- public NodeSettings setNodeId(String nodeId) {
- this.nodeId = nodeId;
- return this;
- }
-
- public void unsetNodeId() {
- this.nodeId = null;
- }
-
- /** Returns true if field nodeId is set (has been assigned a value) and false otherwise */
- public boolean isSetNodeId() {
- return this.nodeId != null;
- }
-
- public void setNodeIdIsSet(boolean value) {
- if (!value) {
- this.nodeId = null;
- }
- }
-
- public String getServiceId() {
- return this.serviceId;
- }
-
- public NodeSettings setServiceId(String serviceId) {
- this.serviceId = serviceId;
- return this;
- }
-
- public void unsetServiceId() {
- this.serviceId = null;
- }
-
- /** Returns true if field serviceId is set (has been assigned a value) and false otherwise */
- public boolean isSetServiceId() {
- return this.serviceId != null;
- }
-
- public void setServiceIdIsSet(boolean value) {
- if (!value) {
- this.serviceId = null;
- }
- }
-
- public HostSchedulingSettings getHostSchedulingSettings() {
- return this.hostSchedulingSettings;
- }
-
- public NodeSettings setHostSchedulingSettings(HostSchedulingSettings hostSchedulingSettings) {
- this.hostSchedulingSettings = hostSchedulingSettings;
- return this;
- }
-
- public void unsetHostSchedulingSettings() {
- this.hostSchedulingSettings = null;
- }
-
- /** Returns true if field hostSchedulingSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetHostSchedulingSettings() {
- return this.hostSchedulingSettings != null;
- }
-
- public void setHostSchedulingSettingsIsSet(boolean value) {
- if (!value) {
- this.hostSchedulingSettings = null;
- }
- }
-
- public HPCSettings getHpcSettings() {
- return this.hpcSettings;
- }
-
- public NodeSettings setHpcSettings(HPCSettings hpcSettings) {
- this.hpcSettings = hpcSettings;
- return this;
- }
-
- public void unsetHpcSettings() {
- this.hpcSettings = null;
- }
-
- /** Returns true if field hpcSettings is set (has been assigned a value) and false otherwise */
- public boolean isSetHpcSettings() {
- return this.hpcSettings != null;
- }
-
- public void setHpcSettingsIsSet(boolean value) {
- if (!value) {
- this.hpcSettings = null;
- }
- }
-
- public int getNameValuePairListSize() {
- return (this.nameValuePairList == null) ? 0 : this.nameValuePairList.size();
- }
-
- public java.util.Iterator<NameValuePairType> getNameValuePairListIterator() {
- return (this.nameValuePairList == null) ? null : this.nameValuePairList.iterator();
- }
-
- public void addToNameValuePairList(NameValuePairType elem) {
- if (this.nameValuePairList == null) {
- this.nameValuePairList = new ArrayList<NameValuePairType>();
- }
- this.nameValuePairList.add(elem);
- }
-
- public List<NameValuePairType> getNameValuePairList() {
- return this.nameValuePairList;
- }
-
- public NodeSettings setNameValuePairList(List<NameValuePairType> nameValuePairList) {
- this.nameValuePairList = nameValuePairList;
- return this;
- }
-
- public void unsetNameValuePairList() {
- this.nameValuePairList = null;
- }
-
- /** Returns true if field nameValuePairList is set (has been assigned a value) and false otherwise */
- public boolean isSetNameValuePairList() {
- return this.nameValuePairList != null;
- }
-
- public void setNameValuePairListIsSet(boolean value) {
- if (!value) {
- this.nameValuePairList = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NODE_ID:
- if (value == null) {
- unsetNodeId();
- } else {
- setNodeId((String)value);
- }
- break;
-
- case SERVICE_ID:
- if (value == null) {
- unsetServiceId();
- } else {
- setServiceId((String)value);
- }
- break;
-
- case HOST_SCHEDULING_SETTINGS:
- if (value == null) {
- unsetHostSchedulingSettings();
- } else {
- setHostSchedulingSettings((HostSchedulingSettings)value);
- }
- break;
-
- case HPC_SETTINGS:
- if (value == null) {
- unsetHpcSettings();
- } else {
- setHpcSettings((HPCSettings)value);
- }
- break;
-
- case NAME_VALUE_PAIR_LIST:
- if (value == null) {
- unsetNameValuePairList();
- } else {
- setNameValuePairList((List<NameValuePairType>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NODE_ID:
- return getNodeId();
-
- case SERVICE_ID:
- return getServiceId();
-
- case HOST_SCHEDULING_SETTINGS:
- return getHostSchedulingSettings();
-
- case HPC_SETTINGS:
- return getHpcSettings();
-
- case NAME_VALUE_PAIR_LIST:
- return getNameValuePairList();
-
- }
- 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 NODE_ID:
- return isSetNodeId();
- case SERVICE_ID:
- return isSetServiceId();
- case HOST_SCHEDULING_SETTINGS:
- return isSetHostSchedulingSettings();
- case HPC_SETTINGS:
- return isSetHpcSettings();
- case NAME_VALUE_PAIR_LIST:
- return isSetNameValuePairList();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof NodeSettings)
- return this.equals((NodeSettings)that);
- return false;
- }
-
- public boolean equals(NodeSettings that) {
- if (that == null)
- return false;
-
- boolean this_present_nodeId = true && this.isSetNodeId();
- boolean that_present_nodeId = true && that.isSetNodeId();
- if (this_present_nodeId || that_present_nodeId) {
- if (!(this_present_nodeId && that_present_nodeId))
- return false;
- if (!this.nodeId.equals(that.nodeId))
- return false;
- }
-
- boolean this_present_serviceId = true && this.isSetServiceId();
- boolean that_present_serviceId = true && that.isSetServiceId();
- if (this_present_serviceId || that_present_serviceId) {
- if (!(this_present_serviceId && that_present_serviceId))
- return false;
- if (!this.serviceId.equals(that.serviceId))
- return false;
- }
-
- boolean this_present_hostSchedulingSettings = true && this.isSetHostSchedulingSettings();
- boolean that_present_hostSchedulingSettings = true && that.isSetHostSchedulingSettings();
- if (this_present_hostSchedulingSettings || that_present_hostSchedulingSettings) {
- if (!(this_present_hostSchedulingSettings && that_present_hostSchedulingSettings))
- return false;
- if (!this.hostSchedulingSettings.equals(that.hostSchedulingSettings))
- return false;
- }
-
- boolean this_present_hpcSettings = true && this.isSetHpcSettings();
- boolean that_present_hpcSettings = true && that.isSetHpcSettings();
- if (this_present_hpcSettings || that_present_hpcSettings) {
- if (!(this_present_hpcSettings && that_present_hpcSettings))
- return false;
- if (!this.hpcSettings.equals(that.hpcSettings))
- return false;
- }
-
- boolean this_present_nameValuePairList = true && this.isSetNameValuePairList();
- boolean that_present_nameValuePairList = true && that.isSetNameValuePairList();
- if (this_present_nameValuePairList || that_present_nameValuePairList) {
- if (!(this_present_nameValuePairList && that_present_nameValuePairList))
- return false;
- if (!this.nameValuePairList.equals(that.nameValuePairList))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(NodeSettings other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNodeId()).compareTo(other.isSetNodeId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNodeId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeId, other.nodeId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetServiceId()).compareTo(other.isSetServiceId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServiceId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceId, other.serviceId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetHostSchedulingSettings()).compareTo(other.isSetHostSchedulingSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHostSchedulingSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostSchedulingSettings, other.hostSchedulingSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetHpcSettings()).compareTo(other.isSetHpcSettings());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetHpcSettings()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hpcSettings, other.hpcSettings);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNameValuePairList()).compareTo(other.isSetNameValuePairList());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNameValuePairList()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameValuePairList, other.nameValuePairList);
- 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("NodeSettings(");
- boolean first = true;
-
- if (isSetNodeId()) {
- sb.append("nodeId:");
- if (this.nodeId == null) {
- sb.append("null");
- } else {
- sb.append(this.nodeId);
- }
- first = false;
- }
- if (isSetServiceId()) {
- if (!first) sb.append(", ");
- sb.append("serviceId:");
- if (this.serviceId == null) {
- sb.append("null");
- } else {
- sb.append(this.serviceId);
- }
- first = false;
- }
- if (isSetHostSchedulingSettings()) {
- if (!first) sb.append(", ");
- sb.append("hostSchedulingSettings:");
- if (this.hostSchedulingSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.hostSchedulingSettings);
- }
- first = false;
- }
- if (isSetHpcSettings()) {
- if (!first) sb.append(", ");
- sb.append("hpcSettings:");
- if (this.hpcSettings == null) {
- sb.append("null");
- } else {
- sb.append(this.hpcSettings);
- }
- first = false;
- }
- if (isSetNameValuePairList()) {
- if (!first) sb.append(", ");
- sb.append("nameValuePairList:");
- if (this.nameValuePairList == null) {
- sb.append("null");
- } else {
- sb.append(this.nameValuePairList);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (hostSchedulingSettings != null) {
- hostSchedulingSettings.validate();
- }
- if (hpcSettings != null) {
- hpcSettings.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 NodeSettingsStandardSchemeFactory implements SchemeFactory {
- public NodeSettingsStandardScheme getScheme() {
- return new NodeSettingsStandardScheme();
- }
- }
-
- private static class NodeSettingsStandardScheme extends StandardScheme<NodeSettings> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, NodeSettings 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: // NODE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.nodeId = iprot.readString();
- struct.setNodeIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SERVICE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.serviceId = iprot.readString();
- struct.setServiceIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // HOST_SCHEDULING_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hostSchedulingSettings = new HostSchedulingSettings();
- struct.hostSchedulingSettings.read(iprot);
- struct.setHostSchedulingSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // HPC_SETTINGS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.hpcSettings = new HPCSettings();
- struct.hpcSettings.read(iprot);
- struct.setHpcSettingsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // NAME_VALUE_PAIR_LIST
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.nameValuePairList = new ArrayList<NameValuePairType>(_list0.size);
- for (int _i1 = 0; _i1 < _list0.size; ++_i1)
- {
- NameValuePairType _elem2;
- _elem2 = new NameValuePairType();
- _elem2.read(iprot);
- struct.nameValuePairList.add(_elem2);
- }
- iprot.readListEnd();
- }
- struct.setNameValuePairListIsSet(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, NodeSettings struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.nodeId != null) {
- if (struct.isSetNodeId()) {
- oprot.writeFieldBegin(NODE_ID_FIELD_DESC);
- oprot.writeString(struct.nodeId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.serviceId != null) {
- if (struct.isSetServiceId()) {
- oprot.writeFieldBegin(SERVICE_ID_FIELD_DESC);
- oprot.writeString(struct.serviceId);
- oprot.writeFieldEnd();
- }
- }
- if (struct.hostSchedulingSettings != null) {
- if (struct.isSetHostSchedulingSettings()) {
- oprot.writeFieldBegin(HOST_SCHEDULING_SETTINGS_FIELD_DESC);
- struct.hostSchedulingSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.hpcSettings != null) {
- if (struct.isSetHpcSettings()) {
- oprot.writeFieldBegin(HPC_SETTINGS_FIELD_DESC);
- struct.hpcSettings.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.nameValuePairList != null) {
- if (struct.isSetNameValuePairList()) {
- oprot.writeFieldBegin(NAME_VALUE_PAIR_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nameValuePairList.size()));
- for (NameValuePairType _iter3 : struct.nameValuePairList)
- {
- _iter3.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class NodeSettingsTupleSchemeFactory implements SchemeFactory {
- public NodeSettingsTupleScheme getScheme() {
- return new NodeSettingsTupleScheme();
- }
- }
-
- private static class NodeSettingsTupleScheme extends TupleScheme<NodeSettings> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, NodeSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNodeId()) {
- optionals.set(0);
- }
- if (struct.isSetServiceId()) {
- optionals.set(1);
- }
- if (struct.isSetHostSchedulingSettings()) {
- optionals.set(2);
- }
- if (struct.isSetHpcSettings()) {
- optionals.set(3);
- }
- if (struct.isSetNameValuePairList()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetNodeId()) {
- oprot.writeString(struct.nodeId);
- }
- if (struct.isSetServiceId()) {
- oprot.writeString(struct.serviceId);
- }
- if (struct.isSetHostSchedulingSettings()) {
- struct.hostSchedulingSettings.write(oprot);
- }
- if (struct.isSetHpcSettings()) {
- struct.hpcSettings.write(oprot);
- }
- if (struct.isSetNameValuePairList()) {
- {
- oprot.writeI32(struct.nameValuePairList.size());
- for (NameValuePairType _iter4 : struct.nameValuePairList)
- {
- _iter4.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, NodeSettings struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.nodeId = iprot.readString();
- struct.setNodeIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.serviceId = iprot.readString();
- struct.setServiceIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.hostSchedulingSettings = new HostSchedulingSettings();
- struct.hostSchedulingSettings.read(iprot);
- struct.setHostSchedulingSettingsIsSet(true);
- }
- if (incoming.get(3)) {
- struct.hpcSettings = new HPCSettings();
- struct.hpcSettings.read(iprot);
- struct.setHpcSettingsIsSet(true);
- }
- if (incoming.get(4)) {
- {
- org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.nameValuePairList = new ArrayList<NameValuePairType>(_list5.size);
- for (int _i6 = 0; _i6 < _list5.size; ++_i6)
- {
- NameValuePairType _elem7;
- _elem7 = new NameValuePairType();
- _elem7.read(iprot);
- struct.nameValuePairList.add(_elem7);
- }
- }
- struct.setNameValuePairListIsSet(true);
- }
- }
- }
-
-}
-