narendly commented on a change in pull request #838: Make ConfigAccessor and
ZkUtil realm-aware
URL: https://github.com/apache/helix/pull/838#discussion_r386713496
##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKUtil.java
##########
@@ -92,15 +97,17 @@ public static boolean isClusterSetup(String clusterName,
HelixZkClient zkClient)
requiredPaths.add(PropertyPathBuilder.controllerHistory(clusterName));
boolean isValid = true;
- BaseDataAccessor<Object> baseAccessor = new
ZkBaseDataAccessor<Object>(zkClient);
- boolean[] ret = baseAccessor.exists(requiredPaths, 0);
+ boolean[] ret = new boolean[requiredPaths.size()];
+ for (int i = 0; i < requiredPaths.size(); i++) {
+ ret[i] = zkClient.exists(requiredPaths.get(i));
+ }
StringBuilder errorMsg = new StringBuilder();
for (int i = 0; i < ret.length; i++) {
if (!ret[i]) {
isValid = false;
- errorMsg
- .append(("Invalid cluster setup, missing znode path: " +
requiredPaths.get(i)) + "\n");
+ errorMsg.append("Invalid cluster setup, missing znode path:
").append(requiredPaths.get(i))
Review comment:
Feel free to do this in a future PR. This PR is not about improving or
modifying the logic of ZkUtil. It simply is making things realm-aware.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]