airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [2/2] airavata git commit: uploading initial project structure
Date Wed, 26 Oct 2016 15:36:44 GMT
uploading initial project structure


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fd42b790
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fd42b790
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fd42b790

Branch: refs/heads/allocation-manager
Commit: fd42b790bcc403405127c1bb9785c6e1708a13b6
Parents: 9f0445f
Author: Anuj Bhandar <bhandar.anuj@gmail.com>
Authored: Wed Oct 19 15:08:16 2016 -0400
Committer: Anuj Bhandar <bhandar.anuj@gmail.com>
Committed: Wed Oct 19 15:08:16 2016 -0400

----------------------------------------------------------------------
 .../allocation-manager-service/pom.xml          |   42 +
 .../handler/AllocationManagerServerHandler.java |   34 +
 .../manager/server/AllocationManagerServer.java |  113 ++
 .../allocation-manager-stubs/pom.xml            |   38 +
 .../manager/cpi/AllocationManagerService.java   | 1314 ++++++++++++++++++
 modules/allocation-manager/pom.xml              |   26 +
 pom.xml                                         | 1294 ++++++++---------
 .../allocation-manager-cpi.thrift               |   44 +
 .../component-cpis/generate-cpi-stubs.sh        |    6 +
 9 files changed, 2264 insertions(+), 647 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fd42b790/modules/allocation-manager/allocation-manager-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/allocation-manager/allocation-manager-service/pom.xml b/modules/allocation-manager/allocation-manager-service/pom.xml
new file mode 100644
index 0000000..029f98d
--- /dev/null
+++ b/modules/allocation-manager/allocation-manager-service/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>allocation-manager</artifactId>
+        <version>0.17-SNAPSHOT</version>
+    </parent>
+    <artifactId>allocation-manager-service</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${org.slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-commons</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>allocation-manager-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+    
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/fd42b790/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/handler/AllocationManagerServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/handler/AllocationManagerServerHandler.java b/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/handler/AllocationManagerServerHandler.java
new file mode 100644
index 0000000..36b2e08
--- /dev/null
+++ b/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/handler/AllocationManagerServerHandler.java
@@ -0,0 +1,34 @@
+package org.apache.airavata.allocation.manager.handler;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+import org.apache.airavata.allocation.manager.cpi.AllocationManagerService;
+
+
+public class AllocationManagerServerHandler implements AllocationManagerService.Iface{
+
+    @Override
+    public boolean setUserComputeResource(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace) throws org.apache.thrift.TException{
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/fd42b790/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/server/AllocationManagerServer.java
----------------------------------------------------------------------
diff --git a/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/server/AllocationManagerServer.java b/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/server/AllocationManagerServer.java
new file mode 100644
index 0000000..5109d1c
--- /dev/null
+++ b/modules/allocation-manager/allocation-manager-service/src/main/java/org/apache/airavata/allocation/manager/server/AllocationManagerServer.java
@@ -0,0 +1,113 @@
+package org.apache.airavata.allocation.manager.server;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+import org.apache.airavata.allocation.manager.cpi.AllocationManagerService;
+import org.apache.airavata.allocation.manager.handler.AllocationManagerServerHandler;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.InetSocketAddress;
+
+public class AllocationManagerServer {
+
+    private final static Logger logger = LoggerFactory.getLogger(AllocationManagerServer.class);
+    private static final String SERVER_NAME = "Resource Management Server";
+    private static final String SERVER_VERSION = "1.0";
+
+
+    public String getName() {
+        return SERVER_NAME;
+    }
+
+
+    public String getVersion() {
+        return SERVER_VERSION;
+    }
+
+    public static AllocationManagerServerHandler handler;
+
+    public static AllocationManagerService.Processor processor;
+
+    private TServer server;
+
+    public void start() throws Exception {
+        try {
+
+            final int serverPort = 9090;
+            final String serverHost = "localhost";
+            AllocationManagerService.Processor processor = new AllocationManagerService.Processor(handler);
+
+            TServerTransport serverTransport;
+
+            if (serverHost == null) {
+                serverTransport = new TServerSocket(serverPort);
+            } else {
+                InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
+                serverTransport = new TServerSocket(inetSocketAddress);
+            }
+            TThreadPoolServer.Args options = new TThreadPoolServer.Args(serverTransport);
+            options.minWorkerThreads = 30;
+            server = new TThreadPoolServer(options.processor(processor));
+
+            new Thread() {
+                public void run() {
+                    server.serve();
+                    logger.info("Allocation Manager Server Stopped.");
+                }
+            }.start();
+            new Thread() {
+                public void run() {
+                    while (!server.isServing()) {
+                        try {
+                            Thread.sleep(500);
+                        } catch (InterruptedException e) {
+                            break;
+                        }
+                    }
+                    if (server.isServing()) {
+                        logger.info("Starting Allocation Manager Server on Port " + serverPort);
+                        logger.info("Listening to Resource Management clients ....");
+                    }
+                }
+            }.start();
+        } catch (TTransportException e) {
+            throw new Exception("Error while starting the Alocation Manager service", e);
+        }
+    }
+
+
+
+    public static void main(String [] args) {
+        try {
+            new AllocationManagerServer().start();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/fd42b790/modules/allocation-manager/allocation-manager-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/modules/allocation-manager/allocation-manager-stubs/pom.xml b/modules/allocation-manager/allocation-manager-stubs/pom.xml
new file mode 100644
index 0000000..ef3e170
--- /dev/null
+++ b/modules/allocation-manager/allocation-manager-stubs/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>allocation-manager</artifactId>
+        <version>0.17-SNAPSHOT</version>
+    </parent>
+    <artifactId>allocation-manager-stubs</artifactId>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${org.slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-commons</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+    
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/fd42b790/modules/allocation-manager/allocation-manager-stubs/src/main/java/org/apache/airavata/allocation/manager/cpi/AllocationManagerService.java
----------------------------------------------------------------------
diff --git a/modules/allocation-manager/allocation-manager-stubs/src/main/java/org/apache/airavata/allocation/manager/cpi/AllocationManagerService.java b/modules/allocation-manager/allocation-manager-stubs/src/main/java/org/apache/airavata/allocation/manager/cpi/AllocationManagerService.java
new file mode 100644
index 0000000..4040a95
--- /dev/null
+++ b/modules/allocation-manager/allocation-manager-stubs/src/main/java/org/apache/airavata/allocation/manager/cpi/AllocationManagerService.java
@@ -0,0 +1,1314 @@
+    /*
+     * 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.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.allocation.manager.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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-19")
+public class AllocationManagerService {
+
+  public interface Iface {
+
+    /**
+     *  * @param gatewayId : For identifying the Gateway
+     *  * @param loginUserName : username to use for login
+     *  * @param credStoreToken : token for linking the ssh key
+     *  * @param scratchSpace : path to filesystem scratch space
+     *  * @return sucess/failure
+     *  *
+     * *
+     * 
+     * @param gatewayId
+     * @param loginUserName
+     * @param credStoreToken
+     * @param scratchSpace
+     */
+    public boolean setUserComputeResource(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace) throws org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void setUserComputeResource(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace, 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 boolean setUserComputeResource(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace) throws org.apache.thrift.TException
+    {
+      send_setUserComputeResource(gatewayId, loginUserName, credStoreToken, scratchSpace);
+      return recv_setUserComputeResource();
+    }
+
+    public void send_setUserComputeResource(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace) throws org.apache.thrift.TException
+    {
+      setUserComputeResource_args args = new setUserComputeResource_args();
+      args.setGatewayId(gatewayId);
+      args.setLoginUserName(loginUserName);
+      args.setCredStoreToken(credStoreToken);
+      args.setScratchSpace(scratchSpace);
+      sendBase("setUserComputeResource", args);
+    }
+
+    public boolean recv_setUserComputeResource() throws org.apache.thrift.TException
+    {
+      setUserComputeResource_result result = new setUserComputeResource_result();
+      receiveBase(result, "setUserComputeResource");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUserComputeResource 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 setUserComputeResource(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      setUserComputeResource_call method_call = new setUserComputeResource_call(gatewayId, loginUserName, credStoreToken, scratchSpace, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class setUserComputeResource_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String gatewayId;
+      private String loginUserName;
+      private String credStoreToken;
+      private String scratchSpace;
+      public setUserComputeResource_call(String gatewayId, String loginUserName, String credStoreToken, String scratchSpace, 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.gatewayId = gatewayId;
+        this.loginUserName = loginUserName;
+        this.credStoreToken = credStoreToken;
+        this.scratchSpace = scratchSpace;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUserComputeResource", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        setUserComputeResource_args args = new setUserComputeResource_args();
+        args.setGatewayId(gatewayId);
+        args.setLoginUserName(loginUserName);
+        args.setCredStoreToken(credStoreToken);
+        args.setScratchSpace(scratchSpace);
+        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_setUserComputeResource();
+      }
+    }
+
+  }
+
+  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("setUserComputeResource", new setUserComputeResource());
+      return processMap;
+    }
+
+    public static class setUserComputeResource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUserComputeResource_args> {
+      public setUserComputeResource() {
+        super("setUserComputeResource");
+      }
+
+      public setUserComputeResource_args getEmptyArgsInstance() {
+        return new setUserComputeResource_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public setUserComputeResource_result getResult(I iface, setUserComputeResource_args args) throws org.apache.thrift.TException {
+        setUserComputeResource_result result = new setUserComputeResource_result();
+        result.success = iface.setUserComputeResource(args.gatewayId, args.loginUserName, args.credStoreToken, args.scratchSpace);
+        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("setUserComputeResource", new setUserComputeResource());
+      return processMap;
+    }
+
+    public static class setUserComputeResource<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUserComputeResource_args, Boolean> {
+      public setUserComputeResource() {
+        super("setUserComputeResource");
+      }
+
+      public setUserComputeResource_args getEmptyArgsInstance() {
+        return new setUserComputeResource_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) {
+            setUserComputeResource_result result = new setUserComputeResource_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;
+            setUserComputeResource_result result = new setUserComputeResource_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, setUserComputeResource_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+        iface.setUserComputeResource(args.gatewayId, args.loginUserName, args.credStoreToken, args.scratchSpace,resultHandler);
+      }
+    }
+
+  }
+
+  public static class setUserComputeResource_args implements org.apache.thrift.TBase<setUserComputeResource_args, setUserComputeResource_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserComputeResource_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserComputeResource_args");
+
+    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)1);
+    private static final org.apache.thrift.protocol.TField LOGIN_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("loginUserName", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("credStoreToken", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField SCRATCH_SPACE_FIELD_DESC = new org.apache.thrift.protocol.TField("scratchSpace", 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 setUserComputeResource_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setUserComputeResource_argsTupleSchemeFactory());
+    }
+
+    public String gatewayId; // required
+    public String loginUserName; // required
+    public String credStoreToken; // required
+    public String scratchSpace; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      GATEWAY_ID((short)1, "gatewayId"),
+      LOGIN_USER_NAME((short)2, "loginUserName"),
+      CRED_STORE_TOKEN((short)3, "credStoreToken"),
+      SCRATCH_SPACE((short)4, "scratchSpace");
+
+      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: // GATEWAY_ID
+            return GATEWAY_ID;
+          case 2: // LOGIN_USER_NAME
+            return LOGIN_USER_NAME;
+          case 3: // CRED_STORE_TOKEN
+            return CRED_STORE_TOKEN;
+          case 4: // SCRATCH_SPACE
+            return SCRATCH_SPACE;
+          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.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.LOGIN_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("loginUserName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.CRED_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("credStoreToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.SCRATCH_SPACE, new org.apache.thrift.meta_data.FieldMetaData("scratchSpace", 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(setUserComputeResource_args.class, metaDataMap);
+    }
+
+    public setUserComputeResource_args() {
+    }
+
+    public setUserComputeResource_args(
+      String gatewayId,
+      String loginUserName,
+      String credStoreToken,
+      String scratchSpace)
+    {
+      this();
+      this.gatewayId = gatewayId;
+      this.loginUserName = loginUserName;
+      this.credStoreToken = credStoreToken;
+      this.scratchSpace = scratchSpace;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public setUserComputeResource_args(setUserComputeResource_args other) {
+      if (other.isSetGatewayId()) {
+        this.gatewayId = other.gatewayId;
+      }
+      if (other.isSetLoginUserName()) {
+        this.loginUserName = other.loginUserName;
+      }
+      if (other.isSetCredStoreToken()) {
+        this.credStoreToken = other.credStoreToken;
+      }
+      if (other.isSetScratchSpace()) {
+        this.scratchSpace = other.scratchSpace;
+      }
+    }
+
+    public setUserComputeResource_args deepCopy() {
+      return new setUserComputeResource_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.gatewayId = null;
+      this.loginUserName = null;
+      this.credStoreToken = null;
+      this.scratchSpace = null;
+    }
+
+    public String getGatewayId() {
+      return this.gatewayId;
+    }
+
+    public setUserComputeResource_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 getLoginUserName() {
+      return this.loginUserName;
+    }
+
+    public setUserComputeResource_args setLoginUserName(String loginUserName) {
+      this.loginUserName = loginUserName;
+      return this;
+    }
+
+    public void unsetLoginUserName() {
+      this.loginUserName = null;
+    }
+
+    /** Returns true if field loginUserName is set (has been assigned a value) and false otherwise */
+    public boolean isSetLoginUserName() {
+      return this.loginUserName != null;
+    }
+
+    public void setLoginUserNameIsSet(boolean value) {
+      if (!value) {
+        this.loginUserName = null;
+      }
+    }
+
+    public String getCredStoreToken() {
+      return this.credStoreToken;
+    }
+
+    public setUserComputeResource_args setCredStoreToken(String credStoreToken) {
+      this.credStoreToken = credStoreToken;
+      return this;
+    }
+
+    public void unsetCredStoreToken() {
+      this.credStoreToken = null;
+    }
+
+    /** Returns true if field credStoreToken is set (has been assigned a value) and false otherwise */
+    public boolean isSetCredStoreToken() {
+      return this.credStoreToken != null;
+    }
+
+    public void setCredStoreTokenIsSet(boolean value) {
+      if (!value) {
+        this.credStoreToken = null;
+      }
+    }
+
+    public String getScratchSpace() {
+      return this.scratchSpace;
+    }
+
+    public setUserComputeResource_args setScratchSpace(String scratchSpace) {
+      this.scratchSpace = scratchSpace;
+      return this;
+    }
+
+    public void unsetScratchSpace() {
+      this.scratchSpace = null;
+    }
+
+    /** Returns true if field scratchSpace is set (has been assigned a value) and false otherwise */
+    public boolean isSetScratchSpace() {
+      return this.scratchSpace != null;
+    }
+
+    public void setScratchSpaceIsSet(boolean value) {
+      if (!value) {
+        this.scratchSpace = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case GATEWAY_ID:
+        if (value == null) {
+          unsetGatewayId();
+        } else {
+          setGatewayId((String)value);
+        }
+        break;
+
+      case LOGIN_USER_NAME:
+        if (value == null) {
+          unsetLoginUserName();
+        } else {
+          setLoginUserName((String)value);
+        }
+        break;
+
+      case CRED_STORE_TOKEN:
+        if (value == null) {
+          unsetCredStoreToken();
+        } else {
+          setCredStoreToken((String)value);
+        }
+        break;
+
+      case SCRATCH_SPACE:
+        if (value == null) {
+          unsetScratchSpace();
+        } else {
+          setScratchSpace((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case GATEWAY_ID:
+        return getGatewayId();
+
+      case LOGIN_USER_NAME:
+        return getLoginUserName();
+
+      case CRED_STORE_TOKEN:
+        return getCredStoreToken();
+
+      case SCRATCH_SPACE:
+        return getScratchSpace();
+
+      }
+      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 GATEWAY_ID:
+        return isSetGatewayId();
+      case LOGIN_USER_NAME:
+        return isSetLoginUserName();
+      case CRED_STORE_TOKEN:
+        return isSetCredStoreToken();
+      case SCRATCH_SPACE:
+        return isSetScratchSpace();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof setUserComputeResource_args)
+        return this.equals((setUserComputeResource_args)that);
+      return false;
+    }
+
+    public boolean equals(setUserComputeResource_args that) {
+      if (that == null)
+        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_loginUserName = true && this.isSetLoginUserName();
+      boolean that_present_loginUserName = true && that.isSetLoginUserName();
+      if (this_present_loginUserName || that_present_loginUserName) {
+        if (!(this_present_loginUserName && that_present_loginUserName))
+          return false;
+        if (!this.loginUserName.equals(that.loginUserName))
+          return false;
+      }
+
+      boolean this_present_credStoreToken = true && this.isSetCredStoreToken();
+      boolean that_present_credStoreToken = true && that.isSetCredStoreToken();
+      if (this_present_credStoreToken || that_present_credStoreToken) {
+        if (!(this_present_credStoreToken && that_present_credStoreToken))
+          return false;
+        if (!this.credStoreToken.equals(that.credStoreToken))
+          return false;
+      }
+
+      boolean this_present_scratchSpace = true && this.isSetScratchSpace();
+      boolean that_present_scratchSpace = true && that.isSetScratchSpace();
+      if (this_present_scratchSpace || that_present_scratchSpace) {
+        if (!(this_present_scratchSpace && that_present_scratchSpace))
+          return false;
+        if (!this.scratchSpace.equals(that.scratchSpace))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_gatewayId = true && (isSetGatewayId());
+      list.add(present_gatewayId);
+      if (present_gatewayId)
+        list.add(gatewayId);
+
+      boolean present_loginUserName = true && (isSetLoginUserName());
+      list.add(present_loginUserName);
+      if (present_loginUserName)
+        list.add(loginUserName);
+
+      boolean present_credStoreToken = true && (isSetCredStoreToken());
+      list.add(present_credStoreToken);
+      if (present_credStoreToken)
+        list.add(credStoreToken);
+
+      boolean present_scratchSpace = true && (isSetScratchSpace());
+      list.add(present_scratchSpace);
+      if (present_scratchSpace)
+        list.add(scratchSpace);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(setUserComputeResource_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      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(isSetLoginUserName()).compareTo(other.isSetLoginUserName());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetLoginUserName()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loginUserName, other.loginUserName);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetCredStoreToken()).compareTo(other.isSetCredStoreToken());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetCredStoreToken()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credStoreToken, other.credStoreToken);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetScratchSpace()).compareTo(other.isSetScratchSpace());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetScratchSpace()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scratchSpace, other.scratchSpace);
+        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("setUserComputeResource_args(");
+      boolean first = true;
+
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("loginUserName:");
+      if (this.loginUserName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.loginUserName);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("credStoreToken:");
+      if (this.credStoreToken == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.credStoreToken);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("scratchSpace:");
+      if (this.scratchSpace == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.scratchSpace);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      if (gatewayId == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
+      }
+      if (loginUserName == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'loginUserName' was not present! Struct: " + toString());
+      }
+      if (credStoreToken == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'credStoreToken' was not present! Struct: " + toString());
+      }
+      if (scratchSpace == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'scratchSpace' 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 setUserComputeResource_argsStandardSchemeFactory implements SchemeFactory {
+      public setUserComputeResource_argsStandardScheme getScheme() {
+        return new setUserComputeResource_argsStandardScheme();
+      }
+    }
+
+    private static class setUserComputeResource_argsStandardScheme extends StandardScheme<setUserComputeResource_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setUserComputeResource_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: // 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 2: // LOGIN_USER_NAME
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.loginUserName = iprot.readString();
+                struct.setLoginUserNameIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // CRED_STORE_TOKEN
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.credStoreToken = iprot.readString();
+                struct.setCredStoreTokenIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // SCRATCH_SPACE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.scratchSpace = iprot.readString();
+                struct.setScratchSpaceIsSet(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, setUserComputeResource_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.gatewayId != null) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+        if (struct.loginUserName != null) {
+          oprot.writeFieldBegin(LOGIN_USER_NAME_FIELD_DESC);
+          oprot.writeString(struct.loginUserName);
+          oprot.writeFieldEnd();
+        }
+        if (struct.credStoreToken != null) {
+          oprot.writeFieldBegin(CRED_STORE_TOKEN_FIELD_DESC);
+          oprot.writeString(struct.credStoreToken);
+          oprot.writeFieldEnd();
+        }
+        if (struct.scratchSpace != null) {
+          oprot.writeFieldBegin(SCRATCH_SPACE_FIELD_DESC);
+          oprot.writeString(struct.scratchSpace);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class setUserComputeResource_argsTupleSchemeFactory implements SchemeFactory {
+      public setUserComputeResource_argsTupleScheme getScheme() {
+        return new setUserComputeResource_argsTupleScheme();
+      }
+    }
+
+    private static class setUserComputeResource_argsTupleScheme extends TupleScheme<setUserComputeResource_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, setUserComputeResource_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        oprot.writeString(struct.gatewayId);
+        oprot.writeString(struct.loginUserName);
+        oprot.writeString(struct.credStoreToken);
+        oprot.writeString(struct.scratchSpace);
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, setUserComputeResource_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+        struct.loginUserName = iprot.readString();
+        struct.setLoginUserNameIsSet(true);
+        struct.credStoreToken = iprot.readString();
+        struct.setCredStoreTokenIsSet(true);
+        struct.scratchSpace = iprot.readString();
+        struct.setScratchSpaceIsSet(true);
+      }
+    }
+
+  }
+
+  public static class setUserComputeResource_result implements org.apache.thrift.TBase<setUserComputeResource_result, setUserComputeResource_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserComputeResource_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserComputeResource_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 setUserComputeResource_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new setUserComputeResource_resultTupleSchemeFactory());
+    }
+
+    public boolean success; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SUCCESS((short)0, "success");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 0: // SUCCESS
+            return SUCCESS;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    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(setUserComputeResource_result.class, metaDataMap);
+    }
+
+    public setUserComputeResource_result() {
+    }
+
+    public setUserComputeResource_result(
+      boolean success)
+    {
+      this();
+      this.success = success;
+      setSuccessIsSet(true);
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public setUserComputeResource_result(setUserComputeResource_result other) {
+      __isset_bitfield = other.__isset_bitfield;
+      this.success = other.success;
+    }
+
+    public setUserComputeResource_result deepCopy() {
+      return new setUserComputeResource_result(this);
+    }
+
+    @Override
+    public void clear() {
+      setSuccessIsSet(false);
+      this.success = false;
+    }
+
+    public boolean isSuccess() {
+      return this.success;
+    }
+
+    public setUserComputeResource_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 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 setUserComputeResource_result)
+        return this.equals((setUserComputeResource_result)that);
+      return false;
+    }
+
+    public boolean equals(setUserComputeResource_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() {
+      List<Object> list = new ArrayList<Object>();
+
+      boolean present_success = true;
+      list.add(present_success);
+      if (present_success)
+        list.add(success);
+
+      return list.hashCode();
+    }
+
+    @Override
+    public int compareTo(setUserComputeResource_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("setUserComputeResource_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 setUserComputeResource_resultStandardSchemeFactory implements SchemeFactory {
+      public setUserComputeResource_resultStandardScheme getScheme() {
+        return new setUserComputeResource_resultStandardScheme();
+      }
+    }
+
+    private static class setUserComputeResource_resultStandardScheme extends StandardScheme<setUserComputeResource_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, setUserComputeResource_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, setUserComputeResource_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 setUserComputeResource_resultTupleSchemeFactory implements SchemeFactory {
+      public setUserComputeResource_resultTupleScheme getScheme() {
+        return new setUserComputeResource_resultTupleScheme();
+      }
+    }
+
+    private static class setUserComputeResource_resultTupleScheme extends TupleScheme<setUserComputeResource_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, setUserComputeResource_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, setUserComputeResource_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);
+        }
+      }
+    }
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/fd42b790/modules/allocation-manager/pom.xml
----------------------------------------------------------------------
diff --git a/modules/allocation-manager/pom.xml b/modules/allocation-manager/pom.xml
new file mode 100644
index 0000000..d9a4b89
--- /dev/null
+++ b/modules/allocation-manager/pom.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata</artifactId>
+        <version>0.17-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>allocation-manager</artifactId>
+    <version>0.17-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Airavata Resource Allocation Manager</name>
+    <url>http://airavata.apache.org/</url>
+
+    <modules>
+        <module>allocation-manager-stubs</module>
+        <module>allocation-manager-service</module>
+    </modules>
+
+    
+</project>
\ No newline at end of file


Mime
View raw message