airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: more changes for integration - AIRAVATA-1028
Date Sat, 01 Mar 2014 00:43:29 GMT
Repository: airavata
Updated Branches:
  refs/heads/master a02132482 -> a4c0adcbe


more changes for integration - AIRAVATA-1028


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

Branch: refs/heads/master
Commit: a4c0adcbed12b7cae32b73bda2c08a794c4b1920
Parents: a021324
Author: lahiru <lahiru@apache.org>
Authored: Fri Feb 28 19:43:22 2014 -0500
Committer: lahiru <lahiru@apache.org>
Committed: Fri Feb 28 19:43:22 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/airavata/gfac/cpi/GFacImpl.java     | 12 ++++++------
 .../org/apache/airavata/gfac/provider/GFacProvider.java |  2 +-
 .../apache/airavata/gfac/provider/impl/BESProvider.java |  3 +--
 .../airavata/gfac/provider/impl/GSISSHProvider.java     |  3 +--
 .../airavata/gfac/provider/impl/GramProvider.java       |  3 +--
 .../airavata/gfac/provider/impl/HadoopProvider.java     |  3 +--
 .../airavata/gfac/provider/impl/LocalProvider.java      |  3 +--
 .../apache/airavata/gfac/provider/impl/SSHProvider.java |  3 +--
 8 files changed, 13 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
index b84dcb7..a34c9b5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
@@ -185,10 +185,11 @@ public class GFacImpl implements GFac {
         }
         // Register log event listener. This is required in all scenarios.
         jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
-        return schedule(jobExecutionContext);
+        schedule(jobExecutionContext);
+        return jobExecutionContext;
     }
 
-    private JobExecutionContext schedule(JobExecutionContext jobExecutionContext) throws
GFacException {
+    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
         // Scheduler will decide the execution flow of handlers and provider which handles
         // the job.
         String experimentID = jobExecutionContext.getExperimentID();
@@ -206,7 +207,7 @@ public class GFacImpl implements GFac {
             GFacProvider provider = jobExecutionContext.getProvider();
             if (provider != null) {
                 initProvider(provider, jobExecutionContext);
-                jobExecutionContext = executeProvider(provider, jobExecutionContext);
+                executeProvider(provider, jobExecutionContext);
                 disposeProvider(provider, jobExecutionContext);
             }
         } catch (Exception e) {
@@ -214,7 +215,6 @@ public class GFacImpl implements GFac {
             jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
             throw new GFacException(e.getMessage(), e);
         }
-        return jobExecutionContext;
     }
 
     private void initProvider(GFacProvider provider, JobExecutionContext jobExecutionContext)
throws GFacException {
@@ -225,9 +225,9 @@ public class GFacImpl implements GFac {
         }
     }
 
-    private JobExecutionContext executeProvider(GFacProvider provider, JobExecutionContext
jobExecutionContext) throws GFacException {
+    private void executeProvider(GFacProvider provider, JobExecutionContext jobExecutionContext)
throws GFacException {
         try {
-            return provider.execute(jobExecutionContext);
+             provider.execute(jobExecutionContext);
         } catch (Exception e) {
             throw new GFacException("Error while executing provider " + provider.getClass().getName()
+ " functionality.", e);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
index 9f5832f..a6d5182 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
@@ -43,7 +43,7 @@ public interface GFacProvider {
      * @param jobExecutionContext containing job execution related information.
      * @throws GFacProviderException in case of a error executing the job.
      */
-    JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException;
+    void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException;
 
     /**
      * Cleans up the acquired resources during initialization and execution of the job.

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
index df602f9..3339beb 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/BESProvider.java
@@ -108,7 +108,7 @@ public class BESProvider implements GFacProvider {
     }
 
 
-	public JobExecutionContext execute(JobExecutionContext jobExecutionContext)
+	public void execute(JobExecutionContext jobExecutionContext)
 			throws GFacProviderException {
         UnicoreHostType host = (UnicoreHostType) jobExecutionContext.getApplicationContext().getHostDescription()
                 .getType();
@@ -261,7 +261,6 @@ public class BESProvider implements GFacProvider {
                 log.warn("Cannot destroy temporary SMS instance:" + sc.getUrl(), e);
             }
         }
-        return jobExecutionContext;
     }
 
 	private ApplicationJobStatus getApplicationJobStatus(ActivityStatusType activityStatus){

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
index 3fa695c..1e80877 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GSISSHProvider.java
@@ -65,7 +65,7 @@ public class GSISSHProvider implements GFacProvider {
         //To change body of implemented methods use File | Settings | File Templates.
     }
 
-    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException {
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException {
         log.info("Invoking GSISSH Provider Invoke ...");
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         HostDescriptionType host = jobExecutionContext.getApplicationContext().
@@ -146,7 +146,6 @@ public class GSISSHProvider implements GFacProvider {
             log.error(error);
             throw new GFacProviderException(error, e);
         }
-        return jobExecutionContext;
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
index 29318a3..85241d5 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
@@ -126,7 +126,7 @@ public class GramProvider implements GFacProvider {
         job.addListener(listener);
     }
 
-    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException{
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException,
GFacException{
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         GlobusHostType host = (GlobusHostType) jobExecutionContext.getApplicationContext().
                 getHostDescription().getType();
@@ -164,7 +164,6 @@ public class GramProvider implements GFacProvider {
                 }
             }
         }
-        return jobExecutionContext;
     }
 
     private void submitJobs(String gateKeeper,

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
index fd2e0ba..956b7b2 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/HadoopProvider.java
@@ -78,7 +78,7 @@ public class HadoopProvider implements GFacProvider{
         }
     }
 
-    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
         HadoopApplicationDeploymentDescriptionType hadoopAppDesc =
                 (HadoopApplicationDeploymentDescriptionType)jobExecutionContext
                         .getApplicationContext().getApplicationDeploymentDescription().getType();
@@ -135,7 +135,6 @@ public class HadoopProvider implements GFacProvider{
             logger.error(errMessage, e);
             throw new GFacProviderException(errMessage, e);
         }
-        return jobExecutionContext;
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException
{

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
index 7a84698..9d1f204 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
@@ -119,7 +119,7 @@ public class LocalProvider implements GFacProvider {
         }
     }
 
-    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
          ApplicationDeploymentDescriptionType app = jobExecutionContext.
                  getApplicationContext().getApplicationDeploymentDescription().getType();
@@ -176,7 +176,6 @@ public class LocalProvider implements GFacProvider {
         } catch (InterruptedException e) {
             throw new GFacProviderException(e.getMessage(), e);
         }
-        return jobExecutionContext;
     }
 
 	private void saveApplicationJob(JobExecutionContext jobExecutionContext)

http://git-wip-us.apache.org/repos/asf/airavata/blob/a4c0adcb/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
index 0125842..48826a8 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/SSHProvider.java
@@ -101,7 +101,7 @@ public class SSHProvider implements GFacProvider {
         GFacUtils.recordApplicationJob(jobExecutionContext, job);
     }
 
-    public JobExecutionContext execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
+    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException
{
         if (gsiSshProvider == null) {
             ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
             Session session = null;
@@ -149,7 +149,6 @@ public class SSHProvider implements GFacProvider {
                 throw new GFacProviderException(e.getMessage(), e);
             }
         }
-        return jobExecutionContext;
     }
 
     public void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException
{


Mime
View raw message