Skip to content

Commit 8dbf055

Browse files
committed
chore: move adding of JMX config and start-metastore script from builder stage to final stage
1 parent d11d061 commit 8dbf055

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

hive/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ ARG DELETE_CACHES="true"
2424

2525
# Copy patches into the builder
2626
COPY --chown=${STACKABLE_USER_UID}:0 hive/stackable/patches/${PRODUCT} /stackable/src/hive/stackable/patches/${PRODUCT}
27-
# Copy JMX config into the builder
28-
COPY --chown=${STACKABLE_USER_UID}:0 hive/stackable/jmx /stackable/jmx
29-
# Copy the start script into the builder
30-
COPY --chown=${STACKABLE_USER_UID}:0 hive/stackable/bin /stackable/bin
3127
# It is useful to see which version of Hadoop is used at a glance
3228
# Therefore the use of the full name here
3329
# TODO: Do we really need all of Hadoop in here?
@@ -66,8 +62,7 @@ fi
6662
cd /stackable
6763
rm -rf "$BUILD_SRC_DIR"
6864

69-
cp bin/start-metastore apache-hive-metastore-${PRODUCT}-bin/bin
70-
65+
mkdir /stackable/jmx
7166
curl "https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar" -o "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar"
7267
ln -s "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar" /stackable/jmx/jmx_prometheus_javaagent.jar
7368

@@ -133,6 +128,8 @@ WORKDIR /stackable
133128
COPY --chown=${STACKABLE_USER_UID}:0 --from=hive-builder /stackable/apache-hive-metastore-${PRODUCT}-bin /stackable/apache-hive-metastore-${PRODUCT}-bin
134129
COPY --chown=${STACKABLE_USER_UID}:0 --from=hive-builder /stackable/hadoop-${HADOOP} /stackable/hadoop-${HADOOP}
135130
COPY --chown=${STACKABLE_USER_UID}:0 --from=hive-builder /stackable/jmx /stackable/jmx
131+
COPY --chown=${STACKABLE_USER_UID}:0 hive/stackable/jmx /stackable/jmx
132+
COPY --chown=${STACKABLE_USER_UID}:0 hive/stackable/bin/start-metastore /stackable/apache-hive-metastore-${PRODUCT}-bin/bin
136133

137134
COPY hive/licenses /licenses
138135

@@ -144,6 +141,8 @@ chown ${STACKABLE_USER_UID}:0 /stackable/package_manifest.txt
144141
chmod g=u /stackable/package_manifest.txt
145142
rm -rf /var/cache/yum
146143

144+
chmod g=u /stackable/apache-hive-metastore-${PRODUCT}-bin/bin/start-metastore
145+
147146
ln -s /stackable/apache-hive-metastore-${PRODUCT}-bin /stackable/hive-metastore
148147
chown -h ${STACKABLE_USER_UID}:0 /stackable/hive-metastore
149148
chmod g=u /stackable/hive-metastore

0 commit comments

Comments
 (0)