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;

问题解决.