首先创建catelog,
CREATE EXTERNAL CATALOG hive_metastore_catalog
PROPERTIES (“hive.metastore.uris” = “thrift://192.168.0.156:9083,thrift://192.168.0.164:9083”,
“metastore_cache_refresh_interval_sec” = “30”,
“type” = “hive”,
“enable_metastore_cache” = “true”
);
然后
SET CATALOG hive_metastore_catalog
use dim;
select * from xx limit 1
执行sql一直不出来数据,直到sql超时,日志也不报错,实在不知道怎么排查问题,ps:hive 肯定能连上元数据