difin commented on code in PR #6540:
URL: https://github.com/apache/hive/pull/6540#discussion_r3454600120
##########
bin/ext/beeline.sh:
##########
@@ -32,11 +32,35 @@ beeline () {
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS
-Dlog4j.configurationFile=beeline-log4j2.properties --add-opens
java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.util=ALL-UNNAMED --add-opens
java.base/java.util.concurrent=ALL-UNNAMED --add-opens
java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens
java.base/java.util.regex=ALL-UNNAMED --add-opens
java.base/java.lang.reflect=ALL-UNNAMED --add-opens
java.base/java.io=ALL-UNNAMED "
if [ "$EXECUTE_WITH_JAVA" != "true" ] ; then
+ if [ "$BEELINE_USE_HADOOP_JAR" == "true" ] ; then
+ if [ -z $CLIUSER ] ; then
+ exec $HADOOP jar ${beelineJarPath} $CLASS $HIVE_OPTS "$@"
+ else
+ exec $HADOOP jar ${beelineJarPath} $CLASS $HIVE_OPTS "$@" -n
"${CLIUSER}" -p "${CLIUSER}"
+ fi
+ fi
+ beelineClasspath="${HADOOP_CLASSPATH}"
Review Comment:
`beelineClasspath` is initialized from `HADOOP_CLASSPATH` and then we append
everything from `hadoop classpath --glob`. That command already includes
`HADOOP_CLASSPATH` (we export it on line 31 before this runs), so the Hive side
of the classpath ends up on there twice — all of `HIVE_LIB`, conf,
`beeline/jline/super-csv`, etc.
I'd start with `beelineClasspath=""` and build it only from the filtered
`hadoop classpath --glob` output. Same effective classpath, just without the
duplication. Maybe keep a fallback to `HADOOP_CLASSPATH` if `hadoop classpath
--glob` fails or comes back empty (`2>/dev/null` hides errors today).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]