1.在HIVE中測試是否能正常建表結果報錯,報錯如下:
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: org.apache.hadoop.security.AccessControlException Permission denied: user=root, access=WRITE, inode="/":hadoop:supergroup:drwxr-xr-x
根據提示得知root用戶沒有HADOOP目錄的執行權限,於是想了個笨辦法,把hive用hadoop用戶運行
#chown hadoop:hadoop /hive
#/bin/hive
hive>create table test(name String);
成功
2.建立測試表報錯提示:
NestedThrowablesStackTrace:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
在mysql命令行運行:
alter database hive character set latin1;
問題解決.