-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
153bb6f
commit 2b80a4b
Showing
6 changed files
with
91 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,34 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM openjdk:8u342-jre | ||
FROM openjdk:8-jre-slim AS build | ||
|
||
ENV HADOOP_VERSION=3.3.5 | ||
ENV HADOOP_HOME=/opt/hadoop-${HADOOP_VERSION} | ||
ENV PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin | ||
RUN apt-get update -qq && apt-get -qq -y install curl | ||
|
||
ENV HIVE_VERSION=3.1.3 | ||
ENV HIVE_HOME=/opt/apache-hive-${HIVE_VERSION}-bin | ||
ENV PATH=$HIVE_HOME/bin:$PATH | ||
ENV AWSSDK_VERSION=2.20.18 | ||
ENV HADOOP_VERSION=3.1.0 | ||
|
||
# Set classpath for S3 Access | ||
ENV HADOOP_CLASSPATH=${HADOOP_HOME}/share/hadoop/tools/lib/aws-java-sdk-bundle-1.12.316.jar:${HADOOP_HOME}/share/hadoop/tools/lib/hadoop-aws-3.3.5.jar | ||
RUN curl https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/1.11.271/aws-java-sdk-bundle-1.11.271.jar -Lo /tmp/aws-java-sdk-bundle-1.11.271.jar | ||
RUN curl https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/${HADOOP_VERSION}/hadoop-aws-${HADOOP_VERSION}.jar -Lo /tmp/hadoop-aws-${HADOOP_VERSION}.jar | ||
|
||
WORKDIR /opt | ||
|
||
RUN apt-get update && apt-get install -y procps fastjar | ||
FROM apache/hive:3.1.3 | ||
|
||
RUN wget https://downloads.apache.org/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz && \ | ||
tar -xzf hadoop-${HADOOP_VERSION}.tar.gz && \ | ||
rm hadoop-${HADOOP_VERSION}.tar.gz | ||
ENV AWSSDK_VERSION=2.20.18 | ||
ENV HADOOP_VERSION=3.1.0 | ||
|
||
RUN wget https://downloads.apache.org/hive/hive-${HIVE_VERSION}/apache-hive-${HIVE_VERSION}-bin.tar.gz && \ | ||
tar -xzf apache-hive-${HIVE_VERSION}-bin.tar.gz && \ | ||
rm apache-hive-${HIVE_VERSION}-bin.tar.gz | ||
|
||
RUN cd ${HIVE_HOME}/lib && \ | ||
wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar | ||
|
||
COPY ./hive-site.xml ${HIVE_HOME}/conf/hive-site.xml | ||
COPY ./entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
EXPOSE 9083 | ||
|
||
ENTRYPOINT ["sh", "-c", "/entrypoint.sh"] | ||
COPY --from=build /tmp/hadoop-aws-${HADOOP_VERSION}.jar /opt/hive/lib/hadoop-aws-${HADOOP_VERSION}.jar | ||
COPY --from=build /tmp/aws-java-sdk-bundle-1.11.271.jar /opt/hive/lib/aws-java-sdk-bundle-1.11.271.jar | ||
COPY core-site.xml /opt/hadoop/etc/hadoop/core-site.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<configuration> | ||
<property> | ||
<name>fs.defaultFS</name> | ||
<value>s3a://warehouse/hive</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.impl</name> | ||
<value>org.apache.hadoop.fs.s3a.S3AFileSystem</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.fast.upload</name> | ||
<value>true</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.endpoint</name> | ||
<value>http://minio:9000</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.access.key</name> | ||
<value>admin</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.secret.key</name> | ||
<value>password</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.connection.ssl.enabled</name> | ||
<value>false</value> | ||
</property> | ||
<property> | ||
<name>fs.s3a.path.style.access</name> | ||
<value>true</value> | ||
</property> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters