Skip to content

Commit 049989f

Browse files
authored
Merge pull request #603 from boozallen/602-improve-hadoop-download
[#602] improve Hadoop download for aissemble-hive-service
2 parents 628de81 + f739ea6 commit 049989f

File tree

2 files changed

+25
-8
lines changed
  • extensions/extensions-docker/aissemble-hive-service

2 files changed

+25
-8
lines changed

extensions/extensions-docker/aissemble-hive-service/pom.xml

+20
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,26 @@
184184
</execution>
185185
</executions>
186186
</plugin>
187+
<plugin>
188+
<groupId>org.codehaus.mojo</groupId>
189+
<artifactId>wagon-maven-plugin</artifactId>
190+
<version>2.0.2</version>
191+
<executions>
192+
<execution>
193+
<id>get-hadoop</id>
194+
<phase>prepare-package</phase>
195+
<goals>
196+
<goal>download-single</goal>
197+
</goals>
198+
<configuration>
199+
<url>https://dlcdn.apache.org</url>
200+
<fromFile>hadoop/common/hadoop-${version.hadoop}/hadoop-${version.hadoop}.tar.gz</fromFile>
201+
<toFile>${dockerbuild.bin.directory}/hadoop.tar.gz</toFile>
202+
<skipIfExists>true</skipIfExists>
203+
</configuration>
204+
</execution>
205+
</executions>
206+
</plugin>
187207
</plugins>
188208
</build>
189209

extensions/extensions-docker/aissemble-hive-service/src/main/resources/docker/Dockerfile

+5-8
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@ RUN set -eux; \
1717
microdnf install -y gzip util-linux
1818

1919
# Install hadoop
20-
RUN cd /tmp \
21-
&& curl https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz \
22-
| tar -xzf - \
20+
RUN --mount=source=${BIN_DIR},target=/tmp/bin cd /tmp \
21+
&& tar -xzf /tmp/bin/hadoop.tar.gz \
2322
&& mv hadoop-${HADOOP_VERSION} $HADOOP_HOME
2423

2524
# Use standalone binary instead of full-service version on original image
26-
COPY ${BIN_DIR}/hive-standalone-metastore-server-bin.tar.gz /tmp
27-
RUN cd /tmp \
28-
&& tar -xf /tmp/hive-standalone-metastore-server-bin.tar.gz \
29-
&& mv apache-hive-metastore-${METASTORE_VERSION}-bin $HIVE_HOME \
30-
&& rm /tmp/hive-standalone-metastore-server-bin.tar.gz
25+
RUN --mount=source=${BIN_DIR},target=/tmp/bin cd /tmp \
26+
&& tar -xf /tmp/bin/hive-standalone-metastore-server-bin.tar.gz \
27+
&& mv apache-hive-metastore-${METASTORE_VERSION}-bin $HIVE_HOME
3128

3229
# Update library jars used by Hive and Hadoop
3330
COPY --chmod=755 ./src/main/resources/scripts/setup.sh $HIVE_HOME/setup.sh

0 commit comments

Comments
 (0)