Apache9 commented on code in PR #5865:
URL: https://github.com/apache/hbase/pull/5865#discussion_r1608392949


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionRegistryURIFactory.java:
##########
@@ -39,4 +39,10 @@ public interface ConnectionRegistryURIFactory {
    * {@link ConnectionRegistryFactory}.
    */
   String getScheme();
+
+  /**
+   * Validate the given {@code uri}.
+   * @throws IOException if this is not a valid connection registry URI.
+   */
+  void validate(URI uri) throws IOException;

Review Comment:
   Checked the implementation, now we have these errors
   
   No protocol scheme
   No factory registered for the scheme
   
   For zk based registry
   Empty zk server string, i.e, empty uri authority
   Empty zk parent path, i.e, empty uri path
   
   For rpc based registry
   Empty bootstrap nodes, i.e, empty uri authority
   
   In general, there are no accurate exception types for these errors, and 
since we may add new checks for different registry implementations in the 
future, I prefer we still keep the `throws IOException` declaration, and can 
file new issues to add some specific exceptions which extend HBaseIOException 
for these cases.



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

Reply via email to