Skip to content

Commit

Permalink
[ZEPPELIN-6150] zeppelin.sh shall respect HADOOP_HOME to find `hado…
Browse files Browse the repository at this point in the history
…op` 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]>
  • Loading branch information
pan3793 authored Nov 15, 2024
1 parent 0a7f861 commit d21e362
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/zeppelin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ if [[ "${USE_HADOOP}" != "false" ]]; then
echo "Please specify HADOOP_CONF_DIR if USE_HADOOP is true"
else
ZEPPELIN_CLASSPATH+=":${HADOOP_CONF_DIR}"
if ! [ -x "$(command -v hadoop)" ]; then
if [ -n "${HADOOP_HOME}" ]; then
ZEPPELIN_CLASSPATH+=":`${HADOOP_HOME}/bin/hadoop classpath`"
elif ! [ -x "$(command -v hadoop)" ]; then
echo 'hadoop command is not in PATH when HADOOP_CONF_DIR is specified.'
else
ZEPPELIN_CLASSPATH+=":`hadoop classpath`"
Expand Down

0 comments on commit d21e362

Please sign in to comment.