HDDS-2098 : Ozone shell command prints out ERROR when the log4j file … (#1411)
This commit is contained in:
parent
292bce7908
commit
4f67081038
@ -69,6 +69,12 @@ function ozonecmd_case
|
|||||||
subcmd=$1
|
subcmd=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
ozone_default_log4j="${HADOOP_CONF_DIR}/log4j.properties"
|
||||||
|
ozone_shell_log4j="${HADOOP_CONF_DIR}/ozone-shell-log4j.properties"
|
||||||
|
if [ ! -f "${ozone_shell_log4j}" ]; then
|
||||||
|
ozone_shell_log4j=${ozone_default_log4j}
|
||||||
|
fi
|
||||||
|
|
||||||
case ${subcmd} in
|
case ${subcmd} in
|
||||||
auditparser)
|
auditparser)
|
||||||
HADOOP_CLASSNAME=org.apache.hadoop.ozone.audit.parser.AuditParser
|
HADOOP_CLASSNAME=org.apache.hadoop.ozone.audit.parser.AuditParser
|
||||||
@ -118,7 +124,7 @@ function ozonecmd_case
|
|||||||
;;
|
;;
|
||||||
freon)
|
freon)
|
||||||
HADOOP_CLASSNAME=org.apache.hadoop.ozone.freon.Freon
|
HADOOP_CLASSNAME=org.apache.hadoop.ozone.freon.Freon
|
||||||
OZONE_FREON_OPTS="${OZONE_FREON_OPTS} -Dhadoop.log.file=ozone-freon.log -Dlog4j.configuration=file:${HADOOP_CONF_DIR}/ozone-shell-log4j.properties"
|
OZONE_FREON_OPTS="${OZONE_FREON_OPTS} -Dhadoop.log.file=ozone-freon.log -Dlog4j.configuration=file:${ozone_shell_log4j}"
|
||||||
HADOOP_OPTS="${HADOOP_OPTS} ${OZONE_FREON_OPTS}"
|
HADOOP_OPTS="${HADOOP_OPTS} ${OZONE_FREON_OPTS}"
|
||||||
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
|
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-tools"
|
||||||
;;
|
;;
|
||||||
@ -139,7 +145,8 @@ function ozonecmd_case
|
|||||||
;;
|
;;
|
||||||
sh | shell)
|
sh | shell)
|
||||||
HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.OzoneShell
|
HADOOP_CLASSNAME=org.apache.hadoop.ozone.web.ozShell.OzoneShell
|
||||||
HDFS_OM_SH_OPTS="${HDFS_OM_SH_OPTS} -Dhadoop.log.file=ozone-shell.log -Dlog4j.configuration=file:${HADOOP_CONF_DIR}/ozone-shell-log4j.properties"
|
HDFS_OM_SH_OPTS="${HDFS_OM_SH_OPTS} -Dhadoop.log.file=ozone-shell.log
|
||||||
|
-Dlog4j.configuration=file:${ozone_shell_log4j}"
|
||||||
HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_OM_SH_OPTS}"
|
HADOOP_OPTS="${HADOOP_OPTS} ${HDFS_OM_SH_OPTS}"
|
||||||
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-ozone-manager"
|
OZONE_RUN_ARTIFACT_NAME="hadoop-ozone-ozone-manager"
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user