HDDS-301. ozone command shell does not contain subcommand to run ozoneFS commands. Contributed by Nilotpal Nandi.
This commit is contained in:
parent
900c0e114f
commit
6ed8593d18
|
@ -600,6 +600,7 @@ function hadoop_bootstrap
|
||||||
HDDS_LIB_JARS_DIR=${HDDS_LIB_JARS_DIR:-"share/hadoop/hdds/lib"}
|
HDDS_LIB_JARS_DIR=${HDDS_LIB_JARS_DIR:-"share/hadoop/hdds/lib"}
|
||||||
OZONE_DIR=${OZONE_DIR:-"share/hadoop/ozone"}
|
OZONE_DIR=${OZONE_DIR:-"share/hadoop/ozone"}
|
||||||
OZONE_LIB_JARS_DIR=${OZONE_LIB_JARS_DIR:-"share/hadoop/ozone/lib"}
|
OZONE_LIB_JARS_DIR=${OZONE_LIB_JARS_DIR:-"share/hadoop/ozone/lib"}
|
||||||
|
OZONEFS_DIR=${OZONEFS_DIR:-"share/hadoop/ozonefs"}
|
||||||
|
|
||||||
HADOOP_TOOLS_HOME=${HADOOP_TOOLS_HOME:-${HADOOP_HOME}}
|
HADOOP_TOOLS_HOME=${HADOOP_TOOLS_HOME:-${HADOOP_HOME}}
|
||||||
HADOOP_TOOLS_DIR=${HADOOP_TOOLS_DIR:-"share/hadoop/tools"}
|
HADOOP_TOOLS_DIR=${HADOOP_TOOLS_DIR:-"share/hadoop/tools"}
|
||||||
|
|
|
@ -31,9 +31,9 @@ Create volume and bucket
|
||||||
Execute on datanode ozone oz -createBucket http://ozoneManager/fstest/bucket1
|
Execute on datanode ozone oz -createBucket http://ozoneManager/fstest/bucket1
|
||||||
|
|
||||||
Check volume from ozonefs
|
Check volume from ozonefs
|
||||||
${result} = Execute on hadooplast hdfs dfs -ls o3://bucket1.fstest/
|
${result} = Execute on datanode ozone fs -ls o3://bucket1.fstest/
|
||||||
|
|
||||||
Create directory from ozonefs
|
Create directory from ozonefs
|
||||||
Execute on hadooplast hdfs dfs -mkdir -p o3://bucket1.fstest/testdir/deep
|
Execute on datanode ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep
|
||||||
${result} = Execute on ozoneManager ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
|
${result} = Execute on ozoneManager ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
|
||||||
Should contain ${result} testdir/deep
|
Should contain ${result} testdir/deep
|
||||||
|
|
|
@ -31,10 +31,10 @@ Create volume and bucket
|
||||||
Execute on datanode ozone oz -createBucket http://ozoneManager/fstest/bucket1
|
Execute on datanode ozone oz -createBucket http://ozoneManager/fstest/bucket1
|
||||||
|
|
||||||
Check volume from ozonefs
|
Check volume from ozonefs
|
||||||
${result} = Execute on hadooplast hdfs dfs -ls o3://bucket1.fstest/
|
${result} = Execute on datanode ozone fs -ls o3://bucket1.fstest/
|
||||||
|
|
||||||
Create directory from ozonefs
|
Create directory from ozonefs
|
||||||
Execute on hadooplast hdfs dfs -mkdir -p o3://bucket1.fstest/testdir/deep
|
Execute on datanode ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep
|
||||||
${result} = Execute on ozoneManager ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
|
${result} = Execute on ozoneManager ozone oz -listKey o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName'
|
||||||
Should contain ${result} testdir/deep
|
Should contain ${result} testdir/deep
|
||||||
Test key handling
|
Test key handling
|
||||||
|
|
|
@ -34,6 +34,7 @@ function hadoop_usage
|
||||||
|
|
||||||
|
|
||||||
hadoop_add_subcommand "classpath" client "prints the class path needed to get the hadoop jar and the required libraries"
|
hadoop_add_subcommand "classpath" client "prints the class path needed to get the hadoop jar and the required libraries"
|
||||||
|
hadoop_add_subcommand "fs" client "run a filesystem command on ozone file system"
|
||||||
hadoop_add_subcommand "datanode" daemon "run a HDDS datanode"
|
hadoop_add_subcommand "datanode" daemon "run a HDDS datanode"
|
||||||
hadoop_add_subcommand "envvars" client "display computed Hadoop environment variables"
|
hadoop_add_subcommand "envvars" client "display computed Hadoop environment variables"
|
||||||
hadoop_add_subcommand "freon" client "runs an ozone data generator"
|
hadoop_add_subcommand "freon" client "runs an ozone data generator"
|
||||||
|
@ -109,6 +110,9 @@ function ozonecmd_case
|
||||||
hadoop_debug "Appending HDFS_STORAGECONTAINERMANAGER_OPTS onto HADOOP_OPTS"
|
hadoop_debug "Appending HDFS_STORAGECONTAINERMANAGER_OPTS onto HADOOP_OPTS"
|
||||||
HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_STORAGECONTAINERMANAGER_OPTS}"
|
HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_STORAGECONTAINERMANAGER_OPTS}"
|
||||||
;;
|
;;
|
||||||
|
fs)
|
||||||
|
HADOOP_CLASSNAME=org.apache.hadoop.fs.FsShell
|
||||||
|
;;
|
||||||
scmcli)
|
scmcli)
|
||||||
HADOOP_CLASSNAME=org.apache.hadoop.ozone.scm.cli.SCMCLI
|
HADOOP_CLASSNAME=org.apache.hadoop.ozone.scm.cli.SCMCLI
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -40,5 +40,6 @@ function _ozone_hadoop_classpath
|
||||||
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${HDDS_DIR}"'/*'
|
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${HDDS_DIR}"'/*'
|
||||||
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${OZONE_LIB_JARS_DIR}"'/*'
|
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${OZONE_LIB_JARS_DIR}"'/*'
|
||||||
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${OZONE_DIR}"'/*'
|
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${OZONE_DIR}"'/*'
|
||||||
|
hadoop_add_classpath "${HADOOP_HDFS_HOME}/${OZONEFS_DIR}"'/*'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue