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/30 08:09:19 UTC
[GitHub] [helix] pkuwm commented on a change in pull request #1041: Change the error message to be meaningful naming
pkuwm commented on a change in pull request #1041:
URL: https://github.com/apache/helix/pull/1041#discussion_r432821576
##########
File path: helix-rest/src/main/java/org/apache/helix/rest/server/json/instance/StoppableCheck.java
##########
@@ -30,8 +30,8 @@
// Category to differentiate which step the check fails
public enum Category {
HELIX_OWN_CHECK("Helix:"),
- CUSTOM_INSTANCE_CHECK("CustomInstance:"),
- CUSTOM_PARTITION_CHECK("CustomPartition:");
+ CUSTOM_INSTANCE_CHECK("CustomInstanceHealthFailure:"),
+ CUSTOM_PARTITION_CHECK("CustomPartitionHealthFailure:");
Review comment:
There are other fields in the response json as below.
```
{
"instance_stoppable_parallel" : [ ],
"instance_not_stoppable_with_reasons" : {
"localhost_8080": [
"CustomPartition:partion1",
"CustomPartition:partition2"
]
}
}
{
"instance_stoppable_parallel" : [ ],
"instance_not_stoppable_with_reasons" : {
"localhost_8080" : [ "CustomInstance:localhost_8080" ]
}
}
```
Shall we make the keys format consistent: `custom_health_failure_instance: `? (`_instance` at the end indicates the value is an instance. And add a space after colon `:`?) It looks more consistent and clearer to me.
```
{
"instance_stoppable_parallel" : [ ],
"instance_not_stoppable_with_reasons" : {
"localhost_8080": [
"custom_health_failure_partition: partion1",
"custom_health_failure_partition: partition2"
]
}
}
```
Just a thought: not sure if we have to consider backward-compatibility: if some tools are parsing the json response to determine stoppable, this change will break the tools. Internal code search doesn't show such code usage.
----------------------------------------------------------------
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