airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [6/6] git commit: fixing AIRAVATA-1487
Date Fri, 24 Oct 2014 18:35:08 GMT
fixing AIRAVATA-1487


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

Branch: refs/heads/master
Commit: 47e82148945907939bbb82ecde4d05c7b9ebe6d1
Parents: b95e920
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Fri Oct 24 14:34:54 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Fri Oct 24 14:34:54 2014 -0400

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |   109 +-
 .../java/org/apache/airavata/api/Airavata.java  | 13524 +++++++++++++----
 .../main/resources/lib/airavata/Airavata.cpp    |  4007 ++++-
 .../src/main/resources/lib/airavata/Airavata.h  |  1297 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |    35 +
 .../resources/lib/Airavata/API/Airavata.php     |  3198 +++-
 .../airavataAPI.thrift                          |    87 +
 7 files changed, 18130 insertions(+), 4127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/47e82148/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 5753e3e..f329cfd 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1956,6 +1956,21 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public LOCALSubmission getLocalJobSubmission(String jobSubmissionId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getLocalJobSubmission(jobSubmissionId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving local job submission interface to resource
compute resource...";
+            logger.errorId(jobSubmissionId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
     private String addJobSubmissionInterface(ComputeResource computeResource,
 			String computeResourceId, String jobSubmissionInterfaceId,
 			JobSubmissionProtocol protocolType, int priorityOrder)
@@ -1992,7 +2007,22 @@ public class AiravataServerHandler implements Airavata.Iface {
             throw exception;
         }
     }
-    
+
+    @Override
+    public SSHJobSubmission getSSHJobSubmission(String jobSubmissionId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getSSHJobSubmission(jobSubmissionId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving SSH job submission interface to resource
compute resource...";
+            logger.errorId(jobSubmissionId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Add a Cloud Job Submission details to a compute resource
      * App catalog will return a jobSubmissionInterfaceId which will be added to the jobSubmissionInterfaces.
@@ -2020,6 +2050,21 @@ public class AiravataServerHandler implements Airavata.Iface {
     }
 
     @Override
+    public CloudJobSubmission getCloudJobSubmission(String jobSubmissionId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getCloudJobSubmission(jobSubmissionId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving Cloud job submission interface to resource
compute resource...";
+            logger.errorId(jobSubmissionId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
+    @Override
 	public String addUNICOREJobSubmissionDetails(String computeResourceId,
 			int priorityOrder, UnicoreJobSubmission unicoreJobSubmission)
 			throws InvalidRequestException, AiravataClientException,
@@ -2038,7 +2083,22 @@ public class AiravataServerHandler implements Airavata.Iface {
 	    }
 	}
 
-	/**
+    @Override
+    public UnicoreJobSubmission getUnicoreJobSubmission(String jobSubmissionId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getUNICOREJobSubmission(jobSubmissionId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving Unicore job submission interface to
resource compute resource...";
+            logger.errorId(jobSubmissionId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
+    /**
      * Update the given SSH Job Submission details
      *
      * @param jobSubmissionInterfaceId The identifier of the JobSubmission Interface to be
updated.
@@ -2135,6 +2195,21 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public LOCALDataMovement getLocalDataMovement(String dataMovementId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getLocalDataMovement(dataMovementId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving local data movement interface to resource
compute resource...";
+            logger.errorId(dataMovementId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
     private String addDataMovementInterface(ComputeResource computeResource,
 			String computeResourceId, String dataMovementInterfaceId,
 			DataMovementProtocol protocolType, int priorityOrder)
@@ -2197,6 +2272,21 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public SCPDataMovement getSCPDataMovement(String dataMovementId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getSCPDataMovement(dataMovementId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving SCP data movement interface to resource
compute resource...";
+            logger.errorId(dataMovementId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Add a GridFTP data moevement details to a compute resource
      * App catalog will return a dataMovementInterfaceId which will be added to the dataMovementInterfaces.
@@ -2248,6 +2338,21 @@ public class AiravataServerHandler implements Airavata.Iface {
         }
     }
 
+    @Override
+    public GridFTPDataMovement getGridFTPDataMovement(String dataMovementId) throws InvalidRequestException,
AiravataClientException, AiravataSystemException, TException {
+        try {
+            appCatalog = AppCatalogFactory.getAppCatalog();
+            return appCatalog.getComputeResource().getGridFTPDataMovement(dataMovementId);
+        } catch (AppCatalogException e) {
+            String errorMsg = "Error while retrieving GridFTP data movement interface to
resource compute resource...";
+            logger.errorId(dataMovementId, errorMsg, e);
+            AiravataSystemException exception = new AiravataSystemException();
+            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
+            exception.setMessage(errorMsg + e.getMessage());
+            throw exception;
+        }
+    }
+
     /**
      * Change the priority of a given job submisison interface
      *


Mime
View raw message