This is an automated email from the ASF dual-hosted git repository.

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 8eb57a992 IMPALA-13719: Fix failure in launching Hive on Ranger 2.5
8eb57a992 is described below

commit 8eb57a9921ed6d0ffccb98932d50506fede24fa9
Author: stiga-huang <[email protected]>
AuthorDate: Fri Jan 31 11:24:44 2025 +0800

    IMPALA-13719: Fix failure in launching Hive on Ranger 2.5
    
    Ranger 2.5 starts to use Guava provided by Hadoop. This patch adds
    hadoop-shaded-guava-*.jar in the CLASSPATH when launching Hive Metastore
    and Hive Server with Ranger authorization enabled.
    
    Tests:
     - Verified in a private build with Ranger 2.5
     - Verified in the master branch with Ranger 2.4
    
    Change-Id: I10fb8a54801a18834ea97410543c1bce594583e7
    Reviewed-on: http://gerrit.cloudera.org:8080/22430
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 testdata/bin/run-hive-server.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testdata/bin/run-hive-server.sh b/testdata/bin/run-hive-server.sh
index dccf4e6a2..b4970e0da 100755
--- a/testdata/bin/run-hive-server.sh
+++ b/testdata/bin/run-hive-server.sh
@@ -127,6 +127,10 @@ if [[ $ENABLE_RANGER_AUTH -eq 1 ]]; then
   # The following jar is needed by RangerRESTUtils.java.
   export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:\
       ${RANGER_HOME}/ews/webapp/WEB-INF/lib/gethostname4j-*.jar"
+  # RANGER-4845: Starts from Ranger-2.5, ranger uses guava included in hadoop.
+  # This jar file doesn't exist for Ranger 2.4 and previous versions.
+  export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:\
+      ${RANGER_HOME}/ews/webapp/WEB-INF/lib/hadoop-shaded-guava-*.jar"
 fi
 
 # For Hive 3, we use Tez for execution. We have to add it to the classpath.

Reply via email to