Your SlideShare is downloading. ×
  • Like
Setup hive and test queries
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Setup hive and test queries

  • 422 views
Published

This is basic tutorial to setup hive in rapid way and quickly test the hive shell with same statement.

This is basic tutorial to setup hive in rapid way and quickly test the hive shell with same statement.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
422
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
18
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Setup Hive and Collect the Honey By Kannan Kalidasan
  • 2. Hive Introduction Hive is a data warehousing infrastructure based on Hadoop. Hive is designed to enable easy data summarization, ad-hoc querying and analysis of large volumes of data. It provides a simple query language called Hive QL, which is based on SQL and which enables users familiar with SQL to do ad-hoc querying, summarization and data analysis easily. I recommended To learn Programming Hive – Allan Gates book Believe me any Developers having intermediate knowledge on any one of the Database can able to pick up this easily , quickly and expertise it. When i say intermediate knowledge on Database , i am referring like an individuals has knowledge on Table Creation,Select queries and different clauses,Join Queries, DML Operations,Basic Database creation script knowledge, Indexes and Partitions. Thats it . This should be sufficient for anyone to understand most of the topics in HIVE. Hive has its own features and Data Model Approach which you will come to know when you read it . Then Your brain will start comparing your left and right eyes to know which is best :)
  • 3. Hive Installation 1. Download the stable version of tarbal. http://mirror.reverse.net/pub/apache/hive/stable/ hive-0.11.0.tar.gz Release notes link http://hive.apache.org/releases.html
  • 4. Hive Installation ... 2.Copy the downloaded package to /usr/local kannan@kannandreams:/usr/local$ ls -ltr total 192652 -rw-r–r– 1 root root 74945460 Dec 5 00:59 hive-0.11.0.tar.gz kannan@kannandreams:/usr/local$ 3. unzip and change the owner sudo tar xzf hive-0.11.0.tar.gz sudo mv hive-0.11.0 hive sudo chown -R hduser:hadoop hive chown command change the owner of the directory hive from root to hadoop user hduser.
  • 5. Hive Installation ... 4.Login to Hadoop user hduser and set the environment variables. kannan@kannandreams:/usr/local$ su – hduser Password: hduser@kannandreams:~$ vi .bashrc Add the below two lines in ~/.bashrc file and save it. #Hive env variables export HIVE_HOME=”/usr/local/hive” export PATH=$PATH:$HIVE_HOME/bin hduser@kannandreams:~$ . .bashrc ( source the file to reflect the env. values)
  • 6. Note to Remember Hadoop services should be running to work in Hive Start the Hadoop services with the command start-all.sh
  • 7. Hive Shell hduser@kannandreams:~$ cd $HIVE_HOME hduser@kannandreams:/usr/local/hive$ hive Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common0.11.0.jar!/hive-log4j.properties Hive history file= /tmp/hduser/hive_job_log_hduser_6282@kannandreams_201312050123_1791 376162.txt hive>
  • 8. Hive Shell ... Test by creating a sample table and show tables statement – list the tables available in database. hive> show tables; OK Time taken: 6.84 seconds hive> create table test (Id INT); OK Time taken: 0.605 seconds hive> show tables; OK test Time taken: 0.1 seconds, Fetched: 1 row(s) hive>quit;
  • 9. Hive Directory If you notice in HDFS Directory, Hive create the below directory by default based on configuration XML file. I didn’t mentioned in detail about the conf. xml file. drwxr-xr-x – hduser supergroup 0 2013-12-05 01:33 /user/hive drwxr-xr-x – hduser supergroup 0 2013-12-05 01:39 /user/hive/warehouse drwxr-xr-x – hduser supergroup 0 2013-12-05 01:39 /user/hive/warehouse/test
  • 10. Thank You !!! Now we got the new job “apiarist” :) mail : kannanpoem1984@gmail.com @kannanpoem on twitter Blog: http://kannandreams.wordpress.com/about/ FB Community: www.facebook.com/groups/huge360/ HUGE - Hadoop User Group & Enthusiasts Huge , Yes Its All about "BIG" Data This has been created to build a group to get expertise and experts in Hadoop and Big Data .