Jackie-Jiang commented on code in PR #16255:
URL: https://github.com/apache/pinot/pull/16255#discussion_r2178755913


##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/DiskUtilizationChecker.java:
##########
@@ -63,14 +63,15 @@ public String getName() {
    * Check if disk utilization for the requested table is within the 
configured limits.
    */
   @Override
-  public boolean isResourceUtilizationWithinLimits(String tableNameWithType, 
UtilizationChecker.CheckPurpose purpose) {
+  public CheckResult isResourceUtilizationWithinLimits(String 
tableNameWithType,
+      UtilizationChecker.CheckPurpose purpose) {

Review Comment:
   (minor)
   ```suggestion
         CheckPurpose purpose) {
   ```



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java:
##########
@@ -223,8 +223,8 @@ public Map<String, String> createTask(String taskType, 
String tableName, @Nullab
       TableConfig tableConfig = 
_pinotHelixResourceManager.getTableConfig(tableNameWithType);
       LOGGER.info("Trying to create tasks of type: {}, table: {}", taskType, 
tableNameWithType);
       try {
-        if 
(!_resourceUtilizationManager.isResourceUtilizationWithinLimits(tableNameWithType,
-            UtilizationChecker.CheckPurpose.TASK_GENERATION)) {
+        if 
(_resourceUtilizationManager.isResourceUtilizationWithinLimits(tableNameWithType,
+            
UtilizationChecker.CheckPurpose.TASK_GENERATION).equals(UtilizationChecker.CheckResult.FAIL))
 {

Review Comment:
   (minor) We usually use `==` for enums. Same for other places



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to