jiajunwang commented on a change in pull request #867: Make 
ZkHelixClusterVerifier and its child classes realm-aware
URL: https://github.com/apache/helix/pull/867#discussion_r388725599
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/BestPossibleExternalViewVerifier.java
 ##########
 @@ -94,29 +93,43 @@ public BestPossibleExternalViewVerifier(HelixZkClient 
zkClient, String clusterNa
     _dataProvider = new ResourceControllerDataProvider();
   }
 
-  public static class Builder {
-    private String _clusterName;
+  private 
BestPossibleExternalViewVerifier(BestPossibleExternalViewVerifier.Builder 
builder) {
+    super(builder);
+    _errStates = builder._errStates;
+    _resources = builder._resources;
+    _expectLiveInstances = builder._expectLiveInstances;
+    _dataProvider = new ResourceControllerDataProvider();
+  }
+
+  public static class Builder extends ZkHelixClusterVerifier.Builder {
+    private final String _clusterName;
     private Map<String, Map<String, String>> _errStates;
     private Set<String> _resources;
     private Set<String> _expectLiveInstances;
-    private String _zkAddr;
-    private HelixZkClient _zkClient;
+    private RealmAwareZkClient _zkClient;
 
     public Builder(String clusterName) {
       _clusterName = clusterName;
     }
 
     public BestPossibleExternalViewVerifier build() {
-      if (_clusterName == null || (_zkAddr == null && _zkClient == null)) {
+      if (_clusterName == null || (_zkAddress == null && _zkClient == null)) {
         throw new IllegalArgumentException("Cluster name or zookeeper info is 
missing!");
       }
 
       if (_zkClient != null) {
         return new BestPossibleExternalViewVerifier(_zkClient, _clusterName, 
_resources, _errStates,
 
 Review comment:
   Is it possible that we merge this constructor logic into 
BestPossibleExternalViewVerifier(Builder); So we don't need to maintain both 
logics.

----------------------------------------------------------------
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]

Reply via email to