HDDS-631. Ozone classpath shell command is not working. Contributed by Elek, Marton.

This commit is contained in:
Márton Elek 2019-02-01 14:40:23 +01:00
parent 9f2da01591
commit 194f0b49fb

View File

@ -69,7 +69,20 @@ function ozonecmd_case
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
;;
classpath)
hadoop_do_classpath_subcommand HADOOP_CLASSNAME "$@"
if [[ "$#" -gt 0 ]]; then
OZONE_RUN_ARTIFACT_NAME="$1"
HADOOP_CLASSNAME="org.apache.hadoop.util.Classpath"
#remove the artifact name and replace it with glob
# (We need at least one argument to execute the Classpath helper class)
HADOOP_SUBCMD_ARGS[0]="--glob"
else
hadoop_finalize
echo "Usage: ozone classpath <ARTIFACTNAME>"
echo "Where the artifact name is one of:"
echo ""
ls -1 ${HADOOP_HDFS_HOME}/share/ozone/classpath/ | sed 's/.classpath//'
exit -1
fi
;;
datanode)
HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"