airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [2/3] airavata git commit: removing unnessaray fture list
Date Fri, 03 Apr 2015 16:53:11 GMT
removing unnessaray fture list


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

Branch: refs/heads/master
Commit: 8feb5d0da418943ae62fa070c47805da49fe9702
Parents: a51a7ca
Author: Lahiru Gunathilake <glahiru@gmail.com>
Authored: Fri Apr 3 12:51:32 2015 -0400
Committer: Lahiru Gunathilake <glahiru@gmail.com>
Committed: Fri Apr 3 12:51:32 2015 -0400

----------------------------------------------------------------------
 .../airavata/gfac/server/GfacServerHandler.java      | 15 +++++++++------
 .../gfac/core/utils/GFacThreadPoolExecutor.java      |  2 ++
 .../airavata/gfac/core/utils/InputHandlerWorker.java |  4 +++-
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java      |  2 +-
 4 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/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 c8fc3fb..7d5e223 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
@@ -60,6 +60,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.*;
 import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.locks.Lock;
 
@@ -92,8 +93,6 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
 
     private String airavataServerHostPort;
 
-    private List<Future> inHandlerFutures;
-
 
     private BlockingQueue<TaskSubmitEvent> taskSubmitEvents;
 
@@ -123,8 +122,6 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
                 rabbitMQTaskLaunchConsumer.listen(new TaskLaunchMessageHandler());
             }
             BetterGfacImpl.startStatusUpdators(registry, zk, publisher, rabbitMQTaskLaunchConsumer);
-            inHandlerFutures = new ArrayList<Future>();
-
         } catch (ApplicationSettingsException e) {
             logger.error("Error initialising GFAC", e);
             throw new Exception("Error initialising GFAC", e);
@@ -245,9 +242,15 @@ public class GfacServerHandler implements GfacService.Iface, Watcher
{
         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 " +
+        logger.debugId(experimentId, "Submitted job to the Gfac Implementation, experiment
{}, task {}, gateway " +
                 "{}", experimentId, taskId, gatewayId);
-        inHandlerFutures.add(GFacThreadPoolExecutor.getFixedThreadPool().submit(inputHandlerWorker));
+        try {
+            GFacThreadPoolExecutor.getFixedThreadPool().submit(inputHandlerWorker).get();
+        } catch (InterruptedException e) {
+            logger.error(e.getMessage(), e);
+        } catch (ExecutionException e) {
+            logger.error(e.getMessage(), e);
+        }
         // we immediately return when we have a threadpool
         return true;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
index b1f0572..7853513 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
@@ -51,4 +51,6 @@ public class GFacThreadPoolExecutor {
         }
         return threadPool;
     }
+
+
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
index efa7c0c..963db7c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/InputHandlerWorker.java
@@ -46,6 +46,8 @@ public class InputHandlerWorker implements Callable {
 
     @Override
     public Object call() throws Exception {
-        return gfac.submitJob(experimentId,taskId,gatewayId);
+        boolean b = gfac.submitJob(experimentId, taskId, gatewayId);
+        log.info("InHandler and provider Gfac invocation returned: " + b);
+        return b;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8feb5d0d/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
index a416dbd..f09a662 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/security/TokenizedSSHAuthInfo.java
@@ -93,7 +93,7 @@ public class TokenizedSSHAuthInfo implements SSHPublicKeyFileAuthentication
{
                 try {
                     gssCredentials = getDefaultCredentials();
                 } catch (Exception e) {
-                    throw new SecurityException("Error retrieving my proxy using username
password");
+                    throw new SecurityException("Error retrieving my proxy using username
password",e.getCause());
                 }
             }
             // if still null, throw an exception


Mime
View raw message