我正在尝试使用配置单元连接器和 Minio 对象存储从 Presto 中选择 S3。我能够创建一个外部表并运行所有 SQL 查询。但是,S3 Select 似乎不起作用,即使hive.s3select-pushdown.enabled=true在目录文件夹中的属性文件中设置。我在 Minio 服务器上运行了一个数据包跟踪,我只看到正在进行的 GET/LIST 调用,没有看到任何POST /{Key+}?select&select-type=2 HTTP/1.1正在进行的调用。
下面是配置单元属性文件。
hive.metastore.uri=thrift://hadoop-master:9083
hive.s3.path-style-access=true
hive.s3.endpoint=http://X.X.X.X:9000
hive.s3.aws-access-key=minioadmin
hive.s3.aws-secret-key=minioadmin
hive.non-managed-table-writes-enabled=true
hive.storage-format=ORC
hive.s3select-pushdown.enabled=true
Run Code Online (Sandbox Code Playgroud)
我看到 presto 中的 SESSION 参数也设置了相同的设置。
minio.s3_select_pushdown_enabled | true | true
minio.projection_pushdown_enabled | true | true
Run Code Online (Sandbox Code Playgroud)
这就是我从 presto cli 创建外部表的方式。
presto:default> CREATE TABLE nyc_9 ( vendorid VARCHAR, tpep_pickup_datetime VARCHAR, tpep_dropoff_datetime VARCHAR, passenger_count VARCHAR, trip_distance VARCHAR, ratecodeid VARCHAR, store_and_fwd_flag VARCHAR, pulocationid VARCHAR, dolocationid VARCHAR, payment_type VARCHAR, fare_amount VARCHAR, extra VARCHAR, mta_tax VARCHAR, tip_amount …Run Code Online (Sandbox Code Playgroud)