From 045c322b2c8e1080f1f02a9d11aa007a15be1fc5 Mon Sep 17 00:00:00 2001 From: Laura Schanno Date: Thu, 10 Sep 2026 09:24:43 -0400 Subject: [PATCH] Add HADOOP_CLIENT_LIB_DIR to accumulo-env.sh The accumulo-env.sh attempts to add Hadoop libraries to the classpath from the path $HADOOP_HOME/share/hadoop/client. There are times when Hadoop libraries are not installed in the tarball-style path, such as when Hadoop is installed via RPMs. Add the environment variable HADOOP_CLIENT_LIB_DIR to accumulo-env with a default value of $HADOOP_HOME/share/hadoop/client. Update the construction of the CLASSPATH to add hadoop libraries using the HADOOP_CLIENT_LIB_DIR variable. Closes #6530 --- assemble/conf/accumulo-env.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assemble/conf/accumulo-env.sh b/assemble/conf/accumulo-env.sh index 52f99ab7642..ded4b6c15f5 100644 --- a/assemble/conf/accumulo-env.sh +++ b/assemble/conf/accumulo-env.sh @@ -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}" @@ -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}/*" export CLASSPATH ##################################################################