In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Hive failed to create the table and reported an error:
CREATE TABLE pokes (foo INT, bar STRING);
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(es) : Specified key was too long; max key length is 767 bytes
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
Solution:
mysql> SET @@global.innodb_large_prefix = 1;
mysql> ALTER DATABASE hivedb character set latin1;
Second, the drop table reported the wrong card master, the log did not see the information,
Solution:
Method 1: Finally found the problem is mysql5.6.30, changed a mysql5.1 database version, solve the problem
Method 2: For mysql 5.6.30 bugs, you need to manually initialize the hive metastore, otherwise the user will get stuck when dropping the table. In the dmp-gateway database (mysql specified in the configuration file)
[root@DMP-GATEWAY ~]# cd /opt/amos/hive/bin/
[root@DMP-GATEWAY bin]# ./ schematool -dbType mysql -initSchema
Results:
Starting metastore schema initialization to 1.2.0
Initialization script hive-schema-1.2.0.mysql.sql
Initialization script completed
View database:
[root@DMP-GATEWAY ~]# mysql -uroot -p
mysql> show databases;
--------------------
Database
--------------------
information_schema
exp
hive
hivedb can see that the hivedb database was created
3. After mestatore initialization, hivedb database will be automatically created, all tables will be cleared, or
drop database hivedb
create database hivedb
source hive-txn-schema-0.14.0.mysql.sql
source hive-schema-1.2.0.mysql.sql
Git Address:
https://github.com/apache/hive/tree/release-1.2.1/metastore/scripts/upgrade/mysql
IV. Error reporting
no library native-lzo
yum install -y lzo required
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.