In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The editor today takes you to understand the application example analysis of big data HIve data warehouse. The knowledge points in the article are introduced in great detail. Friends who feel helpful can browse the content of the article together with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's go deep into the knowledge of "big data HIve data Warehouse Application case Analysis" with the editor.
Now, big data's big wave has involved every one of us, and along with big data's technology, HIve data warehouse has attracted public attention. As one of the core tools of big data analysis, it has been playing an important role in providing decision support for enterprises. Therefore, mastering Hive is one of the keys to getting started with big data. Let's take a look at the HIve data warehouse application case.
Load local file data into the Hive data warehouse:
First create a text file under / public/users/yexin/Hadoop/hadoopdata:
There are only two ways to load data after a table is established in Hive:
(1) load data from the local file system
(2) load data from the Hadoop file system
Start the hive service on the node63 node: enter: hive-- service metastore &; hive-- service hiveserver2 or direct input
Enter hiveserver2
Enter hive to log in under the node70 node and do the following
Create a table:
Hive > CREATE TABLE score (
> sno int,name String
> java decimal (10jue 2)
> python decimal (10jue 2)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY'\ t'
> LINES TERMINATED BY'\ n'
> STORED AS TEXTFILE
OK
Time taken: 0.429 seconds
Import data: import by from local system file
Time taken: 0.429 seconds
Hive > load data local inpath'/ public/users/yexin/Hadoop/hadoopdata/score.txt' overwrite into table
Score
Loading data to table yexin.score
OK
Time taken: 1.413 seconds
Query score table:
View HDFS data:
View metadata:
Use hive
Delete table: drop tabel score? Remember that when you delete the table, the data on the HDFS is deleted together.
Note: if an external table is created, the files in the HDFS after drop are not deleted
Beelin command:
Set access permissions: modify the core-site.xml of hadoop
Using other nodes as clients, you need to configure the hive2 listener node port on the node63 node to allow remote access to the hive service (beeline)
Vim hive-site.xml
Add: to bind node70 client access. So that it can be accessed remotely.
Hive.server2.thrift.bind.host
Node70
Hive.server2.long.polling.timeout
5000
Connect to HiveServer2 at the node70 node (the client of hive) (allowing multiple clients to operate concurrently)
Enter: beeline to enter beeline, enter:
! connect jdbc:hive2://node70:10000 yexin 12345
Thank you for your reading, the above is the whole content of "big data HIve data Warehouse Application example Analysis". Friends who learn to learn to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!
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.