airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Checks for null monitor mode in ssh job submission
Date Mon, 13 Apr 2015 15:22:37 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 93d4421b7 -> f987a7364


Checks for null monitor mode in ssh job submission


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

Branch: refs/heads/master
Commit: f987a736401cdafc237bcc016ee0a4b1f6aedebc
Parents: 93d4421
Author: shamrath <shameerainfo@gmail.com>
Authored: Mon Apr 13 11:22:35 2015 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Mon Apr 13 11:22:35 2015 -0400

----------------------------------------------------------------------
 .../apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java | 3 ++-
 .../org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f987a736/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index 075f942..8cbafc1 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -144,7 +144,8 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
 
     public void delegateToMonitorHandlers(JobExecutionContext jobExecutionContext, SSHJobSubmission
sshJobSubmission, String jobID) throws GFacHandlerException, AppCatalogException {
         if (jobExecutionContext.getPreferredJobSubmissionProtocol() == JobSubmissionProtocol.SSH)
{
-            if (sshJobSubmission.getMonitorMode() == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR)
{
+            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+            if (monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR)
{
                 EmailMonitorProperty emailMonitorProp = sshJobSubmission.getEmailMonitorProperty();
                 if (emailMonitorProp != null) {
                     EmailMonitorFactory emailMonitorFactory = new EmailMonitorFactory();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f987a736/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 7c29352..4dff9e1 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -378,7 +378,8 @@ public class SSHProvider extends AbstractProvider {
         if (jobExecutionContext.getPreferredJobSubmissionProtocol()== JobSubmissionProtocol.SSH)
{
             String jobSubmissionInterfaceId = jobExecutionContext.getPreferredJobSubmissionInterface().getJobSubmissionInterfaceId();
             SSHJobSubmission sshJobSubmission = jobExecutionContext.getAppCatalog().getComputeResource().getSSHJobSubmission(jobSubmissionInterfaceId);
-            if (sshJobSubmission.getMonitorMode() == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR)
{
+            MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
+            if (monitorMode != null && monitorMode == MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR)
{
                 EmailMonitorProperty emailMonitorProp = sshJobSubmission.getEmailMonitorProperty();
                 if (emailMonitorProp != null) {
                     EmailMonitorFactory emailMonitorFactory = new EmailMonitorFactory();


Mime
View raw message