apurtell commented on a change in pull request #1879:
URL: https://github.com/apache/hbase/pull/1879#discussion_r437737134



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java
##########
@@ -66,8 +66,14 @@ public HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(String[] args)
      * @throws IOException
      * @throws InterruptedException
      */
-    void runCmdLine() throws KeeperException, IOException, 
InterruptedException {
-      processCmd(this.cl);
+    void runCmdLine() throws IOException, InterruptedException {
+      try {
+        processCmd(this.cl);
+      } catch (IOException | InterruptedException e) {
+        throw e;
+      } catch (Exception e) {

Review comment:
       The current signature proposes we throw IOException or 
InterruptedException. ZK 3.6 throws another type of checked exception, which 
causes a compilation error. Therefore I catch that and potentially others, and 
wrap it into an IOE. 
   
   Adding the new checked exception to the signature would cause a compilation 
problem with 3.4, so that is not possible due to this legacy.

##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
##########
@@ -85,14 +85,20 @@ public static void main(String[] args) {
   }
 
   private static void runZKServer(QuorumPeerConfig zkConfig) throws 
UnknownHostException, IOException {

Review comment:
       
   
   The current signature proposes we throw IOException or InterruptedException. 
ZK 3.6 throws another type of checked exception, which causes a compilation 
error. Therefore I catch that and potentially others, and wrap it into an IOE.
   
   Adding the new checked exception to the signature would cause a compilation 
problem with 3.4, so that is not possible due to this legacy.




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


Reply via email to