一、hive創(chuàng)建表失敗,報(bào)錯(cuò):
創(chuàng)新互聯(lián)建站是一家專注于網(wǎng)站建設(shè)、成都網(wǎng)站制作與策劃設(shè)計(jì),耀州網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)建站做網(wǎng)站,專注于網(wǎng)站建設(shè)十載,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:耀州等地區(qū)。耀州做網(wǎng)站價(jià)格咨詢:028-86922220
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
解決方法:
mysql> SET @@global.innodb_large_prefix = 1;
mysql> ALTER DATABASE hivedb character set latin1;
二、drop表報(bào)錯(cuò)卡主,日志看不到信息,
解決方法:
方法一:最后找到問題是mysql5.6.30,換了一個(gè)mysql5.1數(shù)據(jù)庫(kù)版本,解決問題
方法二:針對(duì)mysql5.6.30的bug,需要手動(dòng)初始化hive metastore,否則用戶在drop table時(shí)候會(huì)卡主。在dmp-gateway數(shù)據(jù)庫(kù)(配置文件中指定的mysql)
[root@DMP-GATEWAY ~]# cd /opt/amos/hive/bin/
[root@DMP-GATEWAY bin]# ./schematool -dbType mysql –initSchema
結(jié)果:
Starting metastore schema initialization to 1.2.0
Initialization script hive-schema-1.2.0.mysql.sql
Initialization script completed
查看數(shù)據(jù)庫(kù):
[root@DMP-GATEWAY ~]# mysql -uroot –p
mysql> show databases;
--------------------
Database
--------------------
information_schema
exp
hive
hivedb 可以看到hivedb數(shù)據(jù)庫(kù)被創(chuàng)建
三、在mestatore初始化后,會(huì)自動(dòng)創(chuàng)建hivedb數(shù)據(jù)庫(kù),清空所有表,或者
drop database hivedb
create database hivedb
source hive-txn-schema-0.14.0.mysql.sql
source hive-schema-1.2.0.mysql.sql
git地址:
https://github.com/apache/hive/tree/release-1.2.1/metastore/scripts/upgrade/mysql
四、報(bào)錯(cuò)
no library native-lzo
需要 yum install -y lzo
當(dāng)前名稱:hive創(chuàng)建表失敗,drop表失敗
分享地址:http://jinyejixie.com/article36/jjhisg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營(yíng)銷、自適應(yīng)網(wǎng)站、外貿(mào)建站、云服務(wù)器、網(wǎng)站設(shè)計(jì)、網(wǎng)頁(yè)設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)