In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What is Hive?
Hive is a translator that translates SQL statements into a MapReduce program.
Common data analysis engines: Hive, Pig, Impala, Spark SQL
Hive is a data analysis engine (data warehouse) based on Hadoop.
Hives HDFS
Table-> catalog
Data-> file
Partition-> directory
Environment deployment:
Prepare before deployment:
Environment variable: vi ~ / .bash_profile
HIVE_HOME=/root/training/apache-hive-2.3.0-bin
Export HIVE_HOME
PATH=$HIVE_HOME/bin:$PATH
Export PATH
Embedded deployment:
(1) use the Derby database that comes with Hive to store meta information
(2) Hive only supports one connection
Create conf/hive-site.xml
Javax.jdo.option.ConnectionURL
Jdbc:derby:;databaseName=metastore_db;create=true
Javax.jdo.option.ConnectionDriverName
Org.apache.derby.jdbc.EmbeddedDriver
Hive.metastore.local
True
Hive.metastore.warehouse.dir
File:///root/training/apache-hive-2.3.0-bin/warehouse
Initialize MetaStore:
Schematool-dbType derby-initSchema
Remote mode (requires MySQL database):
1. Install the MySQL database (omitted here)
two。 Configure hive-site.xml (parameters for JDBC)
Javax.jdo.option.ConnectionURL
Jdbc:mysql://localhost:3306/hive?useSSL=false
Javax.jdo.option.ConnectionDriverName
Com.mysql.jdbc.Driver
Javax.jdo.option.ConnectionUserName
Hiveowner
Javax.jdo.option.ConnectionPassword
Welcome_1
3. Put the driver of MySQL database under: Hive/lib
4. Initialize the MySQL database
Older versions of hive automatically initialize the MySQL database the first time it is run
The new version of hive requires the execution of commands:
Schematool-dbType mysql-initSchema
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.