Skip to content

Commit b66142e

Browse files
committed
[ZEPPELIN-6150] zeppelin.sh shall respect HADOOP_HOME to find hadoop command
### What is this PR for? Obviously, `*_HOME` should be respected if they are present, otherwise fallback to find the command in `PATH`. ### What type of PR is it? Improvement ### What is the Jira issue? ZEPPELIN-6150 ### How should this be tested? Manually tested on a dev env, there are multiple Hadoop clients installed in one machine, and `hadoop` is not available in `PATH`, now I can set `HADOOP_HOME` to allow Zeppelin start. ### Screenshots (if appropriate) ### Questions: * Does the license files need to update? no * Is there breaking changes for older versions? might be * Does this needs documentation? no Closes #4899 from pan3793/ZEPPELIN-6150. Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit d21e362) Signed-off-by: Cheng Pan <[email protected]>
1 parent 36a8dda commit b66142e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/zeppelin.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ if [[ "${USE_HADOOP}" != "false" ]]; then
121121
echo "Please specify HADOOP_CONF_DIR if USE_HADOOP is true"
122122
else
123123
ZEPPELIN_CLASSPATH+=":${HADOOP_CONF_DIR}"
124-
if ! [ -x "$(command -v hadoop)" ]; then
124+
if [ -n "${HADOOP_HOME}" ]; then
125+
ZEPPELIN_CLASSPATH+=":`${HADOOP_HOME}/bin/hadoop classpath`"
126+
elif ! [ -x "$(command -v hadoop)" ]; then
125127
echo 'hadoop command is not in PATH when HADOOP_CONF_DIR is specified.'
126128
else
127129
ZEPPELIN_CLASSPATH+=":`hadoop classpath`"

0 commit comments

Comments
 (0)