执行时报错: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
问题原因:
未启动hive metastore。
解决方法:
启动hive metastore即可
>/yourpath/hive/bin/hive --service metastore
此时,hive metastore仅仅在当前控制台运行时有效。
>/yourpath/hive/bin/hive --service metastore 2>&1 >> yourpath/hive/var/log.log &
此时,metastore将会在后台启动,但仅仅在当前控制台运行时有效。
>nohup /yourpath/hive/bin/hive --service metastore 2>&1 >> yourpath/hive/var/log.log &
此时,metastore将会在后台启动,且控制台关闭时仍然有效。