File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 18
18
19
19
FROM openjdk:8-jre
20
20
21
- # COPY ./archive/apache-hive-2.3.6-bin.tar.gz /opt
22
- # COPY ./archive/db-derby-10.10.2.0-bin.tar.gz /opt
23
- # COPY ./archive/hadoop-2.9.2.tar.gz /opt
24
-
25
21
# Copy binary distributions from Apache servers/mirrors
26
22
RUN cd /opt && \
27
23
wget http://apache.lauf-forum.at/hadoop/common/hadoop-2.9.2/hadoop-2.9.2.tar.gz && \
@@ -43,6 +39,12 @@ RUN cd /opt && \
43
39
cp /opt/db-derby-10.10.2.0-bin/lib/derbytools.jar /opt/apache-hive-2.3.6-bin/lib
44
40
45
41
COPY hive-conf/hive-site.xml /opt/apache-hive-2.3.6-bin/conf
42
+
43
+ # Copy metastore_db backup file and restore it
44
+ COPY ./metastore_db_backup.tar /
45
+ RUN cd /; \
46
+ tar xf /metastore_db_backup.tar; \
47
+ rm /metastore_db_backup.tar;
46
48
47
49
ENV HADOOP_HOME /opt/hadoop-2.9.2
48
50
ENV DERBY_INSTALL /opt/db-derby-10.10.2.0-bin
Original file line number Diff line number Diff line change 3
3
# start Derby
4
4
/opt/db-derby-10.10.2.0-bin/bin/startNetworkServer -h 0.0.0.0 &
5
5
6
- # create Metastore schema
7
- /opt/apache-hive-2.3.6-bin/bin/schematool -initSchema -dbType derby
6
+ # create Metastore schema. Not needed because we restored a database backup
7
+ # /opt/apache-hive-2.3.6-bin/bin/schematool -initSchema -dbType derby
8
8
9
9
# start Metastore
10
10
/opt/apache-hive-2.3.6-bin/bin/hive --service metastore -p 9083
You can’t perform that action at this time.
0 commit comments