Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D0F417E88 for ; Fri, 24 Oct 2014 18:35:04 +0000 (UTC) Received: (qmail 32622 invoked by uid 500); 24 Oct 2014 18:35:04 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 32511 invoked by uid 500); 24 Oct 2014 18:35:03 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 32414 invoked by uid 99); 24 Oct 2014 18:35:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 18:35:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7D0BF313AB5; Fri, 24 Oct 2014 18:35:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chathuri@apache.org To: commits@airavata.apache.org Date: Fri, 24 Oct 2014 18:35:08 -0000 Message-Id: In-Reply-To: <0b2ca23e608e4e98864a0751c9d90b30@git.apache.org> References: <0b2ca23e608e4e98864a0751c9d90b30@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [6/6] git commit: fixing AIRAVATA-1487 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 Authored: Fri Oct 24 14:34:54 2014 -0400 Committer: Chathuri Wimalasena 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 *