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>
