You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/06/04 17:45:43 UTC
[1/3] airavata git commit: removed thrift generated client code from
gfac-service module and move it to gfac-client module. Refactored module
dependency of gfac
Repository: airavata
Updated Branches:
refs/heads/moduleRefactor 30f9d70ad -> 29cd57fdf
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
deleted file mode 100644
index 14fd7fe..0000000
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
+++ /dev/null
@@ -1,55 +0,0 @@
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.apache.airavata.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 gfac_cpi_serviceConstants {
-
- public static final String GFAC_CPI_VERSION = "0.13.0";
-
-}
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
index 21c137f..b01c8a5 100644
--- a/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
+++ b/modules/gfac/gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
@@ -21,29 +21,14 @@
package org.apache.airavata.gfac.client;
-//import org.apache.airavata.client.AiravataAPIFactory;
-//import org.apache.airavata.client.api.AiravataAPI;
-//import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-//import org.apache.airavata.client.tools.DocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.ServerSettings;
import org.apache.airavata.gfac.client.util.Initialize;
import org.apache.airavata.gfac.cpi.GfacService;
import org.apache.airavata.gfac.server.GfacServer;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
import org.apache.airavata.registry.cpi.Registry;
import org.apache.zookeeper.server.ServerCnxnFactory;
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.IOException;
-import java.net.URL;
-
public class GfacClientFactoryTest {
private final static Logger logger = LoggerFactory.getLogger(GfacClientFactoryTest.class);
// private DocumentCreator documentCreator;
[2/3] airavata git commit: removed thrift generated client code from
gfac-service module and move it to gfac-client module. Refactored module
dependency of gfac
Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
deleted file mode 100644
index 213b834..0000000
--- a/modules/gfac/gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ /dev/null
@@ -1,3170 +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.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
- * @param tokenId
- */
- public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) 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
- * @param gatewayId
- * @param tokenId
- */
- public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) 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, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public String 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, String tokenId) throws org.apache.thrift.TException
- {
- send_submitJob(experimentId, taskId, gatewayId, tokenId);
- return recv_submitJob();
- }
-
- public void send_submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
- {
- submitJob_args args = new submitJob_args();
- args.setExperimentId(experimentId);
- args.setTaskId(taskId);
- args.setGatewayId(gatewayId);
- args.setTokenId(tokenId);
- 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, String gatewayId, String tokenId) throws org.apache.thrift.TException
- {
- send_cancelJob(experimentId, taskId, gatewayId, tokenId);
- return recv_cancelJob();
- }
-
- public void send_cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
- {
- cancelJob_args args = new cancelJob_args();
- args.setExperimentId(experimentId);
- args.setTaskId(taskId);
- args.setGatewayId(gatewayId);
- args.setTokenId(tokenId);
- 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<AsyncClient> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void 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, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, tokenId, 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;
- private String tokenId;
- public submitJob_call(String experimentId, String taskId, String gatewayId, String tokenId, 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;
- this.tokenId = tokenId;
- }
-
- 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.setTokenId(tokenId);
- 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, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- cancelJob_call method_call = new cancelJob_call(experimentId, taskId, gatewayId, tokenId, 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;
- private String gatewayId;
- private String tokenId;
- public cancelJob_call(String experimentId, String taskId, String gatewayId, String tokenId, 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;
- this.tokenId = tokenId;
- }
-
- 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.setGatewayId(gatewayId);
- args.setTokenId(tokenId);
- 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<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
- processMap.put("submitJob", new submitJob());
- processMap.put("cancelJob", new cancelJob());
- return processMap;
- }
-
- public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> {
- 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<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitJob_args> {
- 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, args.tokenId);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class cancelJob<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelJob_args> {
- 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, args.gatewayId, args.tokenId);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- }
-
- public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- processMap.put("getGFACServiceVersion", new getGFACServiceVersion());
- processMap.put("submitJob", new submitJob());
- processMap.put("cancelJob", new cancelJob());
- return processMap;
- }
-
- public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> {
- public getGFACServiceVersion() {
- super("getGFACServiceVersion");
- }
-
- public getGFACServiceVersion_args getEmptyArgsInstance() {
- return new getGFACServiceVersion_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- 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<String> resultHandler) throws TException {
- iface.getGFACServiceVersion(resultHandler);
- }
- }
-
- public static class submitJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitJob_args, Boolean> {
- public submitJob() {
- super("submitJob");
- }
-
- public submitJob_args getEmptyArgsInstance() {
- return new submitJob_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- 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<Boolean> resultHandler) throws TException {
- iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
- }
- }
-
- public static class cancelJob<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelJob_args, Boolean> {
- public cancelJob() {
- super("cancelJob");
- }
-
- public cancelJob_args getEmptyArgsInstance() {
- return new cancelJob_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- 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<Boolean> resultHandler) throws TException {
- iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
- }
- }
-
- }
-
- public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<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) {
- 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 <i>other</i>.
- */
- 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<getGFACServiceVersion_args> {
-
- 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<getGFACServiceVersion_args> {
-
- @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<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result> {
- 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_result.class, metaDataMap);
- }
-
- public getGFACServiceVersion_result() {
- }
-
- public getGFACServiceVersion_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- 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<getGFACServiceVersion_result> {
-
- 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<getGFACServiceVersion_result> {
-
- @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<submitJob_args, submitJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_args> {
- 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 org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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
- public String tokenId; // 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"),
- TOKEN_ID((short)4, "tokenId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // EXPERIMENT_ID
- return EXPERIMENT_ID;
- case 2: // TASK_ID
- return TASK_ID;
- case 3: // GATEWAY_ID
- return GATEWAY_ID;
- case 4: // TOKEN_ID
- return TOKEN_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)));
- tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", 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,
- String tokenId)
- {
- this();
- this.experimentId = experimentId;
- this.taskId = taskId;
- this.gatewayId = gatewayId;
- this.tokenId = tokenId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- 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;
- }
- if (other.isSetTokenId()) {
- this.tokenId = other.tokenId;
- }
- }
-
- public submitJob_args deepCopy() {
- return new submitJob_args(this);
- }
-
- @Override
- public void clear() {
- this.experimentId = null;
- this.taskId = null;
- this.gatewayId = null;
- this.tokenId = 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 String getTokenId() {
- return this.tokenId;
- }
-
- public submitJob_args setTokenId(String tokenId) {
- this.tokenId = tokenId;
- return this;
- }
-
- public void unsetTokenId() {
- this.tokenId = null;
- }
-
- /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
- public boolean isSetTokenId() {
- return this.tokenId != null;
- }
-
- public void setTokenIdIsSet(boolean value) {
- if (!value) {
- this.tokenId = null;
- }
- }
-
- public 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;
-
- case TOKEN_ID:
- if (value == null) {
- unsetTokenId();
- } else {
- setTokenId((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();
-
- case TOKEN_ID:
- return getTokenId();
-
- }
- 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();
- case TOKEN_ID:
- return isSetTokenId();
- }
- 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;
- }
-
- boolean this_present_tokenId = true && this.isSetTokenId();
- boolean that_present_tokenId = true && that.isSetTokenId();
- if (this_present_tokenId || that_present_tokenId) {
- if (!(this_present_tokenId && that_present_tokenId))
- return false;
- if (!this.tokenId.equals(that.tokenId))
- return false;
- }
-
- 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;
- }
- }
- lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTokenId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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;
- if (!first) sb.append(", ");
- sb.append("tokenId:");
- if (this.tokenId == null) {
- sb.append("null");
- } else {
- sb.append(this.tokenId);
- }
- 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());
- }
- if (tokenId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' 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<submitJob_args> {
-
- 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;
- case 4: // TOKEN_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.tokenId = iprot.readString();
- struct.setTokenIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- 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();
- }
- if (struct.tokenId != null) {
- oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
- oprot.writeString(struct.tokenId);
- 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<submitJob_args> {
-
- @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);
- oprot.writeString(struct.tokenId);
- }
-
- @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);
- struct.tokenId = iprot.readString();
- struct.setTokenIdIsSet(true);
- }
- }
-
- }
-
- public static class submitJob_result implements org.apache.thrift.TBase<submitJob_result, submitJob_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitJob_result> {
- 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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 <i>other</i>.
- */
- 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<submitJob_result> {
-
- 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<submitJob_result> {
-
- @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<cancelJob_args, cancelJob_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelJob_args> {
- 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 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 org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new cancelJob_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new cancelJob_argsTupleSchemeFactory());
- }
-
- public String experimentId; // required
- public String taskId; // required
- public String gatewayId; // required
- public String tokenId; // 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"),
- TOKEN_ID((short)4, "tokenId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // EXPERIMENT_ID
- return EXPERIMENT_ID;
- case 2: // TASK_ID
- return TASK_ID;
- case 3: // GATEWAY_ID
- return GATEWAY_ID;
- case 4: // TOKEN_ID
- return TOKEN_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)));
- tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", 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,
- String gatewayId,
- String tokenId)
- {
- this();
- this.experimentId = experimentId;
- this.taskId = taskId;
- this.gatewayId = gatewayId;
- this.tokenId = tokenId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public cancelJob_args(cancelJob_args other) {
- if (other.isSetExperimentId()) {
- this.experimentId = other.experimentId;
- }
- if (other.isSetTaskId()) {
- this.taskId = other.taskId;
- }
- if (other.isSetGatewayId()) {
- this.gatewayId = other.gatewayId;
- }
- if (other.isSetTokenId()) {
- this.tokenId = other.tokenId;
- }
- }
-
- public cancelJob_args deepCopy() {
- return new cancelJob_args(this);
- }
-
- @Override
- public void clear() {
- this.experimentId = null;
- this.taskId = null;
- this.gatewayId = null;
- this.tokenId = 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 String getGatewayId() {
- return this.gatewayId;
- }
-
- public cancelJob_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 String getTokenId() {
- return this.tokenId;
- }
-
- public cancelJob_args setTokenId(String tokenId) {
- this.tokenId = tokenId;
- return this;
- }
-
- public void unsetTokenId() {
- this.tokenId = null;
- }
-
- /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
- public boolean isSetTokenId() {
- return this.tokenId != null;
- }
-
- public void setTokenIdIsSet(boolean value) {
- if (
<TRUNCATED>
[3/3] airavata git commit: removed thrift generated client code from
gfac-service module and move it to gfac-client module. Refactored module
dependency of gfac
Posted by sh...@apache.org.
removed thrift generated client code from gfac-service module and move it to gfac-client module. Refactored module dependency of gfac
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/29cd57fd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/29cd57fd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/29cd57fd
Branch: refs/heads/moduleRefactor
Commit: 29cd57fdf1d5a707e398cc2db11c55f37c7b30e8
Parents: 30f9d70
Author: Shameera Rathanyaka <sh...@gmail.com>
Authored: Thu Jun 4 11:45:37 2015 -0400
Committer: Shameera Rathanyaka <sh...@gmail.com>
Committed: Thu Jun 4 11:45:37 2015 -0400
----------------------------------------------------------------------
.../airavata-api/generate-thrift-files.sh | 2 +-
.../gfac/generate-gfac-stubs.sh | 4 +-
.../orchestrator/generate-orchestrator-stubs.sh | 2 +-
.../apache/airavata/gfac/cpi/GfacService.java | 434 ++-
.../gfac/cpi/gfac_cpi_serviceConstants.java | 3 +-
modules/gfac/gfac-impl/pom.xml | 2 +-
modules/gfac/gfac-service/pom.xml | 10 +-
.../apache/airavata/gfac/cpi/GfacService.java | 3170 ------------------
.../gfac/cpi/gfac_cpi_serviceConstants.java | 55 -
.../gfac/client/GfacClientFactoryTest.java | 15 -
10 files changed, 415 insertions(+), 3282 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/component-interface-descriptions/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/component-interface-descriptions/airavata-api/generate-thrift-files.sh b/component-interface-descriptions/airavata-api/generate-thrift-files.sh
index a0951f9..30046c9 100755
--- a/component-interface-descriptions/airavata-api/generate-thrift-files.sh
+++ b/component-interface-descriptions/airavata-api/generate-thrift-files.sh
@@ -45,7 +45,7 @@ fi
# Generation of thrift files will require installing Apache Thrift. Please add thrift to your path.
# Verify is thrift is installed, is in the path is at a specified version.
-REQUIRED_THRIFT_VERSION='0.9.1'
+REQUIRED_THRIFT_VERSION='0.9.2'
THRIFT_EXEC=/usr/local/bin/thrift
VERSION=$($THRIFT_EXEC -version 2>/dev/null | grep -F "${REQUIRED_THRIFT_VERSION}" | wc -l)
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/component-interface-descriptions/gfac/generate-gfac-stubs.sh
----------------------------------------------------------------------
diff --git a/component-interface-descriptions/gfac/generate-gfac-stubs.sh b/component-interface-descriptions/gfac/generate-gfac-stubs.sh
index d34eaef..9e7483d 100755
--- a/component-interface-descriptions/gfac/generate-gfac-stubs.sh
+++ b/component-interface-descriptions/gfac/generate-gfac-stubs.sh
@@ -19,9 +19,9 @@
# Global Constants used across the script
-REQUIRED_THRIFT_VERSION='0.9.1'
+REQUIRED_THRIFT_VERSION='0.9.2'
BASE_TARGET_DIR='target'
-GFAC_SERVICE_DIR='../../modules/gfac/airavata-gfac-service/src/main/java/'
+GFAC_SERVICE_DIR='../../modules/gfac/gfac-client/src/main/java/'
# The Funcation fail prints error messages on failure and quits the script.
fail() {
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
----------------------------------------------------------------------
diff --git a/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh b/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
index df526d2..b4a4779 100755
--- a/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
+++ b/component-interface-descriptions/orchestrator/generate-orchestrator-stubs.sh
@@ -19,7 +19,7 @@
# Global Constants used across the script
-REQUIRED_THRIFT_VERSION='0.9.1'
+REQUIRED_THRIFT_VERSION='0.9.2'
BASE_TARGET_DIR='target'
ORCHESTRATOR_SERVICE_DIR='../../modules/orchestrator/orchestrator-client/src/main/java'
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
index eb8ddf7..948bf8f 100644
--- a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -45,9 +45,11 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-3")
@SuppressWarnings("all") public class GfacService {
public interface Iface {
@@ -73,8 +75,9 @@ import org.slf4j.LoggerFactory;
* @param experimentId
* @param taskId
* @param gatewayId
+ * @param tokenId
*/
- public boolean submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException;
+ public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
/**
* *
@@ -91,8 +94,10 @@ import org.slf4j.LoggerFactory;
*
* @param experimentId
* @param taskId
+ * @param gatewayId
+ * @param tokenId
*/
- public boolean cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException;
+ public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException;
}
@@ -100,9 +105,9 @@ import org.slf4j.LoggerFactory;
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 submitJob(String experimentId, String taskId, String gatewayId, String tokenId, 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 void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
@@ -148,18 +153,19 @@ import org.slf4j.LoggerFactory;
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
+ public boolean submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
{
- send_submitJob(experimentId, taskId, gatewayId);
+ send_submitJob(experimentId, taskId, gatewayId, tokenId);
return recv_submitJob();
}
- public void send_submitJob(String experimentId, String taskId, String gatewayId) throws org.apache.thrift.TException
+ public void send_submitJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
{
submitJob_args args = new submitJob_args();
args.setExperimentId(experimentId);
args.setTaskId(taskId);
args.setGatewayId(gatewayId);
+ args.setTokenId(tokenId);
sendBase("submitJob", args);
}
@@ -173,17 +179,19 @@ import org.slf4j.LoggerFactory;
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
+ public boolean cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
{
- send_cancelJob(experimentId, taskId);
+ send_cancelJob(experimentId, taskId, gatewayId, tokenId);
return recv_cancelJob();
}
- public void send_cancelJob(String experimentId, String taskId) throws org.apache.thrift.TException
+ public void send_cancelJob(String experimentId, String taskId, String gatewayId, String tokenId) throws org.apache.thrift.TException
{
cancelJob_args args = new cancelJob_args();
args.setExperimentId(experimentId);
args.setTaskId(taskId);
+ args.setGatewayId(gatewayId);
+ args.setTokenId(tokenId);
sendBase("cancelJob", args);
}
@@ -244,9 +252,9 @@ import org.slf4j.LoggerFactory;
}
}
- public void submitJob(String experimentId, String taskId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void submitJob(String experimentId, String taskId, String gatewayId, String tokenId, 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);
+ submitJob_call method_call = new submitJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@@ -255,11 +263,13 @@ import org.slf4j.LoggerFactory;
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 {
+ private String tokenId;
+ public submitJob_call(String experimentId, String taskId, String gatewayId, String tokenId, 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;
+ this.tokenId = tokenId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -268,6 +278,7 @@ import org.slf4j.LoggerFactory;
args.setExperimentId(experimentId);
args.setTaskId(taskId);
args.setGatewayId(gatewayId);
+ args.setTokenId(tokenId);
args.write(prot);
prot.writeMessageEnd();
}
@@ -282,9 +293,9 @@ import org.slf4j.LoggerFactory;
}
}
- public void cancelJob(String experimentId, String taskId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void cancelJob(String experimentId, String taskId, String gatewayId, String tokenId, 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);
+ cancelJob_call method_call = new cancelJob_call(experimentId, taskId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@@ -292,10 +303,14 @@ import org.slf4j.LoggerFactory;
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 {
+ private String gatewayId;
+ private String tokenId;
+ public cancelJob_call(String experimentId, String taskId, String gatewayId, String tokenId, 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;
+ this.tokenId = tokenId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -303,6 +318,8 @@ import org.slf4j.LoggerFactory;
cancelJob_args args = new cancelJob_args();
args.setExperimentId(experimentId);
args.setTaskId(taskId);
+ args.setGatewayId(gatewayId);
+ args.setTokenId(tokenId);
args.write(prot);
prot.writeMessageEnd();
}
@@ -371,7 +388,7 @@ import org.slf4j.LoggerFactory;
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.success = iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
result.setSuccessIsSet(true);
return result;
}
@@ -392,7 +409,7 @@ import org.slf4j.LoggerFactory;
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.success = iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId);
result.setSuccessIsSet(true);
return result;
}
@@ -516,7 +533,7 @@ import org.slf4j.LoggerFactory;
}
public void start(I iface, submitJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.submitJob(args.experimentId, args.taskId, args.gatewayId,resultHandler);
+ iface.submitJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
}
}
@@ -568,7 +585,7 @@ import org.slf4j.LoggerFactory;
}
public void start(I iface, cancelJob_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.cancelJob(args.experimentId, args.taskId,resultHandler);
+ iface.cancelJob(args.experimentId, args.taskId, args.gatewayId, args.tokenId,resultHandler);
}
}
@@ -704,7 +721,9 @@ import org.slf4j.LoggerFactory;
@Override
public int hashCode() {
- return 0;
+ List<Object> list = new ArrayList<Object>();
+
+ return list.hashCode();
}
@Override
@@ -1015,7 +1034,14 @@ import org.slf4j.LoggerFactory;
@Override
public int hashCode() {
- return 0;
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ return list.hashCode();
}
@Override
@@ -1180,6 +1206,7 @@ import org.slf4j.LoggerFactory;
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 org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -1190,12 +1217,14 @@ import org.slf4j.LoggerFactory;
public String experimentId; // required
public String taskId; // required
public String gatewayId; // required
+ public String tokenId; // 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");
+ GATEWAY_ID((short)3, "gatewayId"),
+ TOKEN_ID((short)4, "tokenId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -1216,6 +1245,8 @@ import org.slf4j.LoggerFactory;
return TASK_ID;
case 3: // GATEWAY_ID
return GATEWAY_ID;
+ case 4: // TOKEN_ID
+ return TOKEN_ID;
default:
return null;
}
@@ -1265,6 +1296,8 @@ import org.slf4j.LoggerFactory;
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)));
+ tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", 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);
}
@@ -1275,12 +1308,14 @@ import org.slf4j.LoggerFactory;
public submitJob_args(
String experimentId,
String taskId,
- String gatewayId)
+ String gatewayId,
+ String tokenId)
{
this();
this.experimentId = experimentId;
this.taskId = taskId;
this.gatewayId = gatewayId;
+ this.tokenId = tokenId;
}
/**
@@ -1296,6 +1331,9 @@ import org.slf4j.LoggerFactory;
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
+ if (other.isSetTokenId()) {
+ this.tokenId = other.tokenId;
+ }
}
public submitJob_args deepCopy() {
@@ -1307,6 +1345,7 @@ import org.slf4j.LoggerFactory;
this.experimentId = null;
this.taskId = null;
this.gatewayId = null;
+ this.tokenId = null;
}
public String getExperimentId() {
@@ -1381,6 +1420,30 @@ import org.slf4j.LoggerFactory;
}
}
+ public String getTokenId() {
+ return this.tokenId;
+ }
+
+ public submitJob_args setTokenId(String tokenId) {
+ this.tokenId = tokenId;
+ return this;
+ }
+
+ public void unsetTokenId() {
+ this.tokenId = null;
+ }
+
+ /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+ public boolean isSetTokenId() {
+ return this.tokenId != null;
+ }
+
+ public void setTokenIdIsSet(boolean value) {
+ if (!value) {
+ this.tokenId = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EXPERIMENT_ID:
@@ -1407,6 +1470,14 @@ import org.slf4j.LoggerFactory;
}
break;
+ case TOKEN_ID:
+ if (value == null) {
+ unsetTokenId();
+ } else {
+ setTokenId((String)value);
+ }
+ break;
+
}
}
@@ -1421,6 +1492,9 @@ import org.slf4j.LoggerFactory;
case GATEWAY_ID:
return getGatewayId();
+ case TOKEN_ID:
+ return getTokenId();
+
}
throw new IllegalStateException();
}
@@ -1438,6 +1512,8 @@ import org.slf4j.LoggerFactory;
return isSetTaskId();
case GATEWAY_ID:
return isSetGatewayId();
+ case TOKEN_ID:
+ return isSetTokenId();
}
throw new IllegalStateException();
}
@@ -1482,12 +1558,43 @@ import org.slf4j.LoggerFactory;
return false;
}
+ boolean this_present_tokenId = true && this.isSetTokenId();
+ boolean that_present_tokenId = true && that.isSetTokenId();
+ if (this_present_tokenId || that_present_tokenId) {
+ if (!(this_present_tokenId && that_present_tokenId))
+ return false;
+ if (!this.tokenId.equals(that.tokenId))
+ return false;
+ }
+
return true;
}
@Override
public int hashCode() {
- return 0;
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_experimentId = true && (isSetExperimentId());
+ list.add(present_experimentId);
+ if (present_experimentId)
+ list.add(experimentId);
+
+ boolean present_taskId = true && (isSetTaskId());
+ list.add(present_taskId);
+ if (present_taskId)
+ list.add(taskId);
+
+ boolean present_gatewayId = true && (isSetGatewayId());
+ list.add(present_gatewayId);
+ if (present_gatewayId)
+ list.add(gatewayId);
+
+ boolean present_tokenId = true && (isSetTokenId());
+ list.add(present_tokenId);
+ if (present_tokenId)
+ list.add(tokenId);
+
+ return list.hashCode();
}
@Override
@@ -1528,6 +1635,16 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTokenId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -1571,6 +1688,14 @@ import org.slf4j.LoggerFactory;
sb.append(this.gatewayId);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("tokenId:");
+ if (this.tokenId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tokenId);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -1586,6 +1711,9 @@ import org.slf4j.LoggerFactory;
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
}
+ if (tokenId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -1647,6 +1775,14 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 4: // TOKEN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tokenId = iprot.readString();
+ struct.setTokenIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1677,6 +1813,11 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
+ if (struct.tokenId != null) {
+ oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+ oprot.writeString(struct.tokenId);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1697,6 +1838,7 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.experimentId);
oprot.writeString(struct.taskId);
oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.tokenId);
}
@Override
@@ -1708,6 +1850,8 @@ import org.slf4j.LoggerFactory;
struct.setTaskIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
+ struct.tokenId = iprot.readString();
+ struct.setTokenIdIsSet(true);
}
}
@@ -1910,7 +2054,14 @@ import org.slf4j.LoggerFactory;
@Override
public int hashCode() {
- return 0;
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true;
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ return list.hashCode();
}
@Override
@@ -2072,6 +2223,8 @@ import org.slf4j.LoggerFactory;
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 org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -2081,11 +2234,15 @@ import org.slf4j.LoggerFactory;
public String experimentId; // required
public String taskId; // required
+ public String gatewayId; // required
+ public String tokenId; // 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");
+ TASK_ID((short)2, "taskId"),
+ GATEWAY_ID((short)3, "gatewayId"),
+ TOKEN_ID((short)4, "tokenId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -2104,6 +2261,10 @@ import org.slf4j.LoggerFactory;
return EXPERIMENT_ID;
case 2: // TASK_ID
return TASK_ID;
+ case 3: // GATEWAY_ID
+ return GATEWAY_ID;
+ case 4: // TOKEN_ID
+ return TOKEN_ID;
default:
return null;
}
@@ -2151,6 +2312,10 @@ import org.slf4j.LoggerFactory;
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)));
+ tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", 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);
}
@@ -2160,11 +2325,15 @@ import org.slf4j.LoggerFactory;
public cancelJob_args(
String experimentId,
- String taskId)
+ String taskId,
+ String gatewayId,
+ String tokenId)
{
this();
this.experimentId = experimentId;
this.taskId = taskId;
+ this.gatewayId = gatewayId;
+ this.tokenId = tokenId;
}
/**
@@ -2177,6 +2346,12 @@ import org.slf4j.LoggerFactory;
if (other.isSetTaskId()) {
this.taskId = other.taskId;
}
+ if (other.isSetGatewayId()) {
+ this.gatewayId = other.gatewayId;
+ }
+ if (other.isSetTokenId()) {
+ this.tokenId = other.tokenId;
+ }
}
public cancelJob_args deepCopy() {
@@ -2187,6 +2362,8 @@ import org.slf4j.LoggerFactory;
public void clear() {
this.experimentId = null;
this.taskId = null;
+ this.gatewayId = null;
+ this.tokenId = null;
}
public String getExperimentId() {
@@ -2237,6 +2414,54 @@ import org.slf4j.LoggerFactory;
}
}
+ public String getGatewayId() {
+ return this.gatewayId;
+ }
+
+ public cancelJob_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 String getTokenId() {
+ return this.tokenId;
+ }
+
+ public cancelJob_args setTokenId(String tokenId) {
+ this.tokenId = tokenId;
+ return this;
+ }
+
+ public void unsetTokenId() {
+ this.tokenId = null;
+ }
+
+ /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+ public boolean isSetTokenId() {
+ return this.tokenId != null;
+ }
+
+ public void setTokenIdIsSet(boolean value) {
+ if (!value) {
+ this.tokenId = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EXPERIMENT_ID:
@@ -2255,6 +2480,22 @@ import org.slf4j.LoggerFactory;
}
break;
+ case GATEWAY_ID:
+ if (value == null) {
+ unsetGatewayId();
+ } else {
+ setGatewayId((String)value);
+ }
+ break;
+
+ case TOKEN_ID:
+ if (value == null) {
+ unsetTokenId();
+ } else {
+ setTokenId((String)value);
+ }
+ break;
+
}
}
@@ -2266,6 +2507,12 @@ import org.slf4j.LoggerFactory;
case TASK_ID:
return getTaskId();
+ case GATEWAY_ID:
+ return getGatewayId();
+
+ case TOKEN_ID:
+ return getTokenId();
+
}
throw new IllegalStateException();
}
@@ -2281,6 +2528,10 @@ import org.slf4j.LoggerFactory;
return isSetExperimentId();
case TASK_ID:
return isSetTaskId();
+ case GATEWAY_ID:
+ return isSetGatewayId();
+ case TOKEN_ID:
+ return isSetTokenId();
}
throw new IllegalStateException();
}
@@ -2316,12 +2567,52 @@ import org.slf4j.LoggerFactory;
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;
+ }
+
+ boolean this_present_tokenId = true && this.isSetTokenId();
+ boolean that_present_tokenId = true && that.isSetTokenId();
+ if (this_present_tokenId || that_present_tokenId) {
+ if (!(this_present_tokenId && that_present_tokenId))
+ return false;
+ if (!this.tokenId.equals(that.tokenId))
+ return false;
+ }
+
return true;
}
@Override
public int hashCode() {
- return 0;
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_experimentId = true && (isSetExperimentId());
+ list.add(present_experimentId);
+ if (present_experimentId)
+ list.add(experimentId);
+
+ boolean present_taskId = true && (isSetTaskId());
+ list.add(present_taskId);
+ if (present_taskId)
+ list.add(taskId);
+
+ boolean present_gatewayId = true && (isSetGatewayId());
+ list.add(present_gatewayId);
+ if (present_gatewayId)
+ list.add(gatewayId);
+
+ boolean present_tokenId = true && (isSetTokenId());
+ list.add(present_tokenId);
+ if (present_tokenId)
+ list.add(tokenId);
+
+ return list.hashCode();
}
@Override
@@ -2352,6 +2643,26 @@ import org.slf4j.LoggerFactory;
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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTokenId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -2387,6 +2698,22 @@ import org.slf4j.LoggerFactory;
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;
+ if (!first) sb.append(", ");
+ sb.append("tokenId:");
+ if (this.tokenId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tokenId);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -2399,6 +2726,12 @@ import org.slf4j.LoggerFactory;
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());
+ }
+ if (tokenId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString());
+ }
// check for sub-struct validity
}
@@ -2452,6 +2785,22 @@ import org.slf4j.LoggerFactory;
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;
+ case 4: // TOKEN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tokenId = iprot.readString();
+ struct.setTokenIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -2477,6 +2826,16 @@ import org.slf4j.LoggerFactory;
oprot.writeString(struct.taskId);
oprot.writeFieldEnd();
}
+ if (struct.gatewayId != null) {
+ oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tokenId != null) {
+ oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+ oprot.writeString(struct.tokenId);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -2496,6 +2855,8 @@ import org.slf4j.LoggerFactory;
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeString(struct.experimentId);
oprot.writeString(struct.taskId);
+ oprot.writeString(struct.gatewayId);
+ oprot.writeString(struct.tokenId);
}
@Override
@@ -2505,6 +2866,10 @@ import org.slf4j.LoggerFactory;
struct.setExperimentIdIsSet(true);
struct.taskId = iprot.readString();
struct.setTaskIdIsSet(true);
+ struct.gatewayId = iprot.readString();
+ struct.setGatewayIdIsSet(true);
+ struct.tokenId = iprot.readString();
+ struct.setTokenIdIsSet(true);
}
}
@@ -2707,7 +3072,14 @@ import org.slf4j.LoggerFactory;
@Override
public int hashCode() {
- return 0;
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true;
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ return list.hashCode();
}
@Override
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
index 14fd7fe..9cf65c6 100644
--- a/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
+++ b/modules/gfac/gfac-client/src/main/java/org/apache/airavata/gfac/cpi/gfac_cpi_serviceConstants.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -45,6 +45,7 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-impl/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/pom.xml b/modules/gfac/gfac-impl/pom.xml
index 4733253..0326782 100644
--- a/modules/gfac/gfac-impl/pom.xml
+++ b/modules/gfac/gfac-impl/pom.xml
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>gfac-impl</artifactId>
- <name>Airavata GFac Local implementation</name>
+ <name>Airavata GFac Implementation</name>
<description>This is the extension of GFAC Local.</description>
<url>http://airavata.apache.org/</url>
http://git-wip-us.apache.org/repos/asf/airavata/blob/29cd57fd/modules/gfac/gfac-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-service/pom.xml b/modules/gfac/gfac-service/pom.xml
index b911385..fefc8cd 100644
--- a/modules/gfac/gfac-service/pom.xml
+++ b/modules/gfac/gfac-service/pom.xml
@@ -57,6 +57,11 @@
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
+ <artifactId>gfac-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
<artifactId>gfac-core</artifactId>
<version>${project.version}</version>
</dependency>
@@ -75,11 +80,6 @@
<artifactId>airavata-api-stubs</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>gfac-client</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-server-configuration</artifactId>