SlideShare a Scribd company logo
Ex-8
8.Install and Run Hive
Hive Installation
 Hive is a data warehouse software project built on
top of Hadoop, that facilitate reading, writing, and
managing large datasets residing in distributed
storage using SQL
Download Hive 2.1.0
https://archive.apache.org/dist/hive/hive-2.1.0/
Download Derby Metastore
10.12.1.1
https://archive.apache.org/dist/db/derby/db-derby-10.12.1.1/
Download hive-site.xml
 https://github.com/apache/hive/blob/master/data/c
onf/hive-site.xml
https://drive.google.com/file/d/1qqAo7RQfr5Q6O-
GTom6Rji3TdufP81zd/view
STEP - 1: Extract the Hive file
 Extract file apache-hive-2.1.0-bin.tar.gz and place
under "D:Hive", you can use any preferred
location –
 [1] You will get again a tar file post extraction –
[2] Go inside of apache-hive-2.1.0-
bin.tar folder and extract again –
[3] Copy the leaf folder “apache-hive-2.1.0-bin” and
move to the root folder "D:Hive" and removed all other
files and folders –
STEP - 2: Extract the Derby file
 Similar to Hive, extract file db-derby-10.12.1.1-bin.tar.gz and place
under "D:Derby", you can use any preferred location –
STEP - 3: Moving hive-site.xml file
 Drop the downloaded file “hive-site.xml” to hive
configuration location “D:Hiveapache-hive-2.1.0-
binconf”.
STEP - 4: Moving Derby libraries
Next, need to drop all derby library to hive library location –
[1] Move to library folder under derby location D:Derbydb-derby-
10.12.1.1-binlib.
[2] Select all and copy all libraries.
[3] Move to library folder under hive location D:Hiveapache-hive-2.1.0-binlib.
[4] Drop all selected libraries
here.
STEP - 5: Configure Environment
variables
Set the path for the following Environment variables (User Variables) on
windows 10 –
 HIVE_HOME - D:Hiveapache-hive-2.1.0-bin
 HIVE_BIN - D:Hiveapache-hive-2.1.0-binbin
 HIVE_LIB - D:Hiveapache-hive-2.1.0-binlib
 DERBY_HOME - D:Derbydb-derby-10.12.1.1-bin
 HADOOP_USER_CLASSPATH_FIRST - true
This PC - > Right Click - > Properties - > Advanced System Settings - >
Advanced - > Environment Variables
STEP - 6: Configure System
variables
Next onward need to set System variables, including Hive bin directory path –
 HADOOP_USER_CLASSPATH_FIRST - true
 Variable: Path
 Value:
 D:Hiveapache-hive-2.1.0-binbin
 D:Derbydb-derby-10.12.1.1-binbin
Now need to do a cross check with Hive configuration file for Derby details –
hive-site.xml
[1] Edit file D:/Hive/apache-hive-2.1.0-bin/conf/hive-site.xml, paste
below xml paragraph and save this file.
hive-site.xml
 <configuration>
 <property>
 <name>javax.jdo.option.ConnectionURL</name>
 <value>jdbc:derby://localhost:1527/metastore_db;create=true</value>
 <description>JDBC connect string for a JDBC metastore</description>
 </property>
 <property>
 <name>javax.jdo.option.ConnectionDriverName</name>
 <value>org.apache.derby.jdbc.ClientDriver</value>
 <description>Driver class name for a JDBC metastore</description>
 </property>
 <property>
 <name>hive.server2.enable.impersonation</name>
 <description>Enable user impersonation for HiveServer2</description>
 <value>true</value>
 </property>
 <property>
 <name>hive.server2.authentication</name>
 <value>NONE</value>
 <description> Client authentication types. NONE: no authentication check LDAP: LDAP/AD based authentication KERBEROS: Kerberos/GSSAPI authentication CUSTOM: Custom
authentication provider (Use with property hive.server2.custom.authentication.class) </description>
 </property>
 <property>
 <name>datanucleus.autoCreateTables</name>
 <value>True</value>
 </property>
 </configuration>
Open command prompt and change directory to
“D:Hadoophadoop-2.8.0sbin" and type "start-all.cmd" to
start apache
It will open four instances of cmd for following
tasks –
 Hadoop Datanaode
 Hadoop Namenode
 Yarn Nodemanager
 Yarn Resourcemanager
It can be verified via browser also as –
Namenode (hdfs) - http://localhost:50070
Datanode - http://localhost:50075
All Applications (cluster) -
http://localhost:8088 etc.
Ex-8-hive.pptx
Since the ‘start-all.cmd’ command has been deprecated so you can
use below command in order wise -
 “start-dfs.cmd” and
 “start-yarn.cmd”
STEP - 9: Start Derby server
 Post successful execution of Hadoop, change directory to
“D:Derbydb-derby-10.12.1.1-binbin” and type “startNetworkServer
-h 0.0.0.0” to start derby server.
STEP - 10: Start the Hive
 Derby server has been started and ready to accept connection so
open a new command prompt under administrator privileges and
move to hive directory as “D:Hiveapache-hive-2.1.0-binbin” –
[1] Type “jps -m” to check NetworkServerControl
[2] Type “hive” to execute hive server.
STEP-11: Some hands on activities
[1] Create Database in Hive -
CREATE DATABASE IF NOT EXISTS TRAINING;
[2] Show Database -
SHOW DATABASES;
[3] Creating Hive Tables -
CREATE TABLE IF NOT EXISTS testhive(col1 char(10), col2 char(20));

More Related Content

PPTX
exp-7-pig installation.pptx
PPTX
BD-zero lecture.pptx
PPTX
Create & Execute First Hadoop MapReduce Project in.pptx
PDF
Introduction to scoop and its functions
PDF
Installing Apache Hive, internal and external table, import-export
PDF
Scoop Job, import and export to RDBMS
PPTX
Hive commands
PPTX
Hive data migration (export/import)
exp-7-pig installation.pptx
BD-zero lecture.pptx
Create & Execute First Hadoop MapReduce Project in.pptx
Introduction to scoop and its functions
Installing Apache Hive, internal and external table, import-export
Scoop Job, import and export to RDBMS
Hive commands
Hive data migration (export/import)

What's hot (18)

PPTX
Implementing Hadoop on a single cluster
PDF
Hackathon
PDF
Administering and Monitoring SolrCloud Clusters
PPTX
Python database interfaces
PPTX
Database connectivity in python
PDF
R hive tutorial supplement 3 - Rstudio-server setup for rhive
PPTX
Relational Database Access with Python
PPTX
ProxySQL & PXC(Query routing and Failover Test)
PPTX
PostgreSQL Database Slides
PDF
Devtools cheatsheet
PDF
Introduction to php database connectivity
PDF
RHive tutorial - HDFS functions
PDF
MySQL User Conference 2009: Python and MySQL
PPT
eZ Publish cluster unleashed revisited
PDF
Import and Export Big Data using R Studio
PDF
XML-Motor
PDF
Mahout Workshop on Google Cloud Platform
PDF
R hive tutorial - udf, udaf, udtf functions
Implementing Hadoop on a single cluster
Hackathon
Administering and Monitoring SolrCloud Clusters
Python database interfaces
Database connectivity in python
R hive tutorial supplement 3 - Rstudio-server setup for rhive
Relational Database Access with Python
ProxySQL & PXC(Query routing and Failover Test)
PostgreSQL Database Slides
Devtools cheatsheet
Introduction to php database connectivity
RHive tutorial - HDFS functions
MySQL User Conference 2009: Python and MySQL
eZ Publish cluster unleashed revisited
Import and Export Big Data using R Studio
XML-Motor
Mahout Workshop on Google Cloud Platform
R hive tutorial - udf, udaf, udtf functions
Ad

Similar to Ex-8-hive.pptx (20)

DOC
Apache hadoop 2_installation
ODT
ACADGILD:: HADOOP LESSON
PDF
R hive tutorial supplement 2 - Installing Hive
PDF
Охота на уязвимости Hadoop
PPTX
Hadoop cluster 安裝
PPTX
Learn to setup a Hadoop Multi Node Cluster
PPTX
Learn Hadoop Administration
PDF
Introduction to HCFS
PDF
Shipping Applications to Production in Containers with Docker
ODP
Hadoop2.2
PDF
Rails 2.0 Presentation
PDF
Hive
PDF
Hands on Docker - Launch your own LEMP or LAMP stack
PPTX
3. v sphere big data extensions
PDF
Introduction to Docker
KEY
Using and scaling Rack and Rack-based middleware
PDF
Docker for developers on mac and windows
PPT
Apache
PDF
Deploying configurable frontend web application containers
PDF
Working with Hive Analytics
Apache hadoop 2_installation
ACADGILD:: HADOOP LESSON
R hive tutorial supplement 2 - Installing Hive
Охота на уязвимости Hadoop
Hadoop cluster 安裝
Learn to setup a Hadoop Multi Node Cluster
Learn Hadoop Administration
Introduction to HCFS
Shipping Applications to Production in Containers with Docker
Hadoop2.2
Rails 2.0 Presentation
Hive
Hands on Docker - Launch your own LEMP or LAMP stack
3. v sphere big data extensions
Introduction to Docker
Using and scaling Rack and Rack-based middleware
Docker for developers on mac and windows
Apache
Deploying configurable frontend web application containers
Working with Hive Analytics
Ad

More from vishal choudhary (20)

PPTX
mobile application using automatin using node ja java on
PPTX
mobile development using node js and java
PPTX
Pixel to Percentage conversion Convert left and right padding of a div to per...
PPTX
esponsive web design means that your website (
PPTX
function in php using like three type of function
PPTX
data base connectivity in php using msql database
PPTX
software evelopment life cycle model and example of water fall model
PPTX
software Engineering lecture on development life cycle
PPTX
strings in php how to use different data types in string
PPTX
OPEN SOURCE WEB APPLICATION DEVELOPMENT question
PPTX
web performnace optimization using css minification
PPTX
web performance optimization using style
PPTX
Data types and variables in php for writing and databse
PPTX
Data types and variables in php for writing
PPTX
Data types and variables in php for writing
PPTX
sofwtare standard for test plan it execution
PPTX
Software test policy and test plan in development
PPTX
function in php like control loop and its uses
PPTX
introduction to php and its uses in daily
PPTX
data type in php and its introduction to use
mobile application using automatin using node ja java on
mobile development using node js and java
Pixel to Percentage conversion Convert left and right padding of a div to per...
esponsive web design means that your website (
function in php using like three type of function
data base connectivity in php using msql database
software evelopment life cycle model and example of water fall model
software Engineering lecture on development life cycle
strings in php how to use different data types in string
OPEN SOURCE WEB APPLICATION DEVELOPMENT question
web performnace optimization using css minification
web performance optimization using style
Data types and variables in php for writing and databse
Data types and variables in php for writing
Data types and variables in php for writing
sofwtare standard for test plan it execution
Software test policy and test plan in development
function in php like control loop and its uses
introduction to php and its uses in daily
data type in php and its introduction to use

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Lesson notes of climatology university.
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Insiders guide to clinical Medicine.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Classroom Observation Tools for Teachers
PPTX
Pharma ospi slides which help in ospi learning
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Supply Chain Operations Speaking Notes -ICLT Program
Lesson notes of climatology university.
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Computing-Curriculum for Schools in Ghana
GDM (1) (1).pptx small presentation for students
Insiders guide to clinical Medicine.pdf
RMMM.pdf make it easy to upload and study
Pharmacology of Heart Failure /Pharmacotherapy of CHF
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial disease of the cardiovascular and lymphatic systems
Classroom Observation Tools for Teachers
Pharma ospi slides which help in ospi learning
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
O5-L3 Freight Transport Ops (International) V1.pdf
Pre independence Education in Inndia.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx

Ex-8-hive.pptx

  • 2. Hive Installation  Hive is a data warehouse software project built on top of Hadoop, that facilitate reading, writing, and managing large datasets residing in distributed storage using SQL
  • 3. Download Hive 2.1.0 https://archive.apache.org/dist/hive/hive-2.1.0/ Download Derby Metastore 10.12.1.1 https://archive.apache.org/dist/db/derby/db-derby-10.12.1.1/
  • 5. STEP - 1: Extract the Hive file  Extract file apache-hive-2.1.0-bin.tar.gz and place under "D:Hive", you can use any preferred location –  [1] You will get again a tar file post extraction –
  • 6. [2] Go inside of apache-hive-2.1.0- bin.tar folder and extract again –
  • 7. [3] Copy the leaf folder “apache-hive-2.1.0-bin” and move to the root folder "D:Hive" and removed all other files and folders –
  • 8. STEP - 2: Extract the Derby file  Similar to Hive, extract file db-derby-10.12.1.1-bin.tar.gz and place under "D:Derby", you can use any preferred location –
  • 9. STEP - 3: Moving hive-site.xml file  Drop the downloaded file “hive-site.xml” to hive configuration location “D:Hiveapache-hive-2.1.0- binconf”.
  • 10. STEP - 4: Moving Derby libraries Next, need to drop all derby library to hive library location – [1] Move to library folder under derby location D:Derbydb-derby- 10.12.1.1-binlib.
  • 11. [2] Select all and copy all libraries. [3] Move to library folder under hive location D:Hiveapache-hive-2.1.0-binlib.
  • 12. [4] Drop all selected libraries here.
  • 13. STEP - 5: Configure Environment variables Set the path for the following Environment variables (User Variables) on windows 10 –  HIVE_HOME - D:Hiveapache-hive-2.1.0-bin  HIVE_BIN - D:Hiveapache-hive-2.1.0-binbin  HIVE_LIB - D:Hiveapache-hive-2.1.0-binlib  DERBY_HOME - D:Derbydb-derby-10.12.1.1-bin  HADOOP_USER_CLASSPATH_FIRST - true
  • 14. This PC - > Right Click - > Properties - > Advanced System Settings - > Advanced - > Environment Variables
  • 15. STEP - 6: Configure System variables Next onward need to set System variables, including Hive bin directory path –  HADOOP_USER_CLASSPATH_FIRST - true  Variable: Path  Value:  D:Hiveapache-hive-2.1.0-binbin  D:Derbydb-derby-10.12.1.1-binbin
  • 16. Now need to do a cross check with Hive configuration file for Derby details – hive-site.xml [1] Edit file D:/Hive/apache-hive-2.1.0-bin/conf/hive-site.xml, paste below xml paragraph and save this file.
  • 17. hive-site.xml  <configuration>  <property>  <name>javax.jdo.option.ConnectionURL</name>  <value>jdbc:derby://localhost:1527/metastore_db;create=true</value>  <description>JDBC connect string for a JDBC metastore</description>  </property>  <property>  <name>javax.jdo.option.ConnectionDriverName</name>  <value>org.apache.derby.jdbc.ClientDriver</value>  <description>Driver class name for a JDBC metastore</description>  </property>  <property>  <name>hive.server2.enable.impersonation</name>  <description>Enable user impersonation for HiveServer2</description>  <value>true</value>  </property>  <property>  <name>hive.server2.authentication</name>  <value>NONE</value>  <description> Client authentication types. NONE: no authentication check LDAP: LDAP/AD based authentication KERBEROS: Kerberos/GSSAPI authentication CUSTOM: Custom authentication provider (Use with property hive.server2.custom.authentication.class) </description>  </property>  <property>  <name>datanucleus.autoCreateTables</name>  <value>True</value>  </property>  </configuration>
  • 18. Open command prompt and change directory to “D:Hadoophadoop-2.8.0sbin" and type "start-all.cmd" to start apache
  • 19. It will open four instances of cmd for following tasks –  Hadoop Datanaode  Hadoop Namenode  Yarn Nodemanager  Yarn Resourcemanager
  • 20. It can be verified via browser also as – Namenode (hdfs) - http://localhost:50070 Datanode - http://localhost:50075 All Applications (cluster) - http://localhost:8088 etc.
  • 22. Since the ‘start-all.cmd’ command has been deprecated so you can use below command in order wise -  “start-dfs.cmd” and  “start-yarn.cmd”
  • 23. STEP - 9: Start Derby server  Post successful execution of Hadoop, change directory to “D:Derbydb-derby-10.12.1.1-binbin” and type “startNetworkServer -h 0.0.0.0” to start derby server.
  • 24. STEP - 10: Start the Hive  Derby server has been started and ready to accept connection so open a new command prompt under administrator privileges and move to hive directory as “D:Hiveapache-hive-2.1.0-binbin” – [1] Type “jps -m” to check NetworkServerControl [2] Type “hive” to execute hive server.
  • 25. STEP-11: Some hands on activities [1] Create Database in Hive - CREATE DATABASE IF NOT EXISTS TRAINING; [2] Show Database - SHOW DATABASES;
  • 26. [3] Creating Hive Tables - CREATE TABLE IF NOT EXISTS testhive(col1 char(10), col2 char(20));