qqu0127 commented on code in PR #2327:
URL: https://github.com/apache/helix/pull/2327#discussion_r1065907347


##########
meta-client/src/main/java/org/apache/helix/metaclient/constants/MetaClientInterruptException.java:
##########
@@ -0,0 +1,19 @@
+package org.apache.helix.metaclient.constants;
+
+public final class MetaClientInterruptException extends MetaClientException {

Review Comment:
   add apache license



##########
meta-client/src/main/java/org/apache/helix/metaclient/constants/MetaClientTimeoutException.java:
##########
@@ -0,0 +1,20 @@
+package org.apache.helix.metaclient.constants;
+
+public final class MetaClientTimeoutException extends MetaClientException {

Review Comment:
   license



##########
meta-client/src/main/java/org/apache/helix/metaclient/constants/MetaClientBadVersionException.java:
##########
@@ -0,0 +1,20 @@
+package org.apache.helix.metaclient.constants;
+
+public final class MetaClientBadVersionException extends MetaClientException {

Review Comment:
   add apache license



##########
meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java:
##########
@@ -301,4 +363,34 @@ public int hashCode() {
       return _listener.hashCode();
     }
   }
+  private MetaClientException 
translateZkExceptionToMetaclientException(ZkException e) {

Review Comment:
   nit: empty line
   Also this method can be static?



##########
meta-client/src/main/java/org/apache/helix/metaclient/constants/MetaClientNoNodeException.java:
##########
@@ -0,0 +1,20 @@
+package org.apache.helix.metaclient.constants;
+
+public final class MetaClientNoNodeException extends MetaClientException {

Review Comment:
   license



##########
meta-client/src/main/java/org/apache/helix/metaclient/api/MetaClientInterface.java:
##########
@@ -332,9 +349,9 @@ void asyncCreate(final String key, final T data, final 
EntryMode mode,
   /**
    * Maintains a connection with underlying metadata service based on config 
params. Connection
    * created by this method will be used to perform CRUD operations on 
metadata service.
-   * @return True if connection is successfully established.
+   * @Throws MetaClientException when failed to connect.
    */
-  boolean connect();
+  void connect();

Review Comment:
   shall we mark exception type at the method?



##########
meta-client/src/main/java/org/apache/helix/metaclient/api/MetaClientInterface.java:
##########
@@ -332,9 +349,9 @@ void asyncCreate(final String key, final T data, final 
EntryMode mode,
   /**
    * Maintains a connection with underlying metadata service based on config 
params. Connection
    * created by this method will be used to perform CRUD operations on 
metadata service.
-   * @return True if connection is successfully established.
+   * @Throws MetaClientException when failed to connect.
    */
-  boolean connect();
+  void connect();

Review Comment:
   also nit, some behavior clarification on repeated connect() will be good. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to