Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45C2B17AF0 for ; Fri, 7 Nov 2014 00:11:17 +0000 (UTC) Received: (qmail 28522 invoked by uid 500); 7 Nov 2014 00:11:17 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 28453 invoked by uid 500); 7 Nov 2014 00:11:17 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 28246 invoked by uid 99); 7 Nov 2014 00:11:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 00:11:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ADC2D928AEF; Fri, 7 Nov 2014 00:11:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shameera@apache.org To: commits@airavata.apache.org Date: Fri, 07 Nov 2014 00:11:22 -0000 Message-Id: <3ea719f2478f45e8aa07d8e959d60a21@git.apache.org> In-Reply-To: <5e7822cd61ac4160a447bb0b5f368e5c@git.apache.org> References: <5e7822cd61ac4160a447bb0b5f368e5c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/23] airavata git commit: re-arrange server and clint code to create seperate distributions. AIRAVATA-1471 http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java ---------------------------------------------------------------------- diff --git a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java new file mode 100644 index 0000000..eb8ddf7 --- /dev/null +++ b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java @@ -0,0 +1,2867 @@ + /* + * 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.gfac.cpi; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings("all") public class GfacService { + + public interface Iface { + + /** + * Query gfac server to fetch the CPI version + */ + public String getGFACServiceVersion() throws org.apache.thrift.TException; + + /** + * * After creating the experiment Data and Task Data in the orchestrator + * * Orchestrator has to invoke this operation for each Task per experiment to run + * * the actual Job related actions. + * * + * * @param experimentID + * * @param taskID + * * @param gatewayId: + * * The GatewayId is inferred from security context and passed onto gfac. + * * @return sucess/failure + * * + * * + * + * @param experimentId + * @param taskId + * @param gatewayId + */ + public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException; + + /** + * * + * * Terminate the running job.At this point user + * * does not have to know the job ID so in the argument + * * we do not make it to required jobID to provide. + * * + * * + * * @param experimentID + * * @param taskID + * * @return sucess/failure + * * + * * + * + * @param experimentId + * @param taskId + */ + public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cancelJob(String experimentId, String taskId, 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 { + 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 getGFACServiceVersion() throws org.apache.thrift.TException + { + send_getGFACServiceVersion(); + return recv_getGFACServiceVersion(); + } + + public void send_getGFACServiceVersion() throws org.apache.thrift.TException + { + getGFACServiceVersion_args args = new getGFACServiceVersion_args(); + sendBase("getGFACServiceVersion", args); + } + + public String recv_getGFACServiceVersion() throws org.apache.thrift.TException + { + getGFACServiceVersion_result result = new getGFACServiceVersion_result(); + receiveBase(result, "getGFACServiceVersion"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result"); + } + + public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException + { + send_submitJob(experimentId, taskId, gatewayId); + return recv_submitJob(); + } + + public void send_submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException + { + submitJob_args args = new submitJob_args(); + args.setExperimentId(experimentId); + args.setTaskId(taskId); + args.setGatewayId(gatewayId); + sendBase("submitJob", args); + } + + public boolean recv_submitJob() throws org.apache.thrift.TException + { + submitJob_result result = new submitJob_result(); + receiveBase(result, "submitJob"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitJob failed: unknown result"); + } + + public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException + { + send_cancelJob(experimentId, taskId); + return recv_cancelJob(); + } + + public void send_cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException + { + cancelJob_args args = new cancelJob_args(); + args.setExperimentId(experimentId); + args.setTaskId(taskId); + sendBase("cancelJob", args); + } + + public boolean recv_cancelJob() throws org.apache.thrift.TException + { + cancelJob_result result = new cancelJob_result(); + receiveBase(result, "cancelJob"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelJob failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + 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 getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall { + public getGFACServiceVersion_call(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); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getGFACServiceVersion_args args = new getGFACServiceVersion_args(); + 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_getGFACServiceVersion(); + } + } + + public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall { + private String experimentId; + private String taskId; + private String gatewayId; + public submitJob_call(String experimentId, String taskId, String gatewayId, 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; + this.taskId = taskId; + this.gatewayId = gatewayId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0)); + submitJob_args args = new submitJob_args(); + args.setExperimentId(experimentId); + args.setTaskId(taskId); + args.setGatewayId(gatewayId); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean 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_submitJob(); + } + } + + public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cancelJob_call method_call = new cancelJob_call(experimentId, taskId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cancelJob_call extends org.apache.thrift.async.TAsyncMethodCall { + private String experimentId; + private String taskId; + public cancelJob_call(String experimentId, String taskId, 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; + this.taskId = taskId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelJob", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cancelJob_args args = new cancelJob_args(); + args.setExperimentId(experimentId); + args.setTaskId(taskId); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean 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_cancelJob(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("getGFACServiceVersion", new getGFACServiceVersion()); + processMap.put("submitJob", new submitJob()); + processMap.put("cancelJob", new cancelJob()); + return processMap; + } + + public static class getGFACServiceVersion extends org.apache.thrift.ProcessFunction { + public getGFACServiceVersion() { + super("getGFACServiceVersion"); + } + + public getGFACServiceVersion_args getEmptyArgsInstance() { + return new getGFACServiceVersion_args(); + } + + protected boolean isOneway() { + return false; + } + + public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException { + getGFACServiceVersion_result result = new getGFACServiceVersion_result(); + result.success = iface.getGFACServiceVersion(); + return result; + } + } + + public static class submitJob extends org.apache.thrift.ProcessFunction { + public submitJob() { + super("submitJob"); + } + + public submitJob_args getEmptyArgsInstance() { + return new submitJob_args(); + } + + protected boolean isOneway() { + return false; + } + + public submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException { + submitJob_result result = new submitJob_result(); + result.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId); + result.setSuccessIsSet(true); + return result; + } + } + + public static class cancelJob extends org.apache.thrift.ProcessFunction { + public cancelJob() { + super("cancelJob"); + } + + public cancelJob_args getEmptyArgsInstance() { + return new cancelJob_args(); + } + + protected boolean isOneway() { + return false; + } + + public cancelJob_result getResult(I iface, cancelJob_args args) throws org.apache.thrift.TException { + cancelJob_result result = new cancelJob_result(); + result.success = iface.cancelJob(args.experimentId, args.taskId); + result.setSuccessIsSet(true); + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("getGFACServiceVersion", new getGFACServiceVersion()); + processMap.put("submitJob", new submitJob()); + processMap.put("cancelJob", new cancelJob()); + return processMap; + } + + public static class getGFACServiceVersion extends org.apache.thrift.AsyncProcessFunction { + public getGFACServiceVersion() { + super("getGFACServiceVersion"); + } + + public getGFACServiceVersion_args getEmptyArgsInstance() { + return new getGFACServiceVersion_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + getGFACServiceVersion_result result = new getGFACServiceVersion_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; + getGFACServiceVersion_result result = new getGFACServiceVersion_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, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getGFACServiceVersion(resultHandler); + } + } + + public static class submitJob extends org.apache.thrift.AsyncProcessFunction { + public submitJob() { + super("submitJob"); + } + + public submitJob_args getEmptyArgsInstance() { + return new submitJob_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + submitJob_result result = new submitJob_result(); + result.success = o; + result.setSuccessIsSet(true); + 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; + submitJob_result result = new submitJob_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, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.submitJob(args.experimentId, args.taskId, args.gatewayId,resultHandler); + } + } + + public static class cancelJob extends org.apache.thrift.AsyncProcessFunction { + public cancelJob() { + super("cancelJob"); + } + + public cancelJob_args getEmptyArgsInstance() { + return new cancelJob_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + cancelJob_result result = new cancelJob_result(); + result.success = o; + result.setSuccessIsSet(true); + 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; + cancelJob_result result = new cancelJob_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, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.cancelJob(args.experimentId, args.taskId,resultHandler); + } + } + + } + + public static class getGFACServiceVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + 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) { + 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; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap); + } + + public getGFACServiceVersion_args() { + } + + /** + * Performs a deep copy on other. + */ + public getGFACServiceVersion_args(getGFACServiceVersion_args other) { + } + + public getGFACServiceVersion_args deepCopy() { + return new getGFACServiceVersion_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + 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) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getGFACServiceVersion_args) + return this.equals((getGFACServiceVersion_args)that); + return false; + } + + public boolean equals(getGFACServiceVersion_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getGFACServiceVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + 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("getGFACServiceVersion_args("); + boolean first = true; + + 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 getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory { + public getGFACServiceVersion_argsStandardScheme getScheme() { + return new getGFACServiceVersion_argsStandardScheme(); + } + } + + private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_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) { + 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, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory { + public getGFACServiceVersion_argsTupleScheme getScheme() { + return new getGFACServiceVersion_argsTupleScheme(); + } + } + + private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getGFACServiceVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getGFACServiceVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getGFACServiceVersion_resultTupleSchemeFactory()); + } + + public String success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + 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(getGFACServiceVersion_result.class, metaDataMap); + } + + public getGFACServiceVersion_result() { + } + + public getGFACServiceVersion_result( + String success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getGFACServiceVersion_result(getGFACServiceVersion_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + } + + public getGFACServiceVersion_result deepCopy() { + return new getGFACServiceVersion_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public String getSuccess() { + return this.success; + } + + public getGFACServiceVersion_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 getGFACServiceVersion_result) + return this.equals((getGFACServiceVersion_result)that); + return false; + } + + public boolean equals(getGFACServiceVersion_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(getGFACServiceVersion_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("getGFACServiceVersion_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 getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory { + public getGFACServiceVersion_resultStandardScheme getScheme() { + return new getGFACServiceVersion_resultStandardScheme(); + } + } + + private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_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, getGFACServiceVersion_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 getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory { + public getGFACServiceVersion_resultTupleScheme getScheme() { + return new getGFACServiceVersion_resultTupleScheme(); + } + } + + private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_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, getGFACServiceVersion_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 submitJob_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_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 org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory()); + } + + public String experimentId; // required + public String taskId; // required + public String gatewayId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { + EXPERIMENT_ID((short)1, "experimentId"), + TASK_ID((short)2, "taskId"), + GATEWAY_ID((short)3, "gatewayId"); + + private static final Map byName = new HashMap(); + + 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; + case 2: // TASK_ID + return TASK_ID; + 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 + 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.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, + 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.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap); + } + + public submitJob_args() { + } + + public submitJob_args( + String experimentId, + String taskId, + String gatewayId) + { + this(); + this.experimentId = experimentId; + this.taskId = taskId; + this.gatewayId = gatewayId; + } + + /** + * Performs a deep copy on other. + */ + public submitJob_args(submitJob_args other) { + if (other.isSetExperimentId()) { + this.experimentId = other.experimentId; + } + if (other.isSetTaskId()) { + this.taskId = other.taskId; + } + if (other.isSetGatewayId()) { + this.gatewayId = other.gatewayId; + } + } + + public submitJob_args deepCopy() { + return new submitJob_args(this); + } + + @Override + public void clear() { + this.experimentId = null; + this.taskId = null; + this.gatewayId = null; + } + + public String getExperimentId() { + return this.experimentId; + } + + public submitJob_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 String getTaskId() { + return this.taskId; + } + + public submitJob_args setTaskId(String taskId) { + this.taskId = taskId; + return this; + } + + public void unsetTaskId() { + this.taskId = null; + } + + /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ + public boolean isSetTaskId() { + return this.taskId != null; + } + + public void setTaskIdIsSet(boolean value) { + if (!value) { + this.taskId = null; + } + } + + public String getGatewayId() { + return this.gatewayId; + } + + public submitJob_args 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 EXPERIMENT_ID: + if (value == null) { + unsetExperimentId(); + } else { + setExperimentId((String)value); + } + break; + + case TASK_ID: + if (value == null) { + unsetTaskId(); + } else { + setTaskId((String)value); + } + break; + + case GATEWAY_ID: + if (value == null) { + unsetGatewayId(); + } else { + setGatewayId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EXPERIMENT_ID: + return getExperimentId(); + + case TASK_ID: + return getTaskId(); + + 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 EXPERIMENT_ID: + return isSetExperimentId(); + case TASK_ID: + return isSetTaskId(); + case GATEWAY_ID: + return isSetGatewayId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof submitJob_args) + return this.equals((submitJob_args)that); + return false; + } + + public boolean equals(submitJob_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; + } + + boolean this_present_taskId = true && this.isSetTaskId(); + boolean that_present_taskId = true && that.isSetTaskId(); + if (this_present_taskId || that_present_taskId) { + if (!(this_present_taskId && that_present_taskId)) + return false; + if (!this.taskId.equals(that.taskId)) + 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(submitJob_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; + } + } + lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId); + 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("submitJob_args("); + boolean first = true; + + sb.append("experimentId:"); + if (this.experimentId == null) { + sb.append("null"); + } else { + sb.append(this.experimentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("taskId:"); + if (this.taskId == null) { + sb.append("null"); + } else { + sb.append(this.taskId); + } + first = false; + 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 + if (experimentId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString()); + } + if (taskId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString()); + } + if (gatewayId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class submitJob_argsStandardSchemeFactory implements SchemeFactory { + public submitJob_argsStandardScheme getScheme() { + return new submitJob_argsStandardScheme(); + } + } + + private static class submitJob_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_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; + case 2: // TASK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.taskId = iprot.readString(); + struct.setTaskIdIsSet(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, submitJob_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(); + } + if (struct.taskId != null) { + oprot.writeFieldBegin(TASK_ID_FIELD_DESC); + oprot.writeString(struct.taskId); + oprot.writeFieldEnd(); + } + if (struct.gatewayId != null) { + oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); + oprot.writeString(struct.gatewayId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class submitJob_argsTupleSchemeFactory implements SchemeFactory { + public submitJob_argsTupleScheme getScheme() { + return new submitJob_argsTupleScheme(); + } + } + + private static class submitJob_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.experimentId); + oprot.writeString(struct.taskId); + oprot.writeString(struct.gatewayId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.experimentId = iprot.readString(); + struct.setExperimentIdIsSet(true); + struct.taskId = iprot.readString(); + struct.setTaskIdIsSet(true); + struct.gatewayId = iprot.readString(); + struct.setGatewayIdIsSet(true); + } + } + + } + + public static class submitJob_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + 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 + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.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.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap); + } + + public submitJob_result() { + } + + public submitJob_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public submitJob_result(submitJob_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public submitJob_result deepCopy() { + return new submitJob_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public submitJob_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + 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 submitJob_result) + return this.equals((submitJob_result)that); + return false; + } + + public boolean equals(submitJob_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(submitJob_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("submitJob_result("); + boolean first = true; + + sb.append("success:"); + 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 { + // 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 submitJob_resultStandardSchemeFactory implements SchemeFactory { + public submitJob_resultStandardScheme getScheme() { + return new submitJob_resultStandardScheme(); + } + } + + private static class submitJob_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_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.BOOL) { + struct.success = iprot.readBool(); + 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, submitJob_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class submitJob_resultTupleSchemeFactory implements SchemeFactory { + public submitJob_resultTupleScheme getScheme() { + return new submitJob_resultTupleScheme(); + } + } + + private static class submitJob_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_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.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class cancelJob_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelJob_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 org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory()); + } + + public String experimentId; // required + public String taskId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { + EXPERIMENT_ID((short)1, "experimentId"), + TASK_ID((short)2, "taskId"); + + private static final Map byName = new HashMap(); + + 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; + case 2: // TASK_ID + return TASK_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.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelJob_args.class, metaDataMap); + } + + public cancelJob_args() { + } + + public cancelJob_args( + String experimentId, + String taskId) + { + this(); + this.experimentId = experimentId; + this.taskId = taskId; + } + + /** + * Performs a deep copy on other. + */ + public cancelJob_args(cancelJob_args other) { + if (other.isSetExperimentId()) { + this.experimentId = other.experimentId; + } + if (other.isSetTaskId()) { + this.taskId = other.taskId; + } + } + + public cancelJob_args deepCopy() { + return new cancelJob_args(this); + } + + @Override + public void clear() { + this.experimentId = null; + this.taskId = null; + } + + public String getExperimentId() { + return this.experimentId; + } + + public cancelJob_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 String getTaskId() { + return this.taskId; + } + + public cancelJob_args setTaskId(String taskId) { + this.taskId = taskId; + return this; + } + + public void unsetTaskId() { + this.taskId = null; + } + + /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ + public boolean isSetTaskId() { + return this.taskId != null; + } + + public void setTaskIdIsSet(boolean value) { + if (!value) { + this.taskId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EXPERIMENT_ID: + if (value == null) { + unsetExperimentId(); + } else { + setExperimentId((String)value); + } + break; + + case TASK_ID: + if (value == null) { + unsetTaskId(); + } else { + setTaskId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EXPERIMENT_ID: + return getExperimentId(); + + case TASK_ID: + return getTaskId(); + + } + 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(); + case TASK_ID: + return isSetTaskId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cancelJob_args) + return this.equals((cancelJob_args)that); + return false; + } + + public boolean equals(cancelJob_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; + } + + boolean this_present_taskId = true && this.isSetTaskId(); + boolean that_present_taskId = true && that.isSetTaskId(); + if (this_present_taskId || that_present_taskId) { + if (!(this_present_taskId && that_present_taskId)) + return false; + if (!this.taskId.equals(that.taskId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(cancelJob_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; + } + } + lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId); + 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("cancelJob_args("); + boolean first = true; + + sb.append("experimentId:"); + if (this.experimentId == null) { + sb.append("null"); + } else { + sb.append(this.experimentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("taskId:"); + if (this.taskId == null) { + sb.append("null"); + } else { + sb.append(this.taskId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (experimentId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString()); + } + if (taskId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class cancelJob_argsStandardSchemeFactory implements SchemeFactory { + public cancelJob_argsStandardScheme getScheme() { + return new cancelJob_argsStandardScheme(); + } + } + + private static class cancelJob_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelJob_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; + case 2: // TASK_ID + if (schemeField.type == org.