storm-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [storm] Ethanlm commented on a change in pull request #3128: STORM-3509 Improved RAS scheduling
Date Wed, 02 Oct 2019 17:49:43 GMT
Ethanlm commented on a change in pull request #3128: STORM-3509 Improved RAS scheduling
URL: https://github.com/apache/storm/pull/3128#discussion_r330582623
 
 

 ##########
 File path: storm-server/src/main/java/org/apache/storm/scheduler/resource/normalization/NormalizedResources.java
 ##########
 @@ -402,16 +402,32 @@ public void clear() {
         }
     }
 
-    /**
-     * Are any of the resources positive.
-     * @return true of any of the resources are positive.  False if they are all <= 0.
-     */
-    public boolean areAnyOverZero() {
+    private boolean areAnyOverZero(boolean skipCpuCheck) {
         for (int i = 0; i < otherResources.length; i++) {
             if (otherResources[i] > 0) {
                 return true;
             }
         }
-        return cpu > 0;
+        if (skipCpuCheck) {
+            return false;
+        } else {
+            return cpu > 0;
+        }
+    }
+
+    /**
+     * Are any of the resources positive.
+     * @return true of any of the resources are positive.  False if they are all <= 0.
+     */
+    public boolean areAnyOverZero() {
+        return areAnyOverZero(false);
+    }
+
+    /**
+     * Are any of the non cpu resources positive.
+     * @return true of any of the resources are positive.  False if they are all <= 0.
 
 Review comment:
   nit: change to `any of the non cpu resources`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message