File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
hive-metastore-opa-authorizer Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,10 @@ USER ${STACKABLE_USER_UID}
235235
236236ENV HIVE_HOME=/stackable/hive-metastore
237237ENV HADOOP_HOME=/stackable/hadoop
238- ENV PATH="${PATH}" :/stackable/hadoop/bin:/stackable/hive-metastore/bin
238+ ENV PATH="${PATH}:${HADOOP_HOME}/bin:${HIVE_HOME}/bin"
239+ # ENV CLASSPATH="${HADOOP_HOME}/lib/*:${HIVE_HOME}/lib/*:/stackable/auxlib/*:."
240+ # ENV CLASSPATH="${HADOOP_HOME}/lib/*:${HIVE_HOME}/lib/*:."
241+ # ENV HIVE_AUX_JARS_PATH="${HIVE_HOME}/auxlib/hms4-4.0.1-3.3.6-v1.0.0.jar"
239242
240243# The following 2 env-vars are required for common hadoop scripts even if the respective libraries are never used.
241244# We set them here to a sensible default.
Original file line number Diff line number Diff line change @@ -49,13 +49,20 @@ mvn versions:set -DnewVersion=${AUTHORIZER_VERSION}
4949
5050# The if part can be removed once we do no longer support Hive 3.x.x
5151# Hive 3.1.3 only works with the shaded jar
52- if [[ "${HIVE_VERSION}" =~ ^3 ]]; then
52+ if [[ "${HIVE_VERSION}" =~ "^3" ]]; then
5353 mvn clean package -DskipTests -Dhive.version=${HIVE_VERSION} -Dhadoop.version=${HADOOP_VERSION} -f hms-v3/pom.xml
54- mv hms-v3/target/com.bosch.bdps.hms3-${HIVE_VERSION}-${HADOOP_VERSION}-${AUTHORIZER_VERSION}.jar /stackable/opa-authorizer-bin
54+ 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
55+ # Hive 4.0.1 only works with the shaded jar
56+ elif [[ "${HIVE_VERSION}" == "4.0.1" ]]; then
57+ mvn clean package -DskipTests -Dhive.version=${HIVE_VERSION} -Dhadoop.version=${HADOOP_VERSION} -f hms-v4/pom.xml
58+ # The renaming from "com.bosch.bdps.hms4-..." to "zhms4-.." is required for 4.0.1 because it is a dependency mess and otherwise loaded before other hive
59+ # libraries. Setting CLASSPATH or HIVE_AUX_JARS_PATH did not reorder the dependency loading up as well.
60+ # This is very very bad and depends on alhpabetically ordering...
61+ mv hms-v4/target/com.bosch.bdps.hms4-${HIVE_VERSION}-${HADOOP_VERSION}-${AUTHORIZER_VERSION}.jar /stackable/opa-authorizer-bin/zhms4-${HIVE_VERSION}-${HADOOP_VERSION}-${AUTHORIZER_VERSION}.jar
5562# Hive 4.1.0 only works with the non shaded jar
5663else
5764 mvn clean package -DskipTests -Dhive.version=${HIVE_VERSION} -Dhadoop.version=${HADOOP_VERSION} -f hms-v4/pom.xml
58- mv hms-v4/target/hms4-${AUTHORIZER_VERSION}.jar /stackable/opa-authorizer-bin
65+ mv hms-v4/target/hms4-${AUTHORIZER_VERSION}.jar /stackable/opa-authorizer-bin/hms4-${HIVE_VERSION}-${HADOOP_VERSION}-${AUTHORIZER_VERSION}.jar
5966fi
6067
6168# We're removing these to make the intermediate layer smaller
You can’t perform that action at this time.
0 commit comments