aws-emr-presto使用aws-glue找不到正确的配置单元模式

pkwftd7m  于 2021-06-26  发布在  Hive
关注(0)|答案(3)|浏览(476)

因此,我有一个问题,能够通过aws电子病历执行presto查询。
我已经启动了一个运行hive/presto并使用aws glue作为元存储的emr。
当我ssh到主节点并运行hive时,我可以运行“showschemas它向我展示了aws胶水上的3个不同的数据库。
如果我随后进入presto cli并运行“show schemas on hive”,我只会看到两个“default”和“information\u schema”
就我的一生而言,我不明白为什么普雷斯托不能看到相同的Hive模式。
它是emr上的一个基本默认集群启动,主要使用默认设置。
有人能告诉我该找什么吗?我已经检查了hive.properties文件,看起来不错,我只是不知道为什么presto不能看到与hive相同的信息。
我有以下配置集

[{"classification":"hive-site", "properties":{"hive.metastore.client.factory.class":"com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory"}, "configurations":[]}]

aws文件http://docs.aws.amazon.com/emr/latest/releaseguide/emr-hive-metastore-glue.html 让它看起来应该是即插即用,但我显然错过了一些东西

nkhmeac6

nkhmeac61#

看起来这在emr-5.10中已经解决了。要添加以下配置:

{"Classification":"presto-connector-hive","Properties":{"hive.metastore.glue.datacatalog.enabled": "true"}}

资料来源:https://docs.aws.amazon.com/emr/latest/releaseguide/emr-presto-glue.html

wi3ka0sx

wi3ka0sx2#

从amazon emr 5.10.0版开始,您可以。只需将hive.metastore.glue.datacatalog.enabled属性设置为true,如下所示:

[
  {
    "Classification": "presto-connector-hive",
    "Properties": {
      "hive.metastore.glue.datacatalog.enabled": "true"
    }
  }
]

也可以手动设置 hive.metastore.glue.datacatalog.enabled=true/etc/presto/conf/catalog/hive.properties 主节点上的文件。如果使用此方法,请确保 hive.table-statistics-enabled=false 因为数据目录不支持配置单元表和分区统计信息,所以设置了属性文件中的。如果将长时间运行的集群上的值更改为切换元存储,则必须重新启动主节点上的presto服务器( sudo restart presto-server ).
来源:aws文件

svdrlsy4

svdrlsy43#

最近发布的0.198版本的presto现在支持aws glue作为元数据源。
添加对使用aws glue作为元存储的支持。通过将hive.metastore config属性设置为glue来启用它。
https://prestodb.io/docs/current/release/release-0.198.html

相关问题