difin commented on code in PR #6540:
URL: https://github.com/apache/hive/pull/6540#discussion_r3455009139
##########
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}"
+ for x in $(${HADOOP} classpath --glob 2>/dev/null | tr ':' '\n') ; do
+ case "$x" in
+ *slf4j-reload4j*|*slf4j-log4j12*|*log4j-1.2*|*reload4j*) continue ;;
+ esac
+ beelineClasspath="${beelineClasspath}:${x}"
Review Comment:
Entries already present in `beelineClasspath` due to the initial
`HADOOP_CLASSPATH` seed can be skipped when glob repeats them in order not to
add the same jar multiple times.
The deduplication can be done by adding this guard
```
if [[ ":${beelineClasspath}:" == *":${x}:"* ]] ; then
continue
fi
```
above this line:
`beelineClasspath="${beelineClasspath}:${x}"` is replaced with
--
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]