File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
hadoop-common-project/hadoop-common/src/main/bin Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1921,6 +1921,22 @@ function hadoop_start_secure_daemon
19211921 exit 1
19221922 fi
19231923
1924+ if [[ -z " ${HADOOP_DAEMON_JSVC_EXTRA_OPTS} " ]]; then
1925+ # If HADOOP_DAEMON_JSVC_EXTRA_OPTS is not set
1926+ if ${jsvc} -help | grep -q " \-cwd" ; then
1927+ # Check if jsvc -help has entry for option -cwd
1928+ hadoop_debug " Your jsvc supports -cwd option." \
1929+ " Adding option '-cwd .'. See HADOOP-16276 for details."
1930+ HADOOP_DAEMON_JSVC_EXTRA_OPTS=" -cwd ."
1931+ else
1932+ hadoop_debug " Your jsvc doesn't support -cwd option." \
1933+ " No need to add option '-cwd .'. See HADOOP-16276 for details."
1934+ fi
1935+ else
1936+ hadoop_debug " HADOOP_DAEMON_JSVC_EXTRA_OPTS is set." \
1937+ " Ignoring jsvc -cwd option detection and addition."
1938+ fi
1939+
19241940 # note that shellcheck will throw a
19251941 # bogus for-our-use-case 2086 here.
19261942 # it doesn't properly support multi-line situations
You can’t perform that action at this time.
0 commit comments