zpinto commented on code in PR #2661:
URL: https://github.com/apache/helix/pull/2661#discussion_r1379419865
##########
helix-core/src/main/java/org/apache/helix/controller/dataproviders/BaseControllerDataProvider.java:
##########
@@ -617,6 +625,24 @@ public Set<String> getDisabledInstances() {
return Collections.unmodifiableSet(_disabledInstanceSet);
}
+ /**
+ * Get all swapping instance pairs.
+ *
+ * @return a map of SWAP_OUT instanceNames and their corresponding SWAP_IN
instanceNames.
+ */
+ public Map<String, String> getSwapOutToSwapInInstancePairs() {
+ return
Collections.unmodifiableMap(_swapOutInstanceNameToSwapInInstanceName);
+ }
+
+ /**
+ * Get all the enabled and live SWAP_IN instances.
+ *
+ * @return a set of SWAP_IN instanceNames that have a corresponding SWAP_OUT
instance.
+ */
+ public Set<String> getEnabledLiveSwapInInstanceNames() {
Review Comment:
Discussed offline.
TLDR: Sanity checks ensure that we can't have a case where there are two
instances with the same logicalId and both have InstanceOperation unset. This
allows for setting either SWAP_OUT node or SWAP_IN node instance operation
first.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]