lei-xia commented on a change in pull request #1413:
URL: https://github.com/apache/helix/pull/1413#discussion_r500753771
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/dataproviders/BaseControllerDataProvider.java
##########
@@ -428,13 +466,37 @@ public synchronized void setIdealStates(List<IdealState>
idealStates) {
}
/**
- * Returns the LiveInstances for each of the instances that are curretnly up
and running
- * @return
+ * Returns the LiveInstances for each of the instances that are currently up
and running,
+ * excluding the instances that are considered offline during maintenance
mode. Instances
+ * are timed-out if they have been offline for a while before going live
during maintenance mode.
*/
public Map<String, LiveInstance> getLiveInstances() {
+ return getLiveInstances(true);
+ }
+
+ /**
+ * Returns the LiveInstances for each of the instances that are currently up
and running
+ */
+ public Map<String, LiveInstance> getAllLiveInstances() {
Review comment:
These two methods (getLiveInstances() and getAllLiveInstances() are very
confusing to each other. We would need a better naming here. We have four
type of instances: All Instances, Live Instances, enabled/disabled Instances,
timeout-ed instances. We have a method called getEnabledLiveInstances(), maybe
we can name this new method getNonTimeoutLiveInstances()?
----------------------------------------------------------------
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]