trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.32k stars 2.97k forks source link

Support kerberos authentication for Hudi tables #5472

Closed taqianw closed 4 years ago

taqianw commented 4 years ago

Hi,

My Hive and HDFS Cluster is Kerberos enabled, When I connect the hudi table through Presto's hive connector,I can show tables and describe hudi table's structure,but I can not select data ,there is error as following:

2020-09-30T10:27:29.063Z    DEBUG   query-execution-1   io.prestosql.execution.QueryStateMachine    Query 20200930_102728_00010_hnygc failed
io.prestosql.spi.PrestoException: Error checking Hoodie partition metadata for hdfs://xxx:8020/warehouse/tablespace/managed/hive/icosdata.db/avro_test2_mor
    at io.prestosql.plugin.hive.BackgroundHiveSplitLoader$HiveSplitLoaderTask.process(BackgroundHiveSplitLoader.java:223)
    at io.prestosql.plugin.hive.util.ResumableTasks$1.run(ResumableTasks.java:38)
    at io.prestosql.$gen.Presto_332____20200930_102455_2.run(Unknown Source)
    at io.airlift.concurrent.BoundedExecutor.drainQueue(BoundedExecutor.java:78)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.hudi.exception.HoodieException: Error checking Hoodie partition metadata for hdfs://xxx:8020/warehouse/tablespace/managed/hive/icosdata.db/avro_test2_mor
    at org.apache.hudi.common.model.HoodiePartitionMetadata.hasPartitionMetadata(HoodiePartitionMetadata.java:143)
    at org.apache.hudi.hadoop.HoodieParquetInputFormat.getTableMetaClient(HoodieParquetInputFormat.java:306)
    at org.apache.hudi.hadoop.InputPathHandler.parseInputPaths(InputPathHandler.java:98)
    at org.apache.hudi.hadoop.InputPathHandler.<init>(InputPathHandler.java:58)
    at org.apache.hudi.hadoop.HoodieParquetInputFormat.listStatus(HoodieParquetInputFormat.java:73)
    at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:325)
    at io.prestosql.plugin.hive.BackgroundHiveSplitLoader.loadPartition(BackgroundHiveSplitLoader.java:407)
    at io.prestosql.plugin.hive.BackgroundHiveSplitLoader.loadSplits(BackgroundHiveSplitLoader.java:287)
    at io.prestosql.plugin.hive.BackgroundHiveSplitLoader.access$300(BackgroundHiveSplitLoader.java:107)
    at io.prestosql.plugin.hive.BackgroundHiveSplitLoader$HiveSplitLoaderTask.process(BackgroundHiveSplitLoader.java:216)
    ... 6 more
Caused by: java.io.IOException: DestHost:destPort xxx:8020 , LocalHost:localPort presto-coordinator/172.17.0.9:0. Failed on local exception: java.io.IOException: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]

But other hive tables have no problem.

Here are some of Presto's configurations:

Anyone has occured this problem?

Thanks.

findepi commented 4 years ago

@taqianw can you possibly test whether https://github.com/prestosql/presto/pull/5478 solves the issue for you?

taqianw commented 4 years ago

Thank you. It solved my problem,now presto works well.

findepi commented 4 years ago

@taqianw thanks for confirming

liijiankang commented 2 years ago

When the query time is long, such as more than an hour, this problem still occurs.