airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [16/20] airavata git commit: Fixed NPE with cloud monitor mode
Date Wed, 02 Nov 2016 03:30:27 GMT
Fixed NPE with cloud monitor mode


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

Branch: refs/heads/auroraMesosIntegration
Commit: e66337028857c627576cc7260eae49e769e8c047
Parents: 64f823b
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Tue Nov 1 22:30:52 2016 -0400
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Tue Nov 1 22:30:52 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/gfac/impl/Factory.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e6633702/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
index 8dd8699..5e8de6d 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/Factory.java
@@ -454,7 +454,7 @@ public abstract class Factory {
 		}
 	}
 
-	public static JobMonitor getMonitorService(MonitorMode monitorMode) throws AiravataException
{
+	public static JobMonitor getMonitorService(MonitorMode monitorMode) throws AiravataException,
GFacException {
 		JobMonitor jobMonitor = jobMonitorServices.get(monitorMode);
 		if (jobMonitor == null) {
 			synchronized (JobMonitor.class) {
@@ -471,6 +471,11 @@ public abstract class Factory {
 							AuroraJobMonitor auroraJobMonitor = AuroraJobMonitor.getInstance();
 							new Thread(auroraJobMonitor).start();
 							jobMonitorServices.put(MonitorMode.CLOUD_JOB_MONITOR, auroraJobMonitor);
+							jobMonitor = auroraJobMonitor;
+							break;
+						default:
+							throw new GFacException("Unsupported monitor mode :" + monitorMode.name());
+
 					}
 				}
 			}
@@ -478,7 +483,7 @@ public abstract class Factory {
 		return jobMonitor;
 	}
 
-	public static JobMonitor getDefaultMonitorService() throws AiravataException {
+	public static JobMonitor getDefaultMonitorService() throws AiravataException, GFacException
{
 		return getMonitorService(MonitorMode.JOB_EMAIL_NOTIFICATION_MONITOR);
 	}
 


Mime
View raw message