airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msme...@apache.org
Subject [1/4] airavata git commit: - more testing
Date Mon, 24 Nov 2014 15:14:20 GMT
Repository: airavata
Updated Branches:
  refs/heads/master ab23ac920 -> 897d765c8


- more testing

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

Branch: refs/heads/master
Commit: a838b664820ea2d8fe86390a41b30340319035fb
Parents: 5413e67
Author: msmemon <shahbaz.memon@gmail.com>
Authored: Mon Nov 17 12:17:36 2014 +0100
Committer: msmemon <shahbaz.memon@gmail.com>
Committed: Mon Nov 17 12:17:36 2014 +0100

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java  | 22 +++++++--------
 .../tools/RegisterSampleApplications.java       |  8 +++---
 .../gfac/bes/utils/DataTransferrer.java         | 28 +++++++++++---------
 3 files changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a838b664/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 05395e6..b0ee5a0 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
@@ -55,7 +55,7 @@ public class CreateLaunchExperiment {
     private static final String DEFAULT_GATEWAY = "default.registry.gateway";
     private static Airavata.Client airavataClient;
 
-    private static String echoAppId = "Echo_636b4530-6fb2-4c9e-998a-b41e648aa70f";
+    private static String echoAppId = "Echo_7405adc7-9519-4478-8529-21846b837cd3";
     private static String wrfAppId = "WRF_d41bdc86-e280-4eb6-a045-708f69a8c116";
     private static String amberAppId = "Amber_b23ee051-90d6-4892-827e-622a2f6c95ee";
 
@@ -73,7 +73,7 @@ public class CreateLaunchExperiment {
     public static void main(String[] args) throws Exception {
                 airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST,
THRIFT_SERVER_PORT);
                 System.out.println("API version is " + airavataClient.getAPIVersion());
-    //            registerApplications(); // run this only the first time
+//                registerApplications(); // run this only the first time
                 createAndLaunchExp();
     }
     
@@ -208,22 +208,22 @@ public class CreateLaunchExperiment {
         try {
         	// these are template variables and do not need to have values, as it is a data
model.
             List<DataObjectType> exInputs = new ArrayList<DataObjectType>();
-            DataObjectType input = new DataObjectType();
-            input.setKey("Input_to_Echo");
-            input.setType(DataType.STRING);
-            input.setValue("Echoed_Output=Hello World");
-            exInputs.add(input);
+            DataObjectType i1 = new DataObjectType();
+            i1.setKey("i1");
+            i1.setType(DataType.STRING);
+            i1.setValue("Test echo output");
+            exInputs.add(i1);
             DataObjectType i2 = new DataObjectType();
-            i2.setKey("Input_to_Echo1");
+            i2.setKey("i2");
             i2.setType(DataType.URI);
-            i2.setValue("http://shrib.com/22QmrrX4");
+            i2.setValue("http://textfiles.com/art/152614.txt");
             exInputs.add(i2);
 
             List<DataObjectType> exOut = new ArrayList<DataObjectType>();
             DataObjectType output = new DataObjectType();
-            output.setKey("Echoed_Output");
+            output.setKey("o1");
             output.setType(DataType.STRING);
-            output.setValue("22QmrrX4");
+            output.setValue("152614.txt");
             exOut.add(output);
             
             

http://git-wip-us.apache.org/repos/asf/airavata/blob/a838b664/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
index 1e4b591..d9ccebb 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
@@ -529,10 +529,10 @@ public class RegisterSampleApplications {
             List<String> appModules = new ArrayList<String>();
             appModules.add(echoModuleId);
 
-            InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("Input_to_Echo",
"Hello World",
+            InputDataObjectType input1 = RegisterSampleApplicationsUtils.createAppInput("i1",
"",
                     DataType.STRING, null, false, "A test string to Echo", null);
             
-            InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("Input_to_Echo1",
"http://shrib.com/22QmrrX4",
+            InputDataObjectType input2 = RegisterSampleApplicationsUtils.createAppInput("i2",
"",
                     DataType.URI, null, false, "A test uri to Echo", null);
 
             
@@ -540,8 +540,8 @@ public class RegisterSampleApplications {
             applicationInputs.add(input1);
             applicationInputs.add(input2);
 
-            OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("Echoed_Output",
-                    "22QmrrX4", DataType.STRING);
+            OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("o1",
+                    "", DataType.STRING);
 
             List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>();
             applicationOutputs.add(output1);

http://git-wip-us.apache.org/repos/asf/airavata/blob/a838b664/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
index 79fbae4..fa9eb83 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
@@ -156,7 +156,7 @@ public class DataTransferrer {
 			}
 		}
 		 if (stringMap == null || stringMap.isEmpty()) {
-             throw new GFacProviderException("Empty Output returned from the Application,
Double check the application" +
+             log.warn("Empty Output returned from the Application, Double check the application"
+
                      "and ApplicationDescriptor output Parameter Names");
          }
 		
@@ -197,29 +197,31 @@ public class DataTransferrer {
 		FileDownloader f1 = new FileDownloader(stdoutFileName,stdoutLocation, Mode.overwrite);
 		try {
 			f1.perform(storageClient);
+			log.info("Downloading stdout and stderr..");
 			String stdoutput = readFile(stdoutLocation);
+			log.info("Stdout downloaded to "+stdoutLocation);
 			appDesc.setStandardOutput(stdoutput);
-		} catch (Exception e) {
-			throw new GFacProviderException(e.getLocalizedMessage(),e);
-		}
-		String stderrLocation = downloadLocation+File.separator+stderrFileName;
-//		FileDownloader f2 = new FileDownloader(stderrFileName,stderrLocation, Mode.overwrite);
-		try {
+			
+			if(UASDataStagingProcessor.isUnicoreEndpoint(jobContext)) {
+				String scriptExitCodeFName = "UNICORE_SCRIPT_EXIT_CODE";
+				String scriptCodeLocation = downloadLocation+File.separator+scriptExitCodeFName;
+				f1.setFrom(scriptExitCodeFName);
+				f1.setTo(downloadLocation+File.separator+scriptCodeLocation);
+				f1.perform(storageClient);
+				log.info("UNICORE_SCRIPT_EXIT_CODE downloaded to "+scriptCodeLocation);
+			}
+
+			String stderrLocation = downloadLocation+File.separator+stderrFileName;
 			f1.setFrom(stderrFileName);
 			f1.setTo(stderrLocation);
 			f1.perform(storageClient);
 			String stderror = readFile(stderrLocation);
+			log.info("Stderr downloaded to "+stderrLocation);
 			appDesc.setStandardError(stderror);
 		} catch (Exception e) {
 			throw new GFacProviderException(e.getLocalizedMessage(),e);
 		}
 		
-		if(UASDataStagingProcessor.isUnicoreEndpoint(jobContext)) {
-			String scriptExitCodeFName = "UNICORE_SCRIPT_EXIT_CODE";
-			f1.setFrom(scriptExitCodeFName);
-			f1.setTo(downloadLocation+File.separator+scriptExitCodeFName);
-			
-		}
 	}
 	
 	public List<String> extractOutStringParams(JobExecutionContext context) {


Mime
View raw message