直接启动hive后
hive> show databases;
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
查看/tmp/root/hive.log 中日志信息
Caused by: 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-site.xml中配置了<name>hive.metastore.uris</name> 在sparkSQL中使用元数据信息
启动元数据服务后问题解决
bin/hive --service metastore &
bin/hive