一、hive方面
hive有三种模式:cli、hwi、hiveserver;
cli:即shell命令行
hwi:是通过浏览器访问
hiveserver:也就是JDBC/ODBC接口
其中hwi没有用到
深入浅出学hive:http://sishuok.com/forum/blogPost/list/6220.html(初学hive,这个系列介绍的很不错)
启动hiveserver:
1.org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
可能原因:默认端口10000已被占用
查看端口是否被占用: netstat -ntulp | grep ':10000'
发现被一个java进程占用
解决方法:另起端口开启hiveserver:hive --service hiveserver -p 10001
2.启动hiveserver卡住
网上一些博客解释说是已经在运行,不用担心http://www.cnblogs.com/sh91/archive/2012/08/03/2621911.html
启动hive(cli)
1.执行语句出错(例如show tables)
FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
可能原因:metadata相关,也就是和连接mysql有关了(采用mysql作为hive的元数据库)
采用debug模式启动hive cli:hive -hiveconf hive.root.logger=DEBUG,