In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you the example analysis of hive in hadoop, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1.1 download hbase http://osdn.jp/projects/sfnet_purehadoop/downloads/hive-0.12.0.tar.gz/
1.2 install [root@hadoop04 Desktop] # tar-zxvf hive-0.12.0.tar.gz-C.. / app/
[root@hadoop04 Desktop] # cd.. / app
[root@hadoop04 app] # ls
Hive-0.12.0
[root@hadoop04 app] # cd hive-0.12.0
[root@hadoop04 hive-0.12.0] # cd bin
[root@hadoop04 bin] #. / hive
Hive > show databases
OK
Default
Time taken: 23.804 seconds, Fetched: 1 row (s)
Hive > create database yun12
>
OK
Time taken: 24.355 seconds
Hive > show databases
>
OK
Default
Yun12
Time taken: 4.162 seconds, Fetched: 2 row (s)
Hive > create table t_mygirls (id int,name string, age int, size string)
OK
Time taken: 28.528 seconds
Hive > show tables
OK
T_mygirls
Time taken: 0.062 seconds, Fetched: 1 row (s)
Hive > drop table t_mygirls
OK
Time taken: 2.772 seconds
Hive > create table t_mygirls (id int,name string, age int, size string) row format
> delimited
> fields terminated by "\ t"
Http://192.168.88.166:50070/explorer.html#/user/hive/warehouse
Browse Directory
PermissionOwnerGroupSizeReplicationBlock SizeNamedrwxr-xr-xrootsupergroup0 B00 Bt_mygirlsdrwxr-xr-xrootsupergroup0 B00 Byun12.db
[root@hadoop06 hadoop-2.6.0] # vi mygirls.data
1 baby 18 36C
2 YIFEI 19 38d
3 yangmi 20 31q
4 zhiling 40 39t
[root@hadoop04 ~] # hadoop fs-put mygirls.data / user/hive/warehouse/t_mygirls (path to the t_mygirls folder)
Hive > select * from t_mygirls
OK
The above is all the content of the article "sample Analysis of hive in hadoop". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.