You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by xy...@apache.org on 2020/06/03 23:06:11 UTC

[hadoop-ozone] branch master updated: HDDS-3653. Add documentation for Copy key command (#990)

This is an automated email from the ASF dual-hosted git repository.

xyao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e36271  HDDS-3653. Add documentation for Copy key command (#990)
3e36271 is described below

commit 3e36271c297424f33b47727e478fbb75bdaa3ef6
Author: maobaolong <30...@qq.com>
AuthorDate: Thu Jun 4 07:06:04 2020 +0800

    HDDS-3653. Add documentation for Copy key command (#990)
---
 hadoop-hdds/docs/content/shell/KeyCommands.md    | 20 ++++++++++++++++++++
 hadoop-hdds/docs/content/shell/KeyCommands.zh.md | 22 +++++++++++++++++++++-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/hadoop-hdds/docs/content/shell/KeyCommands.md b/hadoop-hdds/docs/content/shell/KeyCommands.md
index 076035a..11186c4 100644
--- a/hadoop-hdds/docs/content/shell/KeyCommands.md
+++ b/hadoop-hdds/docs/content/shell/KeyCommands.md
@@ -31,6 +31,7 @@ Ozone shell supports the following key commands.
   * [list](#list)
   * [rename](#rename)
   * [cat](#cat)
+  * [copy](#cp)
 
 
 ### Get
@@ -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
+{{< /highlight >}}
+The above command will copy _sales.orc_ to _new\_one.orc_ in the bucket _/hive/jan_.
\ No newline at end of file
diff --git a/hadoop-hdds/docs/content/shell/KeyCommands.zh.md b/hadoop-hdds/docs/content/shell/KeyCommands.zh.md
index c53c344..2a36e73 100644
--- a/hadoop-hdds/docs/content/shell/KeyCommands.zh.md
+++ b/hadoop-hdds/docs/content/shell/KeyCommands.zh.md
@@ -30,6 +30,7 @@ Ozone shell 提供以下键命令:
   * [列举](#列举)
   * [重命名](#重命名)
   * [Cat](#cat)
+  * [Cp](#cp)
 
 
 ### 下载
@@ -153,4 +154,23 @@ ozone sh key rename /hive/jan sales.orc new_name.orc
 {{< highlight bash >}}
 ozone sh key cat /hive/jan/hello.txt
 {{< /highlight >}}
-上述命令会将 _/hive/jan_ 桶中的 hello.txt 的内容输出到标准输出中来。
\ No newline at end of file
+上述命令会将 _/hive/jan_ 桶中的 hello.txt 的内容输出到标准输出中来。
+
+### Cp
+
+`key cp` 命令用来在同一个bucket下,从一个key复制出另一个key。
+
+***Params:***
+
+| 参数名                          |  说明                                |
+|--------------------------------|-----------------------------------------|
+|  Uri                           | 桶名 格式为**/volume/bucket**。
+|  FromKey                       | 现有的键名
+|  ToKey                         | 新的键名
+| -r, \-\-replication            | 可选,上传后的副本数,合法值为 ONE 或者 THREE,如果不设置,将采用集群配置中的默认值。
+| -t, \-\-type                   | 可选,副本类型,合法值为 RATIS 或 STAND_ALONE,如果不设置,将采用集群配置中的默认值。
+
+{{< highlight bash >}}
+ozone sh key cp /hive/jan sales.orc new_one.orc
+{{< /highlight >}}
+上述命令会将  _/hive/jan_ 桶中的 _sales.orc_ 复制到 _new\_one.orc_ 。
\ No newline at end of file


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