airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject [02/17] re-arrange server and clint code to create seperate distributions. AIRAVATA-1471
Date Thu, 06 Nov 2014 16:52:00 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/orchestrator_cpi_serviceConstants.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/orchestrator_cpi_serviceConstants.java
b/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/orchestrator_cpi_serviceConstants.java
new file mode 100644
index 0000000..3fa2946
--- /dev/null
+++ b/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/orchestrator_cpi_serviceConstants.java
@@ -0,0 +1,55 @@
+    /*
+     * 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.orchestrator.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 orchestrator_cpi_serviceConstants {
+
+  public static final String ORCHESTRATOR_CPI_VERSION = "0.13.0";
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/sample/OrchestratorClientSample.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/sample/OrchestratorClientSample.java
b/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/sample/OrchestratorClientSample.java
new file mode 100644
index 0000000..c9c862f
--- /dev/null
+++ b/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/sample/OrchestratorClientSample.java
@@ -0,0 +1,134 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.airavata.orchestrator.sample;
+
+//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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.airavata.model.util.ExperimentModelUtil;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.DataObjectType;
+import org.apache.airavata.model.workspace.experiment.DataType;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.orchestrator.cpi.OrchestratorService;
+import org.apache.thrift.TException;
+
+public class OrchestratorClientSample {
+//    private static DocumentCreator documentCreator;
+    private static OrchestratorService.Client orchestratorClient;
+//    private static Registry registry;
+    private static int NUM_CONCURRENT_REQUESTS = 1;
+    private static final String DEFAULT_USER = "default.registry.user";
+    private static final String DEFAULT_USER_PASSWORD = "default.registry.password";
+    private static final String DEFAULT_GATEWAY = "default.registry.gateway";
+    private static String sysUser;
+    private static String sysUserPwd;
+    private static String gateway;
+/*
+
+    public static void main(String[] args) {
+        try {
+            AiravataUtils.setExecutionAsClient();
+            sysUser = ClientSettings.getSetting(DEFAULT_USER);
+            sysUserPwd = ClientSettings.getSetting(DEFAULT_USER_PASSWORD);
+            gateway = ClientSettings.getSetting(DEFAULT_GATEWAY);
+            orchestratorClient = OrchestratorClientFactory.createOrchestratorClient("localhost",
8940);
+            registry = RegistryFactory.getRegistry(gateway, sysUser, sysUserPwd);
+            documentCreator = new DocumentCreator(getAiravataAPI());
+            documentCreator.createLocalHostDocs();
+            documentCreator.createGramDocs();
+            documentCreator.createPBSDocsForOGCE();
+            storeExperimentDetail();
+        } catch (ApplicationSettingsException e) {
+            e.printStackTrace();
+        } catch (RegistryException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    private static AiravataAPI getAiravataAPI() {
+        AiravataAPI airavataAPI = null;
+            try {
+                airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
+            } catch (AiravataAPIInvocationException e) {
+                e.printStackTrace();
+            }
+        return airavataAPI;
+    }
+*/
+
+    public static void storeExperimentDetail() {
+        for (int i = 0; i < NUM_CONCURRENT_REQUESTS; i++) {
+            Thread thread = new Thread() {
+                public void run() {
+                    List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
+                    DataObjectType input = new DataObjectType();
+                    input.setKey("echo_input");
+                    input.setType(DataType.STRING);
+                    input.setValue("echo_output=Hello World");
+                    exInputs.add(input);
+
+
+                    List<DataObjectType> exOut = new ArrayList<DataObjectType>();
+                    DataObjectType output = new DataObjectType();
+                    output.setKey("echo_output");
+                    output.setType(DataType.STRING);
+                    output.setValue("");
+                    exOut.add(output);
+
+                    Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment("default",
"admin", "echoExperiment", "SimpleEcho2", "SimpleEcho2", exInputs);
+                    simpleExperiment.setExperimentOutputs(exOut);
+
+                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.edu",
1, 1, 1, "normal", 0, 0, 1, "sds128");
+                    scheduling.setResourceHostId("gsissh-trestles");
+                    UserConfigurationData userConfigurationData = new UserConfigurationData();
+                    userConfigurationData.setComputationalResourceScheduling(scheduling);
+                    simpleExperiment.setUserConfigurationData(userConfigurationData);
+                    String expId = null;
+                    try {
+//                        expId = (String) registry.add(ParentDataType.EXPERIMENT, simpleExperiment);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+
+                    try {
+                        orchestratorClient.launchExperiment(expId, "airavataToken");
+                    } catch (TException e) {
+                        e.printStackTrace();
+                    }
+                }
+            };
+            thread.start();
+            try {
+                thread.join();
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-client-sdks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-client-sdks/pom.xml b/modules/orchestrator/orchestrator-client-sdks/pom.xml
deleted file mode 100644
index b2a4342..0000000
--- a/modules/orchestrator/orchestrator-client-sdks/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements. See the NOTICE file
-    distributed with this work for additional information regarding copyright ownership.
The ASF licenses this file to you under
-    the Apache License, Version 2.0 (theƏ "License"); you may not use this file except in
compliance with the License. You may
-    obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to
-    in writing, software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF
-    ANY ~ KIND, either express or implied. See the License for the specific language governing
permissions and limitations under
-    the License. -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>orchestrator</artifactId>
-        <groupId>org.apache.airavata</groupId>
-        <version>0.14-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <name>Airavata Orchestrator Client SDK</name>
-    <artifactId>airavata-orchestrator-client-sdks</artifactId>
-    <packaging>jar</packaging>
-    <url>http://airavata.apache.org/</url>
-
-    <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-orchestrator-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-orchestrator-service</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-model-utils</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	<dependency>
-            <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-client-configuration</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-    </properties>
-    
-</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-client-sdks/src/main/java/org/apache/airavata/orchestrator/client/sample/OrchestratorClientSample.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-client-sdks/src/main/java/org/apache/airavata/orchestrator/client/sample/OrchestratorClientSample.java
b/modules/orchestrator/orchestrator-client-sdks/src/main/java/org/apache/airavata/orchestrator/client/sample/OrchestratorClientSample.java
deleted file mode 100644
index 97be695..0000000
--- a/modules/orchestrator/orchestrator-client-sdks/src/main/java/org/apache/airavata/orchestrator/client/sample/OrchestratorClientSample.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.airavata.orchestrator.client.sample;
-
-//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.ClientSettings;
-import org.apache.airavata.model.util.ExperimentModelUtil;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.orchestrator.client.OrchestratorClientFactory;
-import org.apache.airavata.orchestrator.cpi.OrchestratorService;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.ParentDataType;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.thrift.TException;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class OrchestratorClientSample {
-//    private static DocumentCreator documentCreator;
-    private static OrchestratorService.Client orchestratorClient;
-    private static Registry registry;
-    private static int NUM_CONCURRENT_REQUESTS = 1;
-    private static final String DEFAULT_USER = "default.registry.user";
-    private static final String DEFAULT_USER_PASSWORD = "default.registry.password";
-    private static final String DEFAULT_GATEWAY = "default.registry.gateway";
-    private static String sysUser;
-    private static String sysUserPwd;
-    private static String gateway;
-/*
-
-    public static void main(String[] args) {
-        try {
-            AiravataUtils.setExecutionAsClient();
-            sysUser = ClientSettings.getSetting(DEFAULT_USER);
-            sysUserPwd = ClientSettings.getSetting(DEFAULT_USER_PASSWORD);
-            gateway = ClientSettings.getSetting(DEFAULT_GATEWAY);
-            orchestratorClient = OrchestratorClientFactory.createOrchestratorClient("localhost",
8940);
-            registry = RegistryFactory.getRegistry(gateway, sysUser, sysUserPwd);
-            documentCreator = new DocumentCreator(getAiravataAPI());
-            documentCreator.createLocalHostDocs();
-            documentCreator.createGramDocs();
-            documentCreator.createPBSDocsForOGCE();
-            storeExperimentDetail();
-        } catch (ApplicationSettingsException e) {
-            e.printStackTrace();
-        } catch (RegistryException e) {
-            e.printStackTrace();
-        }
-
-    }
-
-    private static AiravataAPI getAiravataAPI() {
-        AiravataAPI airavataAPI = null;
-            try {
-                airavataAPI = AiravataAPIFactory.getAPI(gateway, sysUser);
-            } catch (AiravataAPIInvocationException e) {
-                e.printStackTrace();
-            }
-        return airavataAPI;
-    }
-*/
-
-    public static void storeExperimentDetail() {
-        for (int i = 0; i < NUM_CONCURRENT_REQUESTS; i++) {
-            Thread thread = new Thread() {
-                public void run() {
-                    List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
-                    DataObjectType input = new DataObjectType();
-                    input.setKey("echo_input");
-                    input.setType(DataType.STRING);
-                    input.setValue("echo_output=Hello World");
-                    exInputs.add(input);
-
-
-                    List<DataObjectType> exOut = new ArrayList<DataObjectType>();
-                    DataObjectType output = new DataObjectType();
-                    output.setKey("echo_output");
-                    output.setType(DataType.STRING);
-                    output.setValue("");
-                    exOut.add(output);
-
-                    Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment("default",
"admin", "echoExperiment", "SimpleEcho2", "SimpleEcho2", exInputs);
-                    simpleExperiment.setExperimentOutputs(exOut);
-
-                    ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.edu",
1, 1, 1, "normal", 0, 0, 1, "sds128");
-                    scheduling.setResourceHostId("gsissh-trestles");
-                    UserConfigurationData userConfigurationData = new UserConfigurationData();
-                    userConfigurationData.setComputationalResourceScheduling(scheduling);
-                    simpleExperiment.setUserConfigurationData(userConfigurationData);
-                    String expId = null;
-                    try {
-                        expId = (String) registry.add(ParentDataType.EXPERIMENT, simpleExperiment);
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-
-                    try {
-                        orchestratorClient.launchExperiment(expId);
-                    } catch (TException e) {
-                        e.printStackTrace();
-                    }
-                }
-            };
-            thread.start();
-            try {
-                thread.join();
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index 7f6d991..691d288 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -54,14 +54,9 @@ the License. -->
             <artifactId>airavata-gfac-core</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.apache.airavata</groupId>-->
-            <!--<artifactId>airavata-client-api</artifactId>-->
-            <!--<version>${project.version}</version>-->
-        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-gfac-service</artifactId>
+            <artifactId>airavata-gfac-stubs</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
index 542017c..5d465ff 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
@@ -23,9 +23,8 @@ package org.apache.airavata.orchestrator.core.context;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.airavata.gfac.client.GFACInstance;
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
-import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
-import org.apache.airavata.orchestrator.cpi.Orchestrator;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.zookeeper.ZooKeeper;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFACInstance.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFACInstance.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFACInstance.java
deleted file mode 100644
index 1b69ad3..0000000
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFACInstance.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.orchestrator.core.gfac;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This class represent the data related to gfac instances
- * if orchestrator is running on non-embedded mode,
- * This information can be used to do better load balancing between
- * different gfac instances
- */
-public class GFACInstance {
-    private final static Logger logger = LoggerFactory.getLogger(GFACInstance.class);
-
-    private String gfacURL;
-
-    private int currentLoad;
-
-    private int gfacPort;
-
-
-    public GFACInstance(String gfacURL, int gfacPort) {
-        this.gfacURL = gfacURL;
-        this.gfacPort = gfacPort;
-    }
-
-    public String getGfacURL() {
-        return gfacURL;
-    }
-
-    public void setGfacURL(String gfacURL) {
-        this.gfacURL = gfacURL;
-    }
-
-    public int getCurrentLoad() {
-        return currentLoad;
-    }
-
-    public void setCurrentLoad(int currentLoad) {
-        this.currentLoad = currentLoad;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFacClientFactory.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFacClientFactory.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFacClientFactory.java
deleted file mode 100644
index 3ec1e8c..0000000
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFacClientFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.orchestrator.core.gfac;
-
-import org.apache.airavata.gfac.cpi.GfacService;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TSocket;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-
-public class GFacClientFactory {
-    public static GfacService.Client createGFacClient(String serverHost, int serverPort){
-          try {
-              TTransport transport = new TSocket(serverHost, serverPort);
-              transport.open();
-              TProtocol protocol = new TBinaryProtocol(transport);
-              return new GfacService.Client(protocol);
-          } catch (TTransportException e) {
-              e.printStackTrace();
-          }
-          return null;
-      }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
index f658802..cacbc37 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACEmbeddedJobSubmitter.java
@@ -21,19 +21,19 @@
 package org.apache.airavata.orchestrator.core.impl;
 
 
-import com.google.common.eventbus.EventBus;
-import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.MonitorPublisher;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.client.GFACInstance;
 import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
 import org.apache.airavata.gfac.core.cpi.GFac;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
-import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.eventbus.EventBus;
+
 /**
  * This is the simplest implementation for JobSubmitter,
  * This is calling gfac invocation methods to invoke the gfac embedded mode,so this does
not really implement

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
index 1180c99..c5578d8 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/GFACServiceJobSubmitter.java
@@ -29,12 +29,12 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.gfac.client.GFACInstance;
+import org.apache.airavata.gfac.client.GFacClientFactory;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
-import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
-import org.apache.airavata.orchestrator.core.gfac.GFacClientFactory;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.apache.thrift.TException;
 import org.apache.zookeeper.KeeperException;
@@ -44,8 +44,6 @@ import org.apache.zookeeper.ZooKeeper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.OperationNotSupportedException;
-
 /*
  * this class is responsible for submitting a job to gfac in service mode,
  * it will select a gfac instance based on the incoming request and submit to that

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
index 6682fa1..254c6c9 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
@@ -20,10 +20,9 @@
 */
 package org.apache.airavata.orchestrator.core.job;
 
-import org.apache.airavata.gfac.core.context.JobExecutionContext;
+import org.apache.airavata.gfac.client.GFACInstance;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
-import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
 
 /**
  * This is the submitter interface, orchestrator can

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
index a27281e..d82d91f 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
@@ -21,16 +21,7 @@
 package org.apache.airavata.orchestrator.core;
 
 
-import org.apache.airavata.api.Airavata;
-import org.apache.airavata.api.client.AiravataClientFactory;
 //import org.apache.airavata.client.tools.DocumentCreatorNew;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.error.AiravataClientConnectException;
-import org.apache.airavata.orchestrator.core.util.Initialize;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
-import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 
 public class BaseOrchestratorTest {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
b/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
index 781410c..4803408 100644
--- a/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
+++ b/modules/orchestrator/orchestrator-thrift-descriptions/orchestrator.cpi.service.thrift
@@ -42,7 +42,7 @@ service OrchestratorService {
      * @return sucess/failure
      *
     **/
-  bool launchExperiment (1: required string experimentId),
+  bool launchExperiment (1: required string experimentId, 2: required string airavataCredStoreToken),
 
     /**
      * In order to run single applications users should create an associating 

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/orchestrator/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/pom.xml b/modules/orchestrator/pom.xml
index 4eca9dc..4175f13 100644
--- a/modules/orchestrator/pom.xml
+++ b/modules/orchestrator/pom.xml
@@ -32,7 +32,7 @@
             <modules>
                 <module>orchestrator-core</module>
                 <module>airavata-orchestrator-service</module>
-                <module>orchestrator-client-sdks</module>
+                <module>airavata-orchestrator-stubs</module>
             </modules>
         </profile>
     </profiles>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/workflow-model/workflow-engine/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/pom.xml b/modules/workflow-model/workflow-engine/pom.xml
index 79286c4..304f883 100644
--- a/modules/workflow-model/workflow-engine/pom.xml
+++ b/modules/workflow-model/workflow-engine/pom.xml
@@ -231,7 +231,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-orchestrator-service</artifactId>
+            <artifactId>airavata-orchestrator-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+         <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-stubs</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/WorkflowEngineImpl.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/WorkflowEngineImpl.java
b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/WorkflowEngineImpl.java
index f5bfe11..d53eb75 100644
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/WorkflowEngineImpl.java
+++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/WorkflowEngineImpl.java
@@ -26,6 +26,7 @@ import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.impl.RabbitMQPublisher;
+import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.orchestrator.client.OrchestratorClientFactory;
 import org.apache.airavata.orchestrator.cpi.OrchestratorService;
@@ -82,9 +83,9 @@ public class WorkflowEngineImpl implements WorkflowEngine {
 
 	}
 
-	private OrchestratorService.Client getOrchestratorClient() {
+	private OrchestratorService.Client getOrchestratorClient() throws AiravataClientConnectException{
 		final int serverPort = Integer.parseInt(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ORCHESTRATOR_SERVER_PORT,"8940"));
         final String serverHost = ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ORCHESTRATOR_SERVER_HOST,
null);
-        return OrchestratorClientFactory.createOrchestratorClient(serverHost, serverPort);
+       	return OrchestratorClientFactory.createOrchestratorClient(serverHost, serverPort);
 	}
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/xbaya-gui/pom.xml
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/pom.xml b/modules/xbaya-gui/pom.xml
index 6944874..3550322 100644
--- a/modules/xbaya-gui/pom.xml
+++ b/modules/xbaya-gui/pom.xml
@@ -224,11 +224,16 @@
             <!--<artifactId>airavata-workflow-tracking</artifactId>-->
             <!--<version>${project.version}</version>-->
         <!--</dependency>-->
-	<dependency>
+		<dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-api-stubs</artifactId>
             <version>${project.version}</version>
         </dependency>
+        	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-orchestrator-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-jpa-registry</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
index e35eebd..dfe62c6 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
@@ -35,8 +35,8 @@ import javax.swing.border.EtchedBorder;
 import javax.swing.border.TitledBorder;
 import javax.xml.namespace.QName;
 
+import org.apache.airavata.api.Workflow.Client;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.api.workflow.Workflow.Client;
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.model.error.AiravataClientException;
 import org.apache.airavata.model.error.AiravataSystemException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
index 7b7410d..dde473a 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
@@ -33,7 +33,7 @@ import javax.swing.border.EtchedBorder;
 import javax.swing.border.TitledBorder;
 
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.api.workflow.Workflow.Client;
+
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.model.error.AiravataClientException;
@@ -91,7 +91,7 @@ public class RegistryWorkflowPublisherWindow {
         try {
         	if (engine.getGUI().setupThriftClientData(ThriftServiceType.WORKFLOW_SERVICE)){
         		ThriftClientData thriftClientData = engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE);
-				Client client = AiravataClientFactory.createWorkflowClient(thriftClientData.getServerAddress(),
thriftClientData.getServerPort());
+				org.apache.airavata.api.Workflow.Client client = AiravataClientFactory.createWorkflowClient(thriftClientData.getServerAddress(),
thriftClientData.getServerPort());
     			if (client.isWorkflowExistWithName(workflowTemplateName)){
     				int result = JOptionPane.showConfirmDialog(this.dialog.getDialog(), "A workflow with
the name "+workflowTemplateName+" already exists. Do you want to update it?", "Register Workflow",
JOptionPane.YES_NO_CANCEL_OPTION);
     				if (result==JOptionPane.NO_OPTION){

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index fd88275..775e82a 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -260,7 +260,7 @@ public class WorkflowInterpreterLaunchWindow {
     	ThriftClientData thriftClientData = engine.getConfiguration().getThriftClientData(ThriftServiceType.API_SERVICE);
 		Client airavataClient = XBayaUtil.getAiravataClient(thriftClientData);
 
-		org.apache.airavata.api.workflow.Workflow.Client workflowClient = XBayaUtil.getWorkflowClient(engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE));
+		org.apache.airavata.api.Workflow.Client workflowClient = XBayaUtil.getWorkflowClient(engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE));
 
 		Workflow workflowClone = workflow.clone();
 		workflowClone.setName(workflowClone.getName()+UUID.randomUUID().toString());
@@ -355,6 +355,11 @@ public class WorkflowInterpreterLaunchWindow {
 	private OrchestratorService.Client getOrchestratorClient() {
 		final int serverPort = Integer.parseInt(ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ORCHESTRATOR_SERVER_PORT,"8940"));
         final String serverHost = ServerSettings.getSetting(org.apache.airavata.common.utils.Constants.ORCHESTRATOR_SERVER_HOST,
null);
-        return OrchestratorClientFactory.createOrchestratorClient(serverHost, serverPort);
+        try {
+			return OrchestratorClientFactory.createOrchestratorClient(serverHost, serverPort);
+		} catch (AiravataClientConnectException e) {
+			e.printStackTrace();
+		}
+        return null;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a133fa8c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
index a0bc4ec..dc20c21 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
@@ -31,8 +31,8 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.airavata.api.Airavata;
+import org.apache.airavata.api.Workflow.Client;
 import org.apache.airavata.api.client.AiravataClientFactory;
-import org.apache.airavata.api.workflow.Workflow.Client;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.workflow.model.exceptions.WorkflowException;


Mime
View raw message