You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/03/07 23:23:09 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #855: Make ZkBaseDataAccessor realm-aware

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

 ##########
 File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
 ##########
 @@ -102,21 +108,75 @@ 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 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;
 
+  /**
+   * @deprecated it is recommended to use the other constructors instead to avoid having to manually
+   * create and maintain a RealmAwareZkClient outside of ZkBaseDataAccessor.
+   *
+   * @param zkClient A created RealmAwareZkClient
+   */
   @Deprecated
-  public ZkBaseDataAccessor(HelixZkClient zkClient) {
+  public ZkBaseDataAccessor(RealmAwareZkClient zkClient) {
 
 Review comment:
   As we discussed offline, we decided not to add a builder constructor for HelixDataAccessor. 
   
   The reason is: Underneath it is using a BaseDataAccessor, which could an instance of ZkBaseDataAccessor/ZkCacheBaseDataAccessor/HelixPropertyStore, etc.. If we offer a builder constructor, we have to determine which instance of BaseDataAccessor. If we just offer a builder constructor like this Builder().setBaseDataAccessor(), I don’t think we need it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org