In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 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.
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.