Repository: airavata
Updated Branches:
  refs/heads/develop 9f83606b5 -> 087fdbdab


handling compute resource pref not set for super tenant case


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

Branch: refs/heads/develop
Commit: 087fdbdab3482752f6a01081679332bcc2ddaf4c
Parents: 9f83606
Author: scnakandala <[email protected]>
Authored: Mon Dec 5 15:50:54 2016 -0500
Committer: scnakandala <[email protected]>
Committed: Mon Dec 5 15:50:54 2016 -0500

----------------------------------------------------------------------
 .../cluster/monitoring/ClusterStatusMonitorJob.java     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/087fdbda/modules/cluster-monitoring/src/main/java/org/apache/airavata/cluster/monitoring/ClusterStatusMonitorJob.java
----------------------------------------------------------------------
diff --git 
a/modules/cluster-monitoring/src/main/java/org/apache/airavata/cluster/monitoring/ClusterStatusMonitorJob.java
 
b/modules/cluster-monitoring/src/main/java/org/apache/airavata/cluster/monitoring/ClusterStatusMonitorJob.java
index 0ba8d80..9991ef2 100644
--- 
a/modules/cluster-monitoring/src/main/java/org/apache/airavata/cluster/monitoring/ClusterStatusMonitorJob.java
+++ 
b/modules/cluster-monitoring/src/main/java/org/apache/airavata/cluster/monitoring/ClusterStatusMonitorJob.java
@@ -60,7 +60,12 @@ public class ClusterStatusMonitorJob implements Job {
             String superTenantGatewayId = 
ServerSettings.getSuperTenantGatewayId();
             RegistryService.Client registryClient = getRegistryClient();
             List<ComputeResourceProfile> computeResourceProfiles = new 
ArrayList<>();
-            List<ComputeResourcePreference> computeResourcePreferences = 
registryClient.getAllGatewayComputeResourcePreferences(superTenantGatewayId);
+            List<ComputeResourcePreference> computeResourcePreferences = null;
+            try{
+                computeResourcePreferences = 
registryClient.getAllGatewayComputeResourcePreferences(superTenantGatewayId);
+            }catch (Exception ex){
+                logger.warn("Could not find super tenant compute resources 
preferences for cluster status monitoring...");
+            }
             if (computeResourcePreferences != null && 
computeResourcePreferences.size() > 0) {
                 computeResourcePreferences.stream().forEach(p -> {
                     try {
@@ -188,8 +193,9 @@ public class ClusterStatusMonitorJob implements Job {
                     logger.error(ex.getMessage(), ex);
                 }
             }
-
-            registryClient.registerQueueStatuses(queueStatuses);
+            if(queueStatuses != null && queueStatuses.size() > 0){
+                registryClient.registerQueueStatuses(queueStatuses);
+            }
         }catch (Exception e){
             throw new JobExecutionException(e);
         }

Reply via email to