Big Data Analytics with Hadoop 3
上QQ阅读APP看书,第一时间看更新

Downloading and extracting the Hive binaries

In this section, we will extract the downloaded binaries and then configure the Hive binaries to get everything started:

tar -xvzf apache-hive-2.3.3-bin.tar.gz

Once the Hive bundle is extracted, do the following to create a hive-site.xml:

cd apache-hive-2.3.3-bin
vi conf/hive-site.xml

At the top of the properties list, paste the following:

<property>
<name>system:java.io.tmpdir</name>
<value>/tmp/hive/java</value>
</property>

At the bottom of the hive-site.xml add the following properties:

<property>
<name>hive.metastore.local</name>
<value>TRUE</value>

</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/usr/hive/warehouse</value>
</property>

After this, using the Hadoop commands, create the HDFS paths needed for hive:

cd hadoop-3.1.0
./bin/hadoop fs -mkdir -p /usr/hive/warehouse
./bin/hadoop fs -chmod g+w /usr/hive/warehouse