In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-10-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Hive
Installation steps:
JAVA realizes reading files
But using hive is easier.
Hive can turn files into tables, saving only the table structure in the database mysql, but the data is still in the file
File---->database--->table
---->deby---->mysql(save table structure information)
installation
1. Unzip it first and then put the database connection driver into hive110/lib
tar zxvf hive-1.1.0-cdh6.14.2.tar.gzmv hive-1.1.0-cdh6.14.2 /opt/bigdata/hive110
2. Configuration env file
cd /opt/bigdata/hive110/confcp hive-env.sh.template hive-env.shvi hive-env.sh
3. Configure site.xml
Put it under hive10/conf
javax.jdo.option.ConnectionURL jdbc:mysql://169.254.211.100:3306/hive? createDatabaseIfNotExist=true javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName root javax.jdo.option.ConnectionPassword root
4. Configure environment variables
vi /etc/profliesource /etc/profile
5. Enter bin to run hive
schematool -initSchema -dbType mysqlhivecreate table userinfos(userid int);
6. Use Hive to insert data
insert into userinfos values(1);
7. Using hadoop to view data
hdfs dfs -text /user/hive/warehouse/userinfos/000000_0
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.