airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: adding stdout to error message
Date Wed, 13 Jan 2016 15:51:07 GMT
Repository: airavata
Updated Branches:
  refs/heads/master e43b6d918 -> 7c935e75d


adding stdout to error message


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

Branch: refs/heads/master
Commit: 7c935e75d9c6e69665ff3229d62f03a8c6b49d8d
Parents: e43b6d9
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Wed Jan 13 10:52:00 2016 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Wed Jan 13 10:52:00 2016 -0500

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/impl/GFacEngineImpl.java   | 12 ++++++------
 .../gfac/impl/task/DefaultJobSubmissionTask.java        |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7c935e75/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
index 4339869..caddbb2 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
@@ -524,21 +524,21 @@ public class GFacEngineImpl implements GFacEngine {
         return false;
     }
 
-    private void checkFailures(TaskContext taskContext, TaskStatus taskStatus, Task dMoveTask)
throws GFacException {
+    private void checkFailures(TaskContext taskContext, TaskStatus taskStatus, Task task)
throws GFacException {
         if (taskStatus.getState() == TaskState.FAILED) {
-            log.error("expId: {}, processId: {}, taskId: {} type: {},:- Input statging failed,
" +
+            log.error("expId: {}, processId: {}, taskId: {} type: {},:- " + task.getType().toString()
+ " failed, " +
                     "reason:" + " {}", taskContext.getParentProcessContext().getExperimentId(),
taskContext
-                    .getParentProcessContext().getProcessId(), taskContext.getTaskId(), dMoveTask.getType
+                    .getParentProcessContext().getProcessId(), taskContext.getTaskId(), task.getType
                     ().name(), taskStatus.getReason());
             String errorMsg = new StringBuilder("expId: ").append(taskContext.getParentProcessContext().getExperimentId()).append(",
processId: ")
                     .append(taskContext.getParentProcessContext().getProcessId()).append(",
taskId: ").append(taskContext.getTaskId())
-                    .append(", type: ").append(taskContext.getTaskType().name()).append("
:- Input staging failed. Reason: ")
+                    .append(", type: ").append(taskContext.getTaskType().name()).append("
:- " + task.getType().toString() + " failed. Reason: ")
                     .append(taskStatus.getReason()).toString();
             ErrorModel errorModel = new ErrorModel();
-            errorModel.setUserFriendlyMessage("Error while staging input data");
+            errorModel.setUserFriendlyMessage("Error while executing " + task.getType() +
" task" );
             errorModel.setActualErrorMessage(errorMsg);
             GFacUtils.saveTaskError(taskContext, errorModel);
-            throw new GFacException("Error while staging input data");
+            throw new GFacException("Error while executing " + task.getType() + " task");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7c935e75/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DefaultJobSubmissionTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DefaultJobSubmissionTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DefaultJobSubmissionTask.java
index ebdda13..81b5f91 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DefaultJobSubmissionTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DefaultJobSubmissionTask.java
@@ -106,12 +106,12 @@ public class DefaultJobSubmissionTask implements JobSubmissionTask {
 							msg = "expId:" + processContext.getProcessModel().getExperimentId() + ", processId:"
+
 									processContext.getProcessId() + ", taskId: " + taskContext.getTaskId() +
 									" return non zero exit code:" + exitCode + "  for JobName:" + jobModel.getJobName()
+
-									", Hence changing job state to Failed";
+									", with failure reason :  " + jobSubmissionOutput.getStdOut() +  " Hence changing
job state to Failed." ;
 						} else {
 							msg = "expId:" + processContext.getProcessModel().getExperimentId() + ", processId:"
+
 									processContext.getProcessId() + ", taskId: " + taskContext.getTaskId() +
 									" doesn't  return valid job submission exit code for JobName:" + jobModel.getJobName()
+
-									", Hence changing job state to Failed";
+                                    ", with failure reason :  " + jobSubmissionOutput.getStdOut()
+  " Hence changing job state to Failed." ;
 						}
 						log.error(msg);
 						ErrorModel errorModel = new ErrorModel();
@@ -121,7 +121,7 @@ public class DefaultJobSubmissionTask implements JobSubmissionTask {
 						GFacUtils.saveProcessError(processContext, errorModel);
 						GFacUtils.saveTaskError(taskContext, errorModel);
 						taskStatus.setState(TaskState.FAILED);
-						taskStatus.setReason("Job submission command exit with non zero exit code");
+						taskStatus.setReason(msg);
 						taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
 						taskContext.setTaskStatus(taskStatus);
 					}


Mime
View raw message