jiajunwang commented on a change in pull request #1740:
URL: https://github.com/apache/helix/pull/1740#discussion_r635604654
##########
File path: helix-core/src/main/java/org/apache/helix/model/LiveInstance.java
##########
@@ -130,6 +140,22 @@ public void setHelixVersion(String helixVersion) {
_record.setSimpleField(LiveInstanceProperty.HELIX_VERSION.toString(),
helixVersion);
}
+ /**
+ * Gets the live instance's status.
+ */
+ public LiveInstanceStatus getStatus() {
+ return
LiveInstanceStatus.valueOf(_record.getSimpleField(LiveInstanceProperty.STATUS.name()));
Review comment:
As you said, "For backward compatibility, the status field in live
instance will be removed once it goes back to NORMAL.", this method will throw
NPE under normal status. I guess your current test does not cover this case.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]