adoroszlai commented on code in PR #7403:
URL: https://github.com/apache/ozone/pull/7403#discussion_r1833969589


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/FindMissingPadding.java:
##########
@@ -96,7 +95,7 @@ public class FindMissingPadding extends Handler implements 
SubcommandWithParent
   private final Set<OzoneKey> affectedKeys = new HashSet<>();
 
   @Override
-  protected OzoneAddress getAddress() throws OzoneClientException {
+  protected OzoneAddress getAddress() throws IOException {

Review Comment:
   I think the more specific exception should be kept in `throws` for all 
methods that do not otherwise throw `IOException`.



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/admin/om/GetServiceRolesSubcommand.java:
##########
@@ -94,7 +93,7 @@ public Void call() throws Exception {
       } else {
         printOmServerRoles(ozoneManagerClient.getServiceList());
       }
-    } catch (OzoneClientException ex) {
+    } catch (IOException ex) {
       System.out.printf("Error: %s", ex.getMessage());

Review Comment:
   We can even completely remove `catch`.
   
   Exception is handled by parent command (all other subcommands except 
`GetServiceRolesSubcommand` and `UpdateRangerSubcommand` rely on that).



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