narendly commented on a change in pull request #855: Make ZkBaseDataAccessor 
realm-aware
URL: https://github.com/apache/helix/pull/855#discussion_r387968312
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
 ##########
 @@ -102,14 +107,31 @@ public AccessResult() {
 
   private static Logger LOG = 
LoggerFactory.getLogger(ZkBaseDataAccessor.class);
 
-  private final HelixZkClient _zkClient;
-  // true if ZkBaseDataAccessor was instantiated with a HelixZkClient, false 
otherwise
+  private static final String EMPTY_ZK_ADDRESS = "";
+
+  private final RealmAwareZkClient _zkClient;
+  // true if ZkBaseDataAccessor was instantiated with a RealmAwareZkClient, 
false otherwise
   // This is used for close() to determine how ZkBaseDataAccessor should close 
the underlying
   // ZkClient
   private final boolean _usesExternalZkClient;
 
+  /**
+   * This default constructor attempts to connect to ZK on multi-realm mode.
+   *
+   * @exception IllegalStateException if connecting to ZK on multi-realm mode 
fails
+   */
+  public ZkBaseDataAccessor() {
+    this(EMPTY_ZK_ADDRESS);
+  }
 
 Review comment:
   ZkBaseDataAccessor needs to be able to take in Connection and Client 
configs. Instead of a constructor that takes in 0 parameters, could we use the 
builder pattern to achieve this? See the example for ConfigAccessor.

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