Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion assemble/conf/accumulo-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ ACCUMULO_LOG_DIR="${ACCUMULO_LOG_DIR:-${basedir}/logs}"
HADOOP_HOME="${HADOOP_HOME:-/path/to/hadoop}"
## Hadoop configuration
HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-${HADOOP_HOME}/etc/hadoop}"
## Hadoop client jars location.
HADOOP_CLIENT_LIB_DIR="${HADOOP_CLIENT_LIB_DIR:-${HADOOP_HOME}/share/hadoop/client}"
## Zookeeper installation
ZOOKEEPER_HOME="${ZOOKEEPER_HOME:-/path/to/zookeeper}"

Expand Down Expand Up @@ -64,7 +66,7 @@ fi
ZK_JARS=$(find "$ZOOKEEPER_HOME/lib/" -maxdepth 1 -name '*.jar' -not -name '*slf4j*' -not -name '*log4j*' | paste -sd: -)
# lib is set by calling script that sources this env file
#shellcheck disable=SC2154
CLASSPATH="${CLASSPATH}:${lib}/*:${HADOOP_CONF_DIR}:${ZOOKEEPER_HOME}/*:${ZK_JARS}:${HADOOP_HOME}/share/hadoop/client/*"
CLASSPATH="${CLASSPATH}:${lib}/*:${HADOOP_CONF_DIR}:${ZOOKEEPER_HOME}/*:${ZK_JARS}:${HADOOP_CLIENT_LIB_DIR}/*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at lines starting at 58, the intention is to honor the CLASSPATH environment variable set by the user and put that first.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not circumnavigate that intention.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After re-reading this, I think you were trying to tell me (correct me if I'm wrong) that I could configure the CLASSPATH variable beforehand to point to a custom hadoop lib directory. While this is true, I do think there is still some value to extracting the partially hardcoded path to a customizable variable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After re-reading this, I think you were trying to tell me (correct me if I'm wrong) that I could configure the CLASSPATH variable beforehand to point to a custom hadoop lib directory.

Yes, that's correct. For 4.0 this is the preferred method.

While this is true, I do think there is still some value to extracting the partially hardcoded path to a customizable variable.

I agree that the default directory may not be correct for users. But in my opinion I think making another variable that users can override might make it confusing for users because now they have several options, instead of one, for configuring the classpath (and the CLASSPATH variable is the well known standard).

Users that were taking advantage of prior classloading capabilities (VFS, lib/ext reloading, etc.) will need to change their configurations as those things have been removed.

export CLASSPATH

##################################################################
Expand Down