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/06/03 14:52:51 UTC

[GitHub] [hadoop-ozone] elek commented on a change in pull request #990: HDDS-3653. Add documentation for Copy key command

elek commented on a change in pull request #990:
URL: https://github.com/apache/hadoop-ozone/pull/990#discussion_r434628781



##########
File path: hadoop-hdds/docs/content/shell/KeyCommands.md
##########
@@ -155,3 +156,22 @@ The `key cat` command displays the contents of a specific Ozone key to standard
 ozone sh key cat /hive/jan/hello.txt
 {{< /highlight >}}
 Displays the contents of the key hello.txt from the _/hive/jan_ bucket to standard output.
+
+### Cp
+
+The `key cp` command copies a key to another one in the specified bucket.
+
+***Params:***
+
+| Arguments                      |  Comment                                |
+|--------------------------------|-----------------------------------------|
+|  Uri                           | The name of the bucket in **/volume/bucket** format.
+|  FromKey                       | The existing key to be copied
+|  ToKey                         | The name of the new key
+| -r, \-\-replication            | Optional, Number of copies, ONE or THREE are the options. Picks up the default from cluster configuration.
+| -t, \-\-type                   | Optional, replication type of the new key. RATIS and STAND_ALONE are the options. Picks up the default from cluster configuration.
+
+{{< highlight bash >}}
+ozone sh key cp /hive/jan sales.orc new_one.orc

Review comment:
       Based on the code, the answer is no. You can use a bucketAddress (url or vol/bucket) + fromKey (string) + toKey (string).
   
   This patch looks good to me as it describe the current behavior.
   
   @xiaoyuyao Do you have any suggestion to change the code before the next release for better usability (btw. `ozone sh key put DESTINATIONURL localfile` is also reported to be confusing.)




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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org