You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/05/27 20:00:33 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #1007: Add more accurate error message for resetPartition

dasahcc commented on a change in pull request #1007:
URL: https://github.com/apache/helix/pull/1007#discussion_r431408367



##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
##########
@@ -560,6 +560,28 @@ private void processMaintenanceMode(String clusterName, final boolean enabled,
     }
   }
 
+  private enum ResetPartitionFailureReason {
+    INSTANCE_NOTALIVE("%s is not alive in cluster %s"),
+    INSTANCE_NONEXISTENT("%s does not exist in cluster %s"),
+    RESOURCE_NONEXISTENT("resource %s is not added to cluster %s"),
+    PARTITION_NONEXISTENT("not all %s exist in cluster %s"),
+    PARTITION_NOT_ERROR("%s is NOT found in cluster %s"),
+    STATE_MODEL_NONEXISTENT("%s is NOT found in cluster %s"),

Review comment:
       Let's make the naming convention consistent. NON will be a word that better to have:
   
   INSTANCE_NOT_ALIVE
   INSTANCE_NON_EXISTENT
   ...
   PARTITION_NOT_ERROR




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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org