Steps to Install Hive on Mac OSX PDF

Title Steps to Install Hive on Mac OSX
Author Plamond Colaso
Course Network Routing
Institution University of Missouri-Kansas City
Pages 1
File Size 57 KB
File Type PDF
Total Downloads 78
Total Views 181

Summary

software installation...


Description

Steps to install and run Hive on a Macbook Pro (Sierra) Download the HBase tarball and untar it. $ wget http://apache.claz.org/hive/hive-1.2.2/apache-hive-2.1.1-bin.tar.gz $ tar xvfz apache-hive-1.2.2-bin.tar.gz

Update ~/.bash_profile and source it. export HIVE_HOME=/your/directory/for/apache-hive-1.2.2-bin

Make sure HDFS and YARN are running (use jps). Setup the required directories in HDFS with correct permissions. $ hdfs dfs –mkdir –p /user/hive/warehouse $ hdfs dfs -chmod g+w /user/hive/warehouse $ hdfs dfs -chmod g+w /tmp

Open bin/hive-config.sh and add the following statement: export HADOOP_HOME=$HADOOP_HOME

To open the Hive shell and check if everything is okay, try these commands: $ $HIVE_HOME/bin/hive hive> show tables;

To create a simple table and load data, do the following: hive> create table A (id INT, lang STRING) row format delimited fields terminated by ','; hive> load data local inpath '/Users/raopr/Downloads/test.csv' into table A; hive> select id, lang from A; 1 en 2 es 3 en 4 jp Time taken: 0.41 seconds, Fetched: 4 row(s) hive> quit;

Be curious what is stored in /user/hive/warehouse. $ hdfs dfs -ls /user/hive/warehouse/a Found 2 items -rwxrwxr-x 1 raopr supergroup 20 2017-09-15 15:48 /user/hive/warehouse/a/test.csv -rwxrwxr-x 1 raopr supergroup 20 2017-09-15 15:52 /user/hive/warehouse/a/test_copy_1.csv

References [1] https://www.youtube.com/watch?v=yqEP9ILcSyI

[2] https://amodernstory.com/2015/03/29/installing-hive-on-mac/...


Similar Free PDFs