mirror of
https://github.com/silicoflare/docker-hadoop.git
synced 2026-05-26 12:09:54 +05:30
Add hive installation
This commit is contained in:
@@ -83,5 +83,13 @@ COPY hbase-site.xml ~/hbase-site.xml
|
||||
RUN mkdir -p /hadoop/zookeeper
|
||||
RUN chown -R $USER:$USER /hadoop/
|
||||
|
||||
# Install Hive
|
||||
RUN wget https://dlcdn.apache.org/hive/hive-3.1.3/apache-hive-3.1.3-bin.tar.gz
|
||||
RUN tar -xzvf apache-hive-3.1.3-bin.tar.gz
|
||||
RUN mv apache-hive-3.1.3-bin /usr/local/hive
|
||||
RUN echo "export HIVE_HOME=/usr/local/hive" >> ~/.bashrc
|
||||
RUN echo "export PATH=\$PATH:\$HIVE_HOME/bin" >> ~/.bashrc
|
||||
RUN echo "HADOOP_HOME=/usr/local/hadoop" >> /usr/local/hive/bin/hive-config.sh
|
||||
|
||||
# Expose necessary ports
|
||||
EXPOSE 9870 8088 9000
|
||||
|
||||
20
init
20
init
@@ -1,9 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
service ssh restart
|
||||
stop-hbase.sh
|
||||
|
||||
service ssh restart # restart ssh service
|
||||
stop-hbase.sh # stop all processes
|
||||
stop-all.sh
|
||||
hdfs namenode -format
|
||||
rm *.tar.gz
|
||||
hdfs namenode -format # format namenodes
|
||||
rm *.tar.gz # delete all tar files to save space
|
||||
|
||||
# start all
|
||||
start-all.sh
|
||||
start-hbase.sh
|
||||
jps
|
||||
|
||||
# hive initialization
|
||||
hdfs dfs -mkdir /tmp
|
||||
hdfs dfs -chmod g+w /tmp
|
||||
hdfs dfs -mkdir -p /user/hive/warehouse
|
||||
hdfs dfs -chmod g+w /user/hive/warehouse
|
||||
schematool -dbType derby -initSchema
|
||||
|
||||
|
||||
Reference in New Issue
Block a user