You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/04/15 10:54:16 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #799: HDDS-3360. Duplicate Ozone Client in renew/cancel token handlers

adoroszlai commented on a change in pull request #799: HDDS-3360. Duplicate Ozone Client in renew/cancel token handlers
URL: https://github.com/apache/hadoop-ozone/pull/799#discussion_r408753852
 
 

 ##########
 File path: hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/Handler.java
 ##########
 @@ -58,15 +58,25 @@ public OzoneConfiguration createOzoneConfiguration() {
     return parent.createOzoneConfiguration();
   }
 
-  protected abstract OzoneAddress getAddress() throws OzoneClientException;
+  protected OzoneAddress getAddress() throws OzoneClientException {
+    return new OzoneAddress();
+  }
 
   protected abstract void execute(OzoneClient client, OzoneAddress address)
       throws IOException, OzoneClientException;
 
+  protected boolean isApplicable() {
 
 Review comment:
   Thanks @xiaoyuyao for the review.
   
   > NIT: isApplicable is very generic, can this be more specific?
   
   `Handler` itself is very generic, at that level I don't think the method can be more specific.  Added javadoc for `isApplicable` to explain its intended usage.  Also changed few more classes to override it and got rid of their own explicit `if` check in `execute`.
   
   > when it return null (e.g., the user input miss some arguments),
   
   Note that `Void call()` always returns `null`, it's not a sign of success/failure.
   
   > do we ensure context related help returned from the console output? Maybe we can add a negative case in the new acceptance test.
   
   I have added such negative test case for token operations.

----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org