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/09 17:52:00 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #800: HDDS-3093. Allow forced overwrite of local file

adoroszlai commented on a change in pull request #800: HDDS-3093. Allow forced overwrite of local file
URL: https://github.com/apache/hadoop-ozone/pull/800#discussion_r406375353
 
 

 ##########
 File path: hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/keys/GetKeyHandler.java
 ##########
 @@ -80,7 +88,7 @@ protected void execute(OzoneClient client, OzoneAddress address)
       IOUtils.copyBytes(input, output, chunkSize);
     }
 
-    if (isVerbose()) {
+    if (isVerbose() && !"/dev/null".equals(dataFile.getAbsolutePath())) {
 
 Review comment:
   I think that's OK.    This check does not affect functionality and we're not relying on any specific property of `/dev/null` here.  The worst thing that can happen is that if someone issues `ozone sh --verbose key get ... /dev/null` on Windows, hash is not printed.  But I doubt that's a valid file on Windows anyway.

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