airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: rervering the changes in 42bc8defb to fix the funcationality
Date Fri, 10 Oct 2014 23:01:54 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 42bc8defb -> 7781079dd


rervering the changes in 42bc8defb to fix the funcationality


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

Branch: refs/heads/master
Commit: 7781079dd6687eecd7afed0399c5ec681ed437c5
Parents: 42bc8de
Author: lahiru <lahiru@apache.org>
Authored: Fri Oct 10 19:01:50 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Fri Oct 10 19:01:50 2014 -0400

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java  | 10 ++++----
 .../airavata/gfac/server/GfacServerHandler.java | 27 ++++++++++----------
 .../gfac/gsissh/util/GFACGSISSHUtils.java       | 14 +++++-----
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  4 +--
 4 files changed, 28 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7781079d/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 6caf110..df73845 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -59,10 +59,10 @@ public class CreateLaunchExperiment {
             try {
                 airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST,
THRIFT_SERVER_PORT);
                 System.out.println("API version is " + airavataClient.getAPIVersion());
-            registerApplications(); // run this only the first time
-//                for (int i = 0; i < 1; i++) {
+//            registerApplications(); // run this only the first time
+                for (int i = 0; i < 1; i++) {
 //            final String expId = createExperimentForSSHHost(airavata);
-//                    final String expId = createEchoExperimentForTrestles(airavataClient);
+                    final String expId = createEchoExperimentForTrestles(airavataClient);
 //            final String expId = createEchoExperimentForStampede(airavataClient);
 //            final String expId = createExperimentEchoForLocalHost(airavataClient);
 //            final String expId = createExperimentWRFTrestles(airavataClient);
@@ -74,8 +74,8 @@ public class CreateLaunchExperiment {
 
 //            System.out.println("Experiment ID : " + expId);
 //            updateExperiment(airavata, expId);
-//                    launchExperiment(airavataClient, expId);
-//                }
+                    launchExperiment(airavataClient, expId);
+                }
             } catch (Exception e) {
                 logger.error("Error while connecting with server", e.getMessage());
                 e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/airavata/blob/7781079d/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 3ad6e3e..7e0995d 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -197,20 +197,21 @@ public class GfacServerHandler implements GfacService.Iface, Watcher{
         logger.infoId(experimentId, "GFac Received submit jog request for the Experiment:
{} TaskId: {}", experimentId, taskId);
         GFac gfac = getGfac();
         InputHandlerWorker inputHandlerWorker = new InputHandlerWorker(gfac, experimentId,
taskId, gatewayId);
-        try {
-            if( gfac.submitJob(experimentId, taskId, gatewayId)){
-                logger.debugId(experimentId, "Submitted jog to the Gfac Implementation, experiment
{}, task {}, gateway " +
+//        try {
+//            if( gfac.submitJob(experimentId, taskId, gatewayId)){
+        logger.debugId(experimentId, "Submitted jog to the Gfac Implementation, experiment
{}, task {}, gateway " +
                 "{}", experimentId, taskId, gatewayId);
-//                 inHandlerFutures.add(GFacThreadPoolExecutor.getFixedThreadPool().submit(inputHandlerWorker));
-                return true;
-            }else{
-                logger.error(experimentId, "Failed to submit job to the GFac implementation,
experiment {}, task {}, " +
-                        "gateway {}", experimentId, taskId, gatewayId);
-                return false;
-            }
-        } catch (GFacException e) {
-            throw new TException("Error launching the experiment : " + e.getMessage(), e);
-        }
+        inHandlerFutures.add(GFacThreadPoolExecutor.getFixedThreadPool().submit(inputHandlerWorker));
+        // we immediately return when we have a threadpool
+        return true;
+//            }else{
+//                logger.error(experimentId, "Failed to submit job to the GFac implementation,
experiment {}, task {}, " +
+//                        "gateway {}", experimentId, taskId, gatewayId);
+//                return false;
+//            }
+//        } catch (GFacException e) {
+//            throw new TException("Error launching the experiment : " + e.getMessage(),
e);
+//        }
     }
 
     public boolean cancelJob(String experimentId, String taskId) throws TException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/7781079d/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index 0cdbbd1..d45bb9a 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -84,12 +84,12 @@ public class GFACGSISSHUtils {
             GSISecurityContext context = null;
             try {
                 TokenizedMyProxyAuthInfo tokenizedMyProxyAuthInfo = new TokenizedMyProxyAuthInfo(requestData);
-                CredentialReader credentialReader = GFacUtils.getCredentialReader();
-                if(credentialReader != null){
-                	CertificateCredential credential = (CertificateCredential)credentialReader.getCredential(ServerSettings.getDefaultUserGateway(),
credentialStoreToken);
-                		requestData.setMyProxyUserName(credential.getCommunityUser().getUserName());
-                }
-				
+//                CredentialReader credentialReader = GFacUtils.getCredentialReader();
+//                if(credentialReader != null){
+//                	CertificateCredential credential = (CertificateCredential)credentialReader.getCredential(ServerSettings.getDefaultUserGateway(),
credentialStoreToken);
+//                		requestData.setMyProxyUserName(credential.getCommunityUser().getUserName());
+//                }
+
                 GsisshHostType gsisshHostType = (GsisshHostType) registeredHost.getType();
                 String key = requestData.getMyProxyUserName() + registeredHost.getType().getHostAddress()
+
                         gsisshHostType.getPort();
@@ -115,7 +115,7 @@ public class GFACGSISSHUtils {
                                 recreate = true; // we make the pbsCluster to create again
if there is any exception druing connection
                             }
                             logger.info("Re-using the same connection used with the connection
string:" + key);
-                          context = new GSISecurityContext(credentialReader, requestData,
pbsCluster);
+                            context = new GSISecurityContext(tokenizedMyProxyAuthInfo.getCredentialReader(),
requestData, pbsCluster);
                         }
                     } else {
                         recreate = true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7781079d/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 4e4227f..6f09a3c 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -290,8 +290,8 @@ public class HPCPullMonitor extends PullMonitor {
             for (String jobName: keys) {
                 MonitorID completedJob = completedJobs.get(jobName);
                 CommonUtils.removeMonitorFromQueue(queue, completedJob);
-                    gfac.invokeOutFlowHandlers(completedJob.getJobExecutionContext());
-//                  GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac,
completedJob, publisher));
+//                    gfac.invokeOutFlowHandlers(completedJob.getJobExecutionContext());
+                  GFacThreadPoolExecutor.getFixedThreadPool().submit(new OutHandlerWorker(gfac,
completedJob, publisher));
                 if (zk == null) {
                     zk = completedJob.getJobExecutionContext().getZk();
                 }


Mime
View raw message