Big data installation and configuration practices

Source: Internet
Author: User
Tags key string log4j

Hive is the basic architecture of data warehouse built on Hadoop. It provides a series of tools for data extraction, conversion, and loading (ETL). This is a mechanism for storing, querying, and analyzing large-scale data stored in Hadoop. Hive defines a simple SQL-like query language, known as HQL, which can be used to retrieve Hadoop storage data, and all query operations are completed based on MapReduce.
This article describes how to quickly install the Hive component. Hive is easy to install and configure. You only need to ensure that HDFS and MapReduce are running correctly to start our installation journey. Let's take a look at how to install the Hive component quickly and easily!
1. Download Hive
Download Address: http://www.apache.org/dyn/closer.cgi/hive select the version to download
2. Move Hive to the/usr/hadoop directory and decompress it.
Music hive-1.1.0.tar.gz/usr/; cd/usr
Tar-zxvf hive-1.1.0.tar.gz
3. Use the root user to authorize hive-1.1.0
Chown-R hadoop: hadoop hive
4. Add hive-1.1.0 environment variables
Vi. bash_profile
Export JAVA_HOME =/usr/java/jdk1.6
Export JRE_HOME =/usr/java/jdk1.6/jre
Export HADOOP_HOME =/usr/hadoop
Export HIVE_HOME =/usr/hive
Export HBASE_HOME =/usr/hbase
Export CLASSPATH =.: $ CLASSPATH: $ JAVA_HOME/lib: $ JRE_HOME/lib
Export PATH = $ PATH: $ JAVA_HOME/bin: $ JRE_HOME/bin: $ HADOOP_HOME/bin: $ HIVE_HOME/bin: $ HBASE_HOME/bin
5. Configure the Hive configuration file
(1) configure the hive-conf.sh in the/usr/hive/bin directory
HADOOP_HOME =/usr/hadoop
Export HIVE_CONF_DIR =/usr/hive/conf
(2) configure hive-default.xml and hive-site.xml
Cd/usr/hive/conf
Cp hive-default.xml.template hive-default.xml
Cp hive-site.xml.template hive-site.xml
Cp hive-exec-log4j.properties.template hive-exec-log4j.properties
Cp hive-log4j.properties.template hive-log4j.properties
Chown-R hadoop-hadoop hive-default.xml
Chown-R hadoop-hadoop hive-site.xml
Chown-R hadoop-hadoop hive-exec-log4j.properties
Chown-R hadoop-hadoop hive-log4j.properties
6. Start Hive
# Su-hadoop
# Hive
7. Test
Hive> create table test (key string );
Hive> show tables;
If the above Command shows the test table we just created, it proves that we have completed the Hive construction work correctly!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.