Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
1. Environmental Requirements 1, Java 1.7 or above 2, Hadoop 2.x (preferred), 1.x (not keyword by Hive 2.0.0 onward). 2. Installation Configuration Hive does not have Hadoop, hbase, or zookeeper master-slave architecture, so just install it on the machine you need. 1. Decompression TAR-ZXVF apache-hive-0.13.1-bin.tar.gz Move the unpacked folder to the directory you want to store. 2. Configure the Environment sudo vi/etc/profile Export Hive_home=/usr/export/servers/apache-hive-0.13.1-bin Export path=$ $PATH: $HIVE _home/bin Environment effective Source/etc/profile
4. Establish files/tmp and/user/hive/warehouse in HDFs and modify permissions Hadoop fs-mkdir/tmp Hadoop Fs-mkdir/user/hive/warehouse Hadoop Fs-chmod g+w/tmp Hadoop Fs-chmod G+w/user/hive/warehouse 5. Installation Complete Enter the CLI command-line mode for hive by typing the hive command.
Second, Hive operation mode and configuration Hive 3 Operating modes supported by the metabase, inline mode, local mode, and remote mode. Inline mode The default mode is that the metadata service and hive run in the same JVM, and the metadata is stored in Derby, the local disk, and there can be only one hive session. Local mode Use a stand-alone database as a storage component of metadata, such as MySQL.
Install MySQL (Ubuntu) 1. To see if MySQL is installed sudo netstat-tap | grep MySQL No results, no installation. 2. To see if MySQL is installed sudo apt install mysql-server sudo apt install mysql-client It is best to use root installation and have encountered an installation failure, updating update apt under root.
MySQL configuration 1. Modify root password UPDATE user SET Password=password (' 123456 ') where user= ' root '; 2. Allow users to remotely access sudo vi/etc/mysql/mysql.conf.d/mysqld.cnf bind-address = 127.0.0.1//Find this content and Comment 3. Allow root users to be far Path Access (1). Enter MySQL, enter MySQL database (2). There is a user's table (3) under the MySQL database. Find the User,host column of the user table Select User,host From user (4). Find User column root,host column localhost, modify Host column '% ' Update user set host= '% ' where user= ' root ' and host= ' lo Calhost '; Flush Privileges; 4. Restart MySQL sudo/etc/init.d/mysql restart
Hive configuration 1. Create Hive-site.xml file under Hive directory conf, initialize content to :
2. Find the following 4 configuration contents in the Hive-default.xml.template file: (1): Javax.jdo.option.ConnectionURL (2): Javax.jdo.option.ConnectionDriverName (3): Javax.jdo.option.ConnectionUserName (4): Javax.jdo.option.ConnectionPassword Add these four configurations in Hive-site.xml
Copy jar pack copy MySQL drive Jar pack, to HIV E installation directory's lib. The new hive version may also need to replace the Hive_home/lib/jline-2.12.jar file with the original version of Hadoop_home/share/hadoop/yarn/lib (that is, delete the old version, Copy the new version to this directory, or hive startup will fail
Remote mode Hive Server and metadata services under different JVMs, hive servers can access multiple metadata servers. typically accessed through JDBC/ODBC.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.