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/03 05:34:06 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #819: Make RealmAwareZkClient implementatiosn use HttpRoutingDataReader for routing data

pkuwm commented on a change in pull request #819: Make RealmAwareZkClient implementatiosn use HttpRoutingDataReader for routing data
URL: https://github.com/apache/helix/pull/819#discussion_r386807578
 
 

 ##########
 File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/FederatedZkClient.java
 ##########
 @@ -80,19 +83,17 @@
   private PathBasedZkSerializer _pathBasedZkSerializer;
 
   // TODO: support capacity of ZkClient number in one FederatedZkClient and do garbage collection.
-  public FederatedZkClient(RealmAwareZkClient.RealmAwareZkClientConfig clientConfig,
-      MetadataStoreRoutingData metadataStoreRoutingData) {
-    if (metadataStoreRoutingData == null) {
-      throw new IllegalArgumentException("MetadataStoreRoutingData cannot be null!");
-    }
+  public FederatedZkClient(RealmAwareZkClient.RealmAwareZkClientConfig clientConfig)
+      throws IOException, InvalidRoutingDataException {
 
 Review comment:
   I don't think it is a good idea to declare exception in a constructor which I would try to avoid. For this case, I would catch them and throw an `IllegalStateException`.

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