增加hive 2.3.3构建
This commit is contained in:
parent
36980215d6
commit
c094ebb79f
36
hive/2.3.3-2.8.4/Dockerfile
Normal file
36
hive/2.3.3-2.8.4/Dockerfile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
FROM ccr.ccs.tencentyun.com/yy-dk/hadoop:2.8.4
|
||||||
|
|
||||||
|
MAINTAINER Yang <yangyufans@qq.com>
|
||||||
|
|
||||||
|
ENV HIVE_VERSION 2.3.3
|
||||||
|
ENV HADOOP_VERSION 2.8.4
|
||||||
|
ENV HIVE_NAME apache-hive-2.3.3-bin
|
||||||
|
|
||||||
|
RUN cd / && wget http://mirror.bit.edu.cn/apache/hive/hive-$HIVE_VERSION/$HIVE_NAME.tar.gz \
|
||||||
|
&& tar -zvxf $HIVE_NAME.tar.gz -C /usr/local/ \
|
||||||
|
&& rm -rf $HIVE_NAME.tar.gz \
|
||||||
|
&& mv /usr/local/$HIVE_NAME /usr/local/hive-$HIVE_VERSION
|
||||||
|
|
||||||
|
ENV HIVE_HOME "/usr/local/hive-$HIVE_VERSION"
|
||||||
|
ENV PATH "$PATH:$HIVE_HOME/bin"
|
||||||
|
|
||||||
|
RUN echo "export HIVE_HOME=/usr/local/hive-$HIVE_VERSION" >> /etc/profile && \
|
||||||
|
echo 'export PATH=$PATH:$HIVE_HOME/bin' >> /etc/profile && \
|
||||||
|
source /etc/profile
|
||||||
|
|
||||||
|
RUN cp $HIVE_HOME/conf/hive-env.sh.template $HIVE_HOME/conf/hive-env.sh && \
|
||||||
|
echo "HADOOP_HOME=$HADOOP_HOME" >> $HIVE_HOME/conf/hive-env.sh && \
|
||||||
|
echo "HADOOP_VERSION=$HADOOP_VERSION" >> $HIVE_HOME/conf/hive-env.sh && \
|
||||||
|
cp $HIVE_HOME/conf/hive-log4j2.properties.template $HIVE_HOME/conf/hive-log4j2.properties && \
|
||||||
|
sed -i 's/${sys:java.io.tmpdir}/\/logs/g' $HIVE_HOME/conf/hive-log4j2.properties && \
|
||||||
|
sed -i 's/${sys:user.name}/hive/g' $HIVE_HOME/conf/hive-log4j2.properties
|
||||||
|
|
||||||
|
COPY conf/* $HIVE_HOME/conf/
|
||||||
|
|
||||||
|
COPY start.sh /
|
||||||
|
|
||||||
|
RUN chmod 777 /start.sh
|
||||||
|
|
||||||
|
EXPOSE 22 8020 8088 8042 9870
|
||||||
|
|
||||||
|
CMD ["/start.sh"]
|
||||||
36
hive/2.3.3-2.8.4/conf/hive-site.xml
Normal file
36
hive/2.3.3-2.8.4/conf/hive-site.xml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?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>javax.jdo.option.ConnectionURL</name>
|
||||||
|
<value>jdbc:derby:;databaseName=/data/metastore_db;create=true</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>javax.jdo.option.ConnectionDriverName</name>
|
||||||
|
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>hive.metastore.local</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>hive.metastore.warehouse.dir</name>
|
||||||
|
<value>/user/hive/warehouse</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
9
hive/2.3.3-2.8.4/start.sh
Normal file
9
hive/2.3.3-2.8.4/start.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
\cp /conf/hadoop/* $HADOOP_HOME/etc/hadoop
|
||||||
|
\cp /conf/hive/* $HIVE_HOME/conf
|
||||||
|
|
||||||
|
echo "127.0.0.1 localhost" > /etc/hosts
|
||||||
|
|
||||||
|
/usr/sbin/sshd -D
|
||||||
@ -28,7 +28,7 @@ docker run -d \
|
|||||||
-v $PWD/conf:/conf \
|
-v $PWD/conf:/conf \
|
||||||
-v $PWD/data:/data \
|
-v $PWD/data:/data \
|
||||||
-v $PWD/logs:/logs \
|
-v $PWD/logs:/logs \
|
||||||
--name hadoop \
|
--name hive \
|
||||||
ccr.ccs.tencentyun.com/yy-dk/hive:3.0.0
|
ccr.ccs.tencentyun.com/yy-dk/hive:3.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user