Hive installation

2019 Unicorn Enterprise Heavy Gold Recruitment Python Engineer Standard >>> hot3.png

Install hive under hadoop user

1. Set environment variables

vim ~/.bashrc
export HIVE_HOME=/home/hdpsrc/hive
export PATH=$PATH:$HIVE_HOME/bin
source .bash_profile

2. Modify the configuration file

hive-site.xml

cp hive/conf/hive-default.xml.template hive/conf/hive-site.xml
<property> 
   <name>javax.jdo.option.ConnectionURL </name> 
   <value>jdbc:mysql://192.168.0.0:3306/hive </value> 
</property> 
 
<property> 
   <name>javax.jdo.option.ConnectionDriverName </name> 
   <value>com.mysql.jdbc.Driver </value> 
</property>

<property> 
   <name>javax.jdo.option.ConnectionPassword </name> 
   <value>hive </value> 
</property> 

<property> 
   <name>hive.exec.scratchdir </name> 
   <value>hdfs://172.16.1.2:9000/tmp </value> 
</property>

<property> 
   <name>hive.metastore.warehouse.dir</name> 
   <value>hdfs://172.16.1.2:9000/user/hive/warehouse</value> 
</property> 
 
<property> 
   <name>hive.hwi.listen.port </name> 
   <value>9999 </value> 
   <description>This is the port the Hive Web Interface will listen on </descript ion> 
</property> 

<property> 
   <name>datanucleus.autoCreateSchema </name> 
   <value>true</value> 
</property> 
 
<property> 
   <name>datanucleus.fixedDatastore </name> 
   <value>false</value> 
</property> 
</property> 

  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>hive</value>
    <description>Username to use against metastore database</description>
  </property>

  <property>
    <name>hive.exec.local.scratchdir</name>
    <value>/home/hive/iotmp</value>
    <description>Local scratch space for Hive jobs</description>
  </property>
  <property>
    <name>hive.downloaded.resources.dir</name>
    <value>/home/hive/iotmp</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
  </property>
  <property>
    <name>hive.querylog.location</name>
    <value>/home/hive/iotmp</value>
    <description>Location of Hive run time structured log file</description>
  </property>

3.

mv /home/hadoop/Desktop/mysql-connector-java-5.1.6-bin.jar /home/hive/lib/

4.

mkdir /home/hive/iotmp

5. Start hive, test

/home/hive/bin

hive

show databases;

 

Reprinted at: https://my.oschina.net/u/872813/blog/1488504

Intelligent Recommendation

WeChat Mini Program Implementation Picture Preview function

The small program has the wx.preViewImage method that provides preview pictures Put the picture tag on the page first We added a click event called Preview to the picture Then we write this click even...

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - c

  Careful to discover is the configuration problem in the web, <XXX-mapping> must be ordered to discharge    ...

Use the composite key to access the database

Since the old oracle database table does not have the id primary key column required by the standard ActiveRecord,composite_primary_keys.gem to solve the problem.   After downloading and installi...

Browser cache

Strong cache: Read directly from the local, without asking the server, return status code 200. When requesting a resource, it will read the time from the header and determine whether it is obtained fr...

Chapter 7 Caché Algorithm and Data Structure Deque

Article Directory Chapter 7 Caché Algorithm and Data Structure Deque Array circular queue Implementation Define node class Queue implementation class transfer Chapter 7 Caché Algorithm a...

More Recommendation

30 companies including Xiaomi were interviewed: the rectification of harassing calls should take effect in a short time

    Yesterday, the Information and Communication Administration of the Ministry of Industry and Information Technology focused on the recent "95" number and mobile resale service &...

Computer Network Reference Model 2

Theory introduction 1. Data encapsulation and decapsulation process 2. Some basic concepts of related data transmission 3. Communication between each layer of the TCP/IP five-layer model 1. Data encap...

Please explain the difference between this and super?

****Interview question:Please explain the difference between this and super? Remember: · this. method (): first find out if there is a specified method from this class, if not found, then call ...

Vue CLI Sets the project position when creating a project

Vue create Hello-Cloud Create a project location, such as the root directory I want to set to the D disk, the specific steps are as follows: 1.win + r (ie CMD enters the command line) 2.D: 3.vue creat...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top