diff --git a/hadoop-dist/src/main/compose/cblock/docker-compose.yaml b/hadoop-dist/src/main/compose/cblock/docker-compose.yaml index b88514ef57..fa4d267047 100644 --- a/hadoop-dist/src/main/compose/cblock/docker-compose.yaml +++ b/hadoop-dist/src/main/compose/cblock/docker-compose.yaml @@ -17,7 +17,7 @@ version: "3" services: namenode: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner hostname: namenode volumes: - ../..//hadoop-${VERSION}:/opt/hadoop @@ -29,38 +29,38 @@ services: - ./docker-config command: ["/opt/hadoop/bin/hdfs","namenode"] datanode: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9864 - command: ["/opt/hadoop/bin/oz","datanode"] + command: ["/opt/hadoop/bin/ozone","datanode"] env_file: - ./docker-config jscsi: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner ports: - 3260:3260 volumes: - ../..//hadoop-${VERSION}:/opt/hadoop env_file: - ./docker-config - command: ["/opt/hadoop/bin/oz","jscsi"] + command: ["/opt/hadoop/bin/ozone","jscsi"] cblock: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ../..//hadoop-${VERSION}:/opt/hadoop env_file: - ./docker-config - command: ["/opt/hadoop/bin/oz","cblockserver"] + command: ["/opt/hadoop/bin/ozone","cblockserver"] scm: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9876:9876 env_file: - ./docker-config - command: ["/opt/hadoop/bin/oz","scm"] + command: ["/opt/hadoop/bin/ozone","scm"] environment: ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION diff --git a/hadoop-dist/src/main/compose/ozone/docker-compose.yaml b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml index f2b263c755..13a7db6d83 100644 --- a/hadoop-dist/src/main/compose/ozone/docker-compose.yaml +++ b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml @@ -17,7 +17,7 @@ version: "3" services: namenode: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner hostname: namenode volumes: - ../..//hadoop-${VERSION}:/opt/hadoop @@ -29,16 +29,16 @@ services: - ./docker-config command: ["/opt/hadoop/bin/hdfs","namenode"] datanode: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9864 - command: ["/opt/hadoop/bin/oz","datanode"] + command: ["/opt/hadoop/bin/ozone","datanode"] env_file: - ./docker-config ksm: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ../..//hadoop-${VERSION}:/opt/hadoop ports: @@ -47,9 +47,9 @@ services: ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION env_file: - ./docker-config - command: ["/opt/hadoop/bin/oz","ksm"] + command: ["/opt/hadoop/bin/ozone","ksm"] scm: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ../..//hadoop-${VERSION}:/opt/hadoop ports: @@ -58,4 +58,4 @@ services: - ./docker-config environment: ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION - command: ["/opt/hadoop/bin/oz","scm"] + command: ["/opt/hadoop/bin/ozone","scm"] diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/StorageContainerManager.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/StorageContainerManager.java index 1a78deef41..ce0d4f89e7 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/StorageContainerManager.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/StorageContainerManager.java @@ -246,12 +246,12 @@ public String getName() { private static final String USAGE = - "Usage: \n oz scm [genericOptions] " + "Usage: \n ozone scm [genericOptions] " + "[ " + StartupOption.INIT.getName() + " [ " + StartupOption.CLUSTERID.getName() + " ] ]\n " - + "oz scm [genericOptions] [ " + + "ozone scm [genericOptions] [ " + StartupOption.GENCLUSTERID.getName() + " ]\n " + - "oz scm [ " + "ozone scm [ " + StartupOption.HELP.getName() + " ]\n"; /** * Creates a new StorageContainerManager. Configuration will be updated with diff --git a/hadoop-ozone/acceptance-test/src/test/compose/docker-compose.yaml b/hadoop-ozone/acceptance-test/src/test/compose/docker-compose.yaml index fb4e5d3f71..8350eae062 100644 --- a/hadoop-ozone/acceptance-test/src/test/compose/docker-compose.yaml +++ b/hadoop-ozone/acceptance-test/src/test/compose/docker-compose.yaml @@ -17,7 +17,7 @@ version: "3" services: namenode: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner hostname: namenode volumes: - ${HADOOPDIR}:/opt/hadoop @@ -29,16 +29,16 @@ services: - ./docker-config command: ["/opt/hadoop/bin/hdfs","namenode"] datanode: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ${HADOOPDIR}:/opt/hadoop ports: - 9864 - command: ["/opt/hadoop/bin/oz","datanode"] + command: ["/opt/hadoop/bin/ozone","datanode"] env_file: - ./docker-config ksm: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ${HADOOPDIR}:/opt/hadoop ports: @@ -47,9 +47,9 @@ services: ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION env_file: - ./docker-config - command: ["/opt/hadoop/bin/oz","ksm"] + command: ["/opt/hadoop/bin/ozone","ksm"] scm: - image: elek/hadoop-runner:o3-refactor + image: apache/hadoop-runner volumes: - ${HADOOPDIR}:/opt/hadoop ports: @@ -58,4 +58,4 @@ services: - ./docker-config environment: ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION - command: ["/opt/hadoop/bin/oz","scm"] + command: ["/opt/hadoop/bin/ozone","scm"] diff --git a/hadoop-ozone/acceptance-test/src/test/robotframework/acceptance/ozone.robot b/hadoop-ozone/acceptance-test/src/test/robotframework/acceptance/ozone.robot index 31ddf36453..ea9131ef32 100644 --- a/hadoop-ozone/acceptance-test/src/test/robotframework/acceptance/ozone.robot +++ b/hadoop-ozone/acceptance-test/src/test/robotframework/acceptance/ozone.robot @@ -32,7 +32,7 @@ Daemons are running without error Is daemon running without error datanode Check if datanode is connected to the scm - Wait Until Keyword Succeeds 2min 5sec Have healthy datanodes 1 + Wait Until Keyword Succeeds 3min 5sec Have healthy datanodes 1 Scale it up to 5 datanodes Scale datanodes up 5 @@ -48,15 +48,15 @@ Test rest interface ${result} = Execute on datanode curl -i -X DELETE ${COMMON_RESTHEADER} "http://localhost:9880/volume1" Should contain ${result} 200 OK -Test oz cli - Execute on datanode oz oz -createVolume http://localhost:9880/hive -user bilbo -quota 100TB -root - ${result} = Execute on datanode oz oz -listVolume http://localhost:9880/ -user bilbo | grep -v Removed | jq '.[] | select(.volumeName=="hive")' +Test ozone cli + Execute on datanode ozone oz -createVolume http://localhost:9880/hive -user bilbo -quota 100TB -root + ${result} = Execute on datanode ozone oz -listVolume http://localhost:9880/ -user bilbo | grep -v Removed | jq '.[] | select(.volumeName=="hive")' Should contain ${result} createdOn - Execute on datanode oz oz -createBucket http://localhost:9880/hive/bb1 - ${result} Execute on datanode oz oz -listBucket http://localhost:9880/hive/ | grep -v Removed | jq -r '.[] | select(.bucketName=="bb1") | .volumeName' + Execute on datanode ozone oz -createBucket http://localhost:9880/hive/bb1 + ${result} Execute on datanode ozone oz -listBucket http://localhost:9880/hive/ | grep -v Removed | jq -r '.[] | select(.bucketName=="bb1") | .volumeName' Should Be Equal ${result} hive - Execute on datanode oz oz -deleteBucket http://localhost:9880/hive/bb1 - Execute on datanode oz oz -deleteVolume http://localhost:9880/hive -user bilbo + Execute on datanode ozone oz -deleteBucket http://localhost:9880/hive/bb1 + Execute on datanode ozone oz -deleteVolume http://localhost:9880/hive -user bilbo @@ -67,7 +67,7 @@ Check webui static resources Should contain ${result} 200 Start freon testing - ${result} = Execute on ksm oz freon -numOfVolumes 5 -numOfBuckets 5 -numOfKeys 5 -numOfThreads 10 + ${result} = Execute on ksm ozone freon -numOfVolumes 5 -numOfBuckets 5 -numOfKeys 5 -numOfThreads 10 Wait Until Keyword Succeeds 3min 10sec Should contain ${result} Number of Keys added: 125 Should Not Contain ${result} ERROR diff --git a/hadoop-ozone/common/src/main/bin/oz b/hadoop-ozone/common/src/main/bin/ozone similarity index 96% rename from hadoop-ozone/common/src/main/bin/oz rename to hadoop-ozone/common/src/main/bin/ozone index 7841e7aadf..2f2c98c54f 100755 --- a/hadoop-ozone/common/src/main/bin/oz +++ b/hadoop-ozone/common/src/main/bin/ozone @@ -16,7 +16,7 @@ # limitations under the License. # The name of the script being executed. -HADOOP_SHELL_EXECNAME="oz" +HADOOP_SHELL_EXECNAME="ozone" MYNAME="${BASH_SOURCE-$0}" ## @description build up the hdfs command's usage text. @@ -98,13 +98,13 @@ function ozonecmd_case exit 0 ;; freon) - HADOOP_CLASSNAME=org.apache.hadoop.ozone.tools.Freon + HADOOP_CLASSNAME=org.apache.hadoop.ozone.freon.Freon ;; genesis) HADOOP_CLASSNAME=org.apache.hadoop.ozone.genesis.Genesis ;; getozoneconf) - HADOOP_CLASSNAME=org.apache.hadoop.ozone.tools.OzoneGetConf + HADOOP_CLASSNAME=org.apache.hadoop.ozone.freon.OzoneGetConf; ;; jscsi) HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true" @@ -192,7 +192,7 @@ fi hadoop_add_client_opts if [[ ${HADOOP_WORKER_MODE} = true ]]; then - hadoop_common_worker_mode_execute "${HADOOP_HDFS_HOME}/bin/oz" "${HADOOP_USER_PARAMS[@]}" + hadoop_common_worker_mode_execute "${HADOOP_HDFS_HOME}/bin/ozone" "${HADOOP_USER_PARAMS[@]}" exit $? fi diff --git a/hadoop-ozone/common/src/main/bin/start-ozone.sh b/hadoop-ozone/common/src/main/bin/start-ozone.sh index aabbab243d..dda0a1c173 100644 --- a/hadoop-ozone/common/src/main/bin/start-ozone.sh +++ b/hadoop-ozone/common/src/main/bin/start-ozone.sh @@ -47,8 +47,8 @@ else exit 1 fi -SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-) -SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-) +SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-) +SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-) if [[ ${SECURITY_ENABLED} == "kerberos" || ${SECURITY_AUTHORIZATION_ENABLED} == "true" ]]; then echo "Ozone is not supported in a security enabled cluster." @@ -57,7 +57,7 @@ fi #--------------------------------------------------------- # Check if ozone is enabled -OZONE_ENABLED=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -confKey ozone.enabled | tr '[:upper:]' '[:lower:]' 2>&-) +OZONE_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey ozone.enabled | tr '[:upper:]' '[:lower:]' 2>&-) if [[ "${OZONE_ENABLED}" != "true" ]]; then echo "Operation is not supported because ozone is not enabled." exit -1 @@ -74,13 +74,13 @@ fi #--------------------------------------------------------- # Ozone keyspacemanager nodes -KSM_NODES=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -keyspacemanagers 2>/dev/null) +KSM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -keyspacemanagers 2>/dev/null) echo "Starting key space manager nodes [${KSM_NODES}]" if [[ "${KSM_NODES}" == "0.0.0.0" ]]; then KSM_NODES=$(hostname) fi -hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/oz" \ +hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/ozone" \ --workers \ --config "${HADOOP_CONF_DIR}" \ --hostnames "${KSM_NODES}" \ @@ -91,9 +91,9 @@ HADOOP_JUMBO_RETCOUNTER=$? #--------------------------------------------------------- # Ozone storagecontainermanager nodes -SCM_NODES=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -storagecontainermanagers 2>/dev/null) +SCM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -storagecontainermanagers 2>/dev/null) echo "Starting storage container manager nodes [${SCM_NODES}]" -hadoop_uservar_su hdfs scm "${HADOOP_HDFS_HOME}/bin/oz" \ +hadoop_uservar_su hdfs scm "${HADOOP_HDFS_HOME}/bin/ozone" \ --workers \ --config "${HADOOP_CONF_DIR}" \ --hostnames "${SCM_NODES}" \ diff --git a/hadoop-ozone/common/src/main/bin/stop-ozone.sh b/hadoop-ozone/common/src/main/bin/stop-ozone.sh index fb6ada1476..be55be4e97 100644 --- a/hadoop-ozone/common/src/main/bin/stop-ozone.sh +++ b/hadoop-ozone/common/src/main/bin/stop-ozone.sh @@ -47,8 +47,8 @@ else exit 1 fi -SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-) -SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-) +SECURITY_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey hadoop.security.authentication | tr '[:upper:]' '[:lower:]' 2>&-) +SECURITY_AUTHORIZATION_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey hadoop.security.authorization | tr '[:upper:]' '[:lower:]' 2>&-) if [[ ${SECURITY_ENABLED} == "kerberos" || ${SECURITY_AUTHORIZATION_ENABLED} == "true" ]]; then echo "Ozone is not supported in a security enabled cluster." @@ -57,7 +57,7 @@ fi #--------------------------------------------------------- # Check if ozone is enabled -OZONE_ENABLED=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -confKey ozone.enabled | tr '[:upper:]' '[:lower:]' 2>&-) +OZONE_ENABLED=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -confKey ozone.enabled | tr '[:upper:]' '[:lower:]' 2>&-) if [[ "${OZONE_ENABLED}" != "true" ]]; then echo "Operation is not supported because ozone is not enabled." exit -1 @@ -74,13 +74,13 @@ fi #--------------------------------------------------------- # Ozone keyspacemanager nodes -KSM_NODES=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -keyspacemanagers 2>/dev/null) +KSM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -keyspacemanagers 2>/dev/null) echo "Stopping key space manager nodes [${KSM_NODES}]" if [[ "${KSM_NODES}" == "0.0.0.0" ]]; then KSM_NODES=$(hostname) fi -hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/oz" \ +hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/ozone" \ --workers \ --config "${HADOOP_CONF_DIR}" \ --hostnames "${KSM_NODES}" \ @@ -89,9 +89,9 @@ hadoop_uservar_su hdfs ksm "${HADOOP_HDFS_HOME}/bin/oz" \ #--------------------------------------------------------- # Ozone storagecontainermanager nodes -SCM_NODES=$("${HADOOP_HDFS_HOME}/bin/oz" getozoneconf -storagecontainermanagers 2>/dev/null) +SCM_NODES=$("${HADOOP_HDFS_HOME}/bin/ozone" getozoneconf -storagecontainermanagers 2>/dev/null) echo "Stopping storage container manager nodes [${SCM_NODES}]" -hadoop_uservar_su hdfs scm "${HADOOP_HDFS_HOME}/bin/oz" \ +hadoop_uservar_su hdfs scm "${HADOOP_HDFS_HOME}/bin/ozone" \ --workers \ --config "${HADOOP_CONF_DIR}" \ --hostnames "${SCM_NODES}" \ diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java index e43cada46a..0fef77cc96 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/freon/OzoneGetConf.java @@ -43,7 +43,7 @@ */ public class OzoneGetConf extends Configured implements Tool { - private static final String DESCRIPTION = "oz getconf is utility for " + private static final String DESCRIPTION = "ozone getconf is utility for " + "getting configuration information from the config file.\n"; enum Command { @@ -102,7 +102,7 @@ public static OzoneGetConf.CommandHandler getHandler(String cmd) { /* Initialize USAGE based on Command values */ StringBuilder usage = new StringBuilder(DESCRIPTION); - usage.append("\noz getconf \n"); + usage.append("\nozone getconf \n"); for (OzoneGetConf.Command cmd : OzoneGetConf.Command.values()) { usage.append("\t[" + cmd.getUsage() + "]\t\t\t" + cmd.getDescription() + "\n"); diff --git a/hadoop-ozone/common/src/main/shellprofile.d/hadoop-ozone.sh b/hadoop-ozone/common/src/main/shellprofile.d/hadoop-ozone.sh index 0b7a5a71c6..c016165b1e 100644 --- a/hadoop-ozone/common/src/main/shellprofile.d/hadoop-ozone.sh +++ b/hadoop-ozone/common/src/main/shellprofile.d/hadoop-ozone.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -if [[ "${HADOOP_SHELL_EXECNAME}" = oz ]]; then +if [[ "${HADOOP_SHELL_EXECNAME}" = ozone ]]; then hadoop_add_profile ozone fi diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java index 39ef396378..e9acb35ca8 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java @@ -106,8 +106,8 @@ public final class KeySpaceManager extends ServiceRuntimeInfoImpl LoggerFactory.getLogger(KeySpaceManager.class); private static final String USAGE = - "Usage: \n oz ksm [genericOptions] " + "[ " - + StartupOption.CREATEOBJECTSTORE.getName() + " ]\n " + "oz ksm [ " + "Usage: \n ozone ksm [genericOptions] " + "[ " + + StartupOption.CREATEOBJECTSTORE.getName() + " ]\n " + "ozone ksm [ " + StartupOption.HELP.getName() + " ]\n"; /** Startup options. */ diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/Shell.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/Shell.java index 8553255d19..2aec0fc035 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/Shell.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/Shell.java @@ -193,25 +193,25 @@ private void addVolumeCommands(Options options) { Option createVolume = new Option(CREATE_VOLUME, true, "creates a volume" + - "for the specified user.\n \t For example : hdfs oz -createVolume " + + "for the specified user.\n \t For example : hdfs o3 -createVolume " + " -root -user \n"); options.addOption(createVolume); Option deleteVolume = new Option(DELETE_VOLUME, true, "deletes a volume" + - "if it is empty.\n \t For example : hdfs oz -deleteVolume " + + "if it is empty.\n \t For example : ozone oz -deleteVolume " + " -root \n"); options.addOption(deleteVolume); Option listVolume = new Option(LIST_VOLUME, true, "List the volumes of a given user.\n" + - "For example : hdfs oz -listVolume " + - "-user -root or hdfs oz " + + "For example : ozone oz -listVolume " + + "-user -root or ozone oz " + "-listVolume"); options.addOption(listVolume); Option updateVolume = new Option(UPDATE_VOLUME, true, "updates an existing volume.\n" + - "\t For example : hdfs oz " + + "\t For example : ozone oz " + "-updateVolume -quota " + "100TB\n"); options.addOption(updateVolume); @@ -230,7 +230,7 @@ private void addVolumeCommands(Options options) { private void addBucketCommands(Options opts) { Option createBucket = new Option(CREATE_BUCKET, true, "creates a bucket in a given volume." + - "For example: hdfs oz -createBucket "); + "For example: ozone oz -createBucket "); opts.addOption(createBucket); Option infoBucket = @@ -247,7 +247,7 @@ private void addBucketCommands(Options opts) { Option updateBucket = new Option(UPDATE_BUCKET, true, "allows changing bucket attributes.\n" + - " For example: hdfs oz -updateBucket " + + " For example: ozone oz -updateBucket " + "-addAcl user:frodo:rw"); opts.addOption(updateBucket); @@ -396,7 +396,7 @@ private int dispatch(CommandLine cmd, Options opts) return 0; } else { HelpFormatter helpFormatter = new HelpFormatter(); - helpFormatter.printHelp(eightyColumn, "hdfs oz -command uri [args]", + helpFormatter.printHelp(eightyColumn, "ozone oz -command uri [args]", "Ozone Commands", opts, "Please correct your command and try again."); return 1; diff --git a/hadoop-ozone/ozone-manager/src/main/site/markdown/OzoneCommandShell.md b/hadoop-ozone/ozone-manager/src/main/site/markdown/OzoneCommandShell.md index 9df974fda8..a274a22fb0 100644 --- a/hadoop-ozone/ozone-manager/src/main/site/markdown/OzoneCommandShell.md +++ b/hadoop-ozone/ozone-manager/src/main/site/markdown/OzoneCommandShell.md @@ -21,14 +21,14 @@ with simple authentication. The Ozone commands take the following format. -* `hdfs oz --command_ http://hostname:port/volume/bucket/key -user +* `ozone oz --command_ http://hostname:port/volume/bucket/key -user -root` The *port* specified in command should match the port mentioned in the config property `dfs.datanode.http.address`. This property can be set in `hdfs-site.xml`. The default value for the port is `9864` and is used in below commands. -The *--root* option is a command line short cut that allows *hdfs oz* +The *--root* option is a command line short cut that allows *ozone oz* commands to be run as the user that started the cluster. This is useful to indicate that you want the commands to be run as some admin user. The only reason for this option is that it makes the life of a lazy developer more @@ -44,7 +44,7 @@ ozone cluster. Volumes can be created only by Admins. Here is an example of creating a volume. -* `hdfs oz -createVolume http://localhost:9864/hive -user bilbo -quota +* `ozone oz -createVolume http://localhost:9864/hive -user bilbo -quota 100TB -root` The above command creates a volume called `hive` owned by user `bilbo`. The @@ -55,26 +55,26 @@ admin in the cluster. Updates information like ownership and quota on an existing volume. -* `hdfs oz -updateVolume http://localhost:9864/hive -quota 500TB -root` +* `ozone oz -updateVolume http://localhost:9864/hive -quota 500TB -root` The above command changes the volume quota of hive from 100TB to 500TB. ### Delete Volume Deletes a Volume if it is empty. -* `hdfs oz -deleteVolume http://localhost:9864/hive -root` +* `ozone oz -deleteVolume http://localhost:9864/hive -root` ### Info Volume Info volume command allows the owner or the administrator of the cluster to read meta-data about a specific volume. -* `hdfs oz -infoVolume http://localhost:9864/hive -root` +* `ozone oz -infoVolume http://localhost:9864/hive -root` ### List Volumes List volume command can be used by administrator to list volumes of any user. It can also be used by a user to list volumes owned by him. -* `hdfs oz -listVolume http://localhost:9864/ -user bilbo -root` +* `ozone oz -listVolume http://localhost:9864/ -user bilbo -root` The above command lists all volumes owned by user bilbo. @@ -89,7 +89,7 @@ Following examples assume that these commands are run by the owner of the volume Create bucket call allows the owner of a volume to create a bucket. -* `hdfs oz -createBucket http://localhost:9864/hive/january` +* `ozone oz -createBucket http://localhost:9864/hive/january` This call creates a bucket called `january` in the volume called `hive`. If the volume does not exist, then this call will fail. @@ -98,23 +98,23 @@ the volume does not exist, then this call will fail. ### Update Bucket Updates bucket meta-data, like ACLs. -* `hdfs oz -updateBucket http://localhost:9864/hive/january -addAcl +* `ozone oz -updateBucket http://localhost:9864/hive/january -addAcl user:spark:rw` ### Delete Bucket Deletes a bucket if it is empty. -* `hdfs oz -deleteBucket http://localhost:9864/hive/january` +* `ozone oz -deleteBucket http://localhost:9864/hive/january` ### Info Bucket Returns information about a given bucket. -* `hdfs oz -infoBucket http://localhost:9864/hive/january` +* `ozone oz -infoBucket http://localhost:9864/hive/january` ### List Buckets List buckets on a given volume. -* `hdfs oz -listBucket http://localhost:9864/hive` +* `ozone oz -listBucket http://localhost:9864/hive` Ozone Key Commands ------------------ @@ -125,26 +125,26 @@ Ozone key commands allows users to put, delete and get keys from ozone buckets. Creates or overwrites a key in ozone store, -file points to the file you want to upload. -* `hdfs oz -putKey http://localhost:9864/hive/january/processed.orc -file +* `ozone oz -putKey http://localhost:9864/hive/january/processed.orc -file processed.orc` ### Get Key Downloads a file from the ozone bucket. -* `hdfs oz -getKey http://localhost:9864/hive/january/processed.orc -file +* `ozone oz -getKey http://localhost:9864/hive/january/processed.orc -file processed.orc.copy` ### Delete Key Deletes a key from the ozone store. -* `hdfs oz -deleteKey http://localhost:9864/hive/january/processed.orc` +* `ozone oz -deleteKey http://localhost:9864/hive/january/processed.orc` ### Info Key Reads key metadata from the ozone store. -* `hdfs oz -infoKey http://localhost:9864/hive/january/processed.orc` +* `ozone oz -infoKey http://localhost:9864/hive/january/processed.orc` ### List Keys List all keys in an ozone bucket. -* `hdfs oz -listKey http://localhost:9864/hive/january` +* `ozone oz -listKey http://localhost:9864/hive/january`