栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Embedded metastore is not allowed. Make sure you have set a valid value for hive.metastore.uris

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Embedded metastore is not allowed. Make sure you have set a valid value for hive.metastore.uris

flink集成hive 启动:flink-sql 报错:

./sql-client.sh embedded

报错如下:

2021-12-18 17:49:42,129 INFO  org.apache.hadoop.hive.conf.HiveConf                         [] - Found configuration file file:/home/hadoop/apps/hive-3.1.2/conf/hive-site.xml


Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue.
    at org.apache.flink.table.client.SqlClient.main(SqlClient.java:215)
Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Could not create execution context.
    at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:972)
    at org.apache.flink.table.client.gateway.local.LocalExecutor.openSession(LocalExecutor.java:225)
    at org.apache.flink.table.client.SqlClient.start(SqlClient.java:108)
    at org.apache.flink.table.client.SqlClient.main(SqlClient.java:201)
Caused by: java.lang.IllegalArgumentException: Embedded metastore is not allowed. Make sure you have set a valid value for hive.metastore.uris
    at org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:138)
    at org.apache.flink.table.catalog.hive.HiveCatalog.(HiveCatalog.java:182)
    at org.apache.flink.table.catalog.hive.HiveCatalog.(HiveCatalog.java:168)
    at org.apache.flink.table.catalog.hive.HiveCatalog.(HiveCatalog.java:164)
    at org.apache.flink.table.catalog.hive.factories.HiveCatalogFactory.createCatalog(HiveCatalogFactory.java:89)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.createCatalog(ExecutionContext.java:396)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.lambda$null$5(ExecutionContext.java:684)
    at java.util.HashMap.forEach(HashMap.java:1288)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.lambda$initializeCatalogs$6(ExecutionContext.java:681)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.wrapClassLoader(ExecutionContext.java:265)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.initializeCatalogs(ExecutionContext.java:677)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.initializeTableEnvironment(ExecutionContext.java:565)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.(ExecutionContext.java:187)
    at org.apache.flink.table.client.gateway.local.ExecutionContext.(ExecutionContext.java:138)
    at org.apache.flink.table.client.gateway.local.ExecutionContext$Builder.build(ExecutionContext.java:961)
    ... 3 more

原因:

Flink 集成 Hive 时,不支持 embedded metastore 的, 需要起一个hive metastore 并在conf文件配置,在server端中,hive.metastore.uris为none,在client端中,hive.metastore.uris要配置相应的值: 如 thrift://192.168.56.101:9083


首先查配置文件,需要在hive-site.xml中添加下面的依赖


    hive.metastore.uris
    thrift://192.168.56.101:9083

然后启动   nohup hive --service metastore >/dev/null 2>&1 &

再启动       nohup hive --service hiveserver2 >/dev/null 2>&1 &

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/678606.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号