Skip to content

Commit b511e99

Browse files
committed
fix 3.1.3
1 parent 1ab6431 commit b511e99

File tree

3 files changed

+40
-41
lines changed

3 files changed

+40
-41
lines changed

hive/hive-metastore-opa-authorizer/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
3131
# Cache mounts are owned by root by default
3232
# We need to explicitly give the uid to use
3333
RUN --mount=type=cache,id=maven-hive-metastore-opa-authorizer-${AUTHORIZER_VERSION},uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
34+
set -e
3435
# for moving nested artifacts out of target folder
3536
mkdir -p /stackable/opa-authorizer-bin
3637
# for moving sources out of target folder
@@ -44,12 +45,12 @@ tar -czf /stackable/opa-authorizer-src/hive-metastore-opa-authorizer-${AUTHORIZE
4445
# Make Maven aware of custom Stackable libraries
4546
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
4647

47-
# Set version in the output jars(s)
48+
# Set version
4849
mvn versions:set -DnewVersion=${AUTHORIZER_VERSION}
4950

5051
# The if part can be removed once we do no longer support Hive 3.x.x
5152
# Hive 3.1.3 only works with the shaded jar
52-
if [[ "${HIVE_VERSION}" =~ "^3" ]]; then
53+
if [[ "${HIVE_VERSION}" == "3.1.3" ]]; then
5354
mvn clean package -DskipTests -Dhive.version=${HIVE_VERSION} -Dhadoop.version=${HADOOP_VERSION} -f hms-v3/pom.xml
5455
mv hms-v3/target/com.bosch.bdps.hms3-${HIVE_VERSION}-${HADOOP_VERSION}-${AUTHORIZER_VERSION}.jar /stackable/opa-authorizer-bin/hms3-${HIVE_VERSION}-${HADOOP_VERSION}-${AUTHORIZER_VERSION}.jar
5556
# Hive 4.0.1 only works with the shaded jar
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From e9b5503e9c952ab691952fb14724ac55a6890420 Mon Sep 17 00:00:00 2001
2+
From: Malte Sander <malte.sander.it@gmail.com>
3+
Date: Mon, 24 Nov 2025 18:05:16 +0100
4+
Subject: Relocate jline in shading plugin
5+
6+
For Hive 4.0.1 the dependency loading is a mess. We explicitly shade jline to avoid a schematool dependency problem:
7+
8+
Exception in thread "main" java.lang.NoSuchMethodError: 'void org.jline.reader.impl.completer.StringsCompleter.<init>(org.jline.reader.Candidate[])'
9+
at sqlline.SqlLineOpts.setOptionCompleters(SqlLineOpts.java:160)
10+
at sqlline.Application.getCommandHandlers(Application.java:294)
11+
at sqlline.SqlLine$Config.<init>(SqlLine.java:1946)
12+
at sqlline.SqlLine.setAppConfig(SqlLine.java:1875)
13+
at sqlline.SqlLine.<init>(SqlLine.java:229)
14+
at org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool.execSql(MetastoreSchemaTool.java:313)
15+
16+
This does not affect versions >= 4.1.x since the non shaded jar is used.
17+
---
18+
hms-v4/pom.xml | 6 ++++++
19+
1 file changed, 6 insertions(+)
20+
21+
diff --git a/hms-v4/pom.xml b/hms-v4/pom.xml
22+
index 4ebeac4..b2940ab 100644
23+
--- a/hms-v4/pom.xml
24+
+++ b/hms-v4/pom.xml
25+
@@ -67,6 +67,12 @@
26+
</excludes>
27+
</filter>
28+
</filters>
29+
+ <relocations>
30+
+ <relocation>
31+
+ <pattern>org.jline</pattern>
32+
+ <shadedPattern>com.bosch.bdps.jline</shadedPattern>
33+
+ </relocation>
34+
+ </relocations>
35+
</configuration>
36+
</execution>
37+
</executions>

hive/hive-metastore-opa-authorizer/stackable/patches/v1.0.0/0001-Relocate-jline-to-avoid-depedency-mess-with-hive-sch.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)