Presto - Ranger Проблема с Hive Connector
У нас есть коннектор Presto(версия - 323-E.8) с включенным Ranger кластером CDP Hive3, где я могу выполнить запрос выбора в существующих таблицах Hive ORC с форматированием, но не могу создавать или удалять какие-либо представления в хранилище метаданных Hive. Это вызывает ошибку с разрешениями, и мой администратор предоставил все разрешения пользователю из Ranger и AD, и я могу выполнять все операции из beeline с тем же пользователем на сервере. Свойства улья:
*connector.name=hive-hadoop2
hive.metastore.uri=thrift://XXXXX
hive.views-execution.enabled=true
hive.metastore.authentication.type=KERBEROS
hive.metastore.service.principal=hive/_HOST@XXXX
hive.metastore.client.principal=XXXXX
hive.metastore.client.keytab=/abc/xxxx.keytab
hive.hdfs.wire-encryption.enabled=false
hive.metastore.thrift.impersonation.enabled=true
hive.config.resources=/etc/cdp/core-site.xml,/etc/cdp/hdfs-site.xml,/etc/cdp/hive-site.xml
hive.hdfs.authentication.type=KERBEROS
hive.hdfs.presto.principal=hdfs/_HOST@XXXXX
hive.hdfs.presto.principal=XXXX
hive.hdfs.presto.keytab=/abc/xxxx.keytab
hive.security=ranger
ranger.policy-rest-url=https://XXXXX:6182
ranger.service-name=cm_hive
ranger.authentication-type=KERBEROS
ranger.kerberos-principal=XXXX
ranger.kerberos-keytab=/abc/xxxx.keytab
ranger.plugin-policy-ssl-config-file=/abc/ssl-client.xml*
Ошибка: io.prestosql.spi.PrestoException: тип операции CREATE_VIEW не разрешен для пользователя:XXXXX в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable(ThriftHiveMetastore.java.1036prest) в.metastore.thrift.BridgingHiveMetastore.createTable(BridgingHiveMetastore.java:184) в io.prestosql.plugin.hive.metastore.cache.CachingHiveMetastore.createTable (CachingHiveMetastore) в io.qio.prestosql..CachingHiveMetastore.createTable(CachingHiveMetastore.java:524) в io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore$CreateTableOperation.run(SemiTransactionmetastore $ CreateTableOperation.run ($ SemiTransactionmetalHiveMetastore.hiveMetastore.java. (SemiTransactionalHiveMetastore.java:1668) в io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore$Committer.access$1000(SemiTransactionalHiveMetastore.java:1282) в io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore.commitShared.java.jstore.commitShared.jpg..SemiTransactionalHiveMetastore.commit(SemiTransactionalHiveMetastore.java:991) на io.prestosql.plugin.hive.HiveMetadata.commit(HiveMetadata.java:2408) на io.prestosql.plugin.Connector.hive.comHive (HiveMetadata.java:2408) на io.prestosql.plugin.Connector.hive.comHive io.prestosql.transaction.InMemoryTransactionManager$TransactionMetadata$ConnectorTransactionMetadata.commit(InMemoryTransactionManager.java:595) в java.util.concurrent.Executors$RunnableAdapter.call(Executors.java.google.com).TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) на com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) на com.google.common.util.concurrent.TrustedListenableFutureTask.78.runableFutureTask.78.run в io.airlift.concurrent.BoundedExecutor.drainQueue (BoundedExecutor.java:78) в java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) в java.util.concurrent.Executor.java.ua:624) в java.lang.Thread.run(Thread.java:748) Вызвано: org.apache.hadoop.hive.metastore.api.MetaException: тип операции CREATE_VIEW не разрешен для пользователя:XXXXX в org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_result$create_table_resultStandardScheme.read(ThriftHiveMetastore.java:52658) в org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$create_table_result$create_table_resultStandardScheme.read(ThriftHiveMetastore.java:52626) по адресу org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.hive.metastore.api.ThriftHiveMetastore.java:TServiceClient.receiveBase(TServiceClient.java:86) по адресу org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_create_table(ThriftHiveMetastore.java:1490) по адресу org.apache.hadastoreft.hive.hive. Client.create_table(ThriftHiveMetastore.java:1477) в sun.reflect.NativeMethodAccessorImpl.invoke0(собственный метод) в sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) в sun.reflect.java:43) в java.lang.reflect.Method.invoke(Method.java:498) по адресу io.prestosql.plugin.base.util.LoggingInvocationHandler.handleInvocation(LoggingInvocationHandler.java:60) по адресу com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java. Proxy370.create_table(Неизвестный источник) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient.createTable(ThriftHiveMetastoreClient.java:161) по адресу io $.prestosql.plugin.ThriftTive.metas ($51).prestosql.plugin.Thrift. ThriftHiveMetastore.java:1024) по адресу io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreApiStats.lambda$wrap$0(ThriftMetastoreApiStats.java:42) по адресу io.prestosql.Dritil.http: //dritil.html.:130) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable(ThriftHiveMetastore.java:1022) ... еще 19prestosql.plugin.base.util.LoggingInvocationHandler.handleInvocation (LoggingInvocationHandler.java:60) на com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86) на com. Источник) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient.createTable(ThriftHiveMetastoreClient.java:161) в io.prestosql.plugin.hive.metastore.thriftda.ThriftHive.lt (ThriftHiveMetastoreClient.) в io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreApiStats.lambda$wrap$0(ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.river.run.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19prestosql.plugin.base.util.LoggingInvocationHandler.handleInvocation (LoggingInvocationHandler.java:60) на com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86) на com. Исходный код) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient.createTable(ThriftHiveMetastoreClient.java:161) в io.prestosql.plugin.hive.metastore.thriftda.ThriftHive.lt (ThriftHiveMetastoreClient.ThriftHive.) в io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreApiStats.lambda$wrap$0(ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.river.run.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19LoggingInvocationHandler.handleInvocation (LoggingInvocationHandler.java:60) по адресу com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86) по адресу com.sun.proxy. $ Proxy370.create_table io.plugin (Неизвестный источник).hive.metastore.thrift.ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.java:161) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda Thrift.Thrift.ThriftHiveMetastore.lambda $ create10plugin.java: $51 hive.metastore.thrift.ThriftMetastoreApiStats.lambda $ wrap $ 0 (ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java:130) в io.prestosql..thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19LoggingInvocationHandler.handleInvocation (LoggingInvocationHandler.java:60) по адресу com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86) по адресу com.sun.proxy. $ Proxy370.create_table io.plugin (Неизвестный источник).hive.metastore.thrift.ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.java:161) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda Thrift.Thrift.ThriftHiveMetastore.lambda $ create10plugin.java: $51 hive.metastore.thrift.ThriftMetastoreApiStats.lambda $ wrap $ 0 (ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java:130) в io.prestosql..thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19handleInvocation (LoggingInvocationHandler.java:60) на com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86) на com.sun.proxy. $ Proxy370.create_table(Неизвестный источник) на io.prestginosql.plu..metastore.thrift.ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.java:161) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda $ createrestgin.hriftHiveMetastore. metastore.thrift.ThriftMetastoreApiStats.lambda $ wrap $ 0 (ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java.hive.hive:130) в io.prestlugin..ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19handleInvocation (LoggingInvocationHandler.java:60) на com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:86) на com.sun.proxy. $ Proxy370.create_table(Неизвестный источник) на io.prestginosql.plu..metastore.thrift.ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.java:161) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda $ createrestgin.hriftHiveMetastore. metastore.thrift.ThriftMetastoreApiStats.lambda $ wrap $ 0 (ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java.hive.hive:130) в io.prestlugin..ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19invoke (AbstractInvocationHandler.java:86) в com.sun.proxy. $ Proxy370.create_table(Неизвестный источник) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.createTable (ThriftHiveMetoslastoreClient) atjava.client).plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda $ createTable $51 (ThriftHiveMetastore.java:1024) в io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreApiStats.laspi.ru ($ atlastoreApiStats).prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java:130) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore)... 1910 больше:10invoke (AbstractInvocationHandler.java:86) в com.sun.proxy. $ Proxy370.create_table(Неизвестный источник) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.createTable (ThriftHiveMetastoreClient.createTable (ThriftHiveMetoslastoreClient) atjava.client).plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda $ createTable $51 (ThriftHiveMetastore.java:1024) в io.prestosql.plugin.hive.metastore.thrift.ThriftMetastoreApiStats.laspi.ua.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java:130) в io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore)... 1910 больше:10createTable (ThriftHiveMetastoreClient.java:161) по адресу io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda $ createTable $51 (ThriftHiveMetastore.java:1024) в io.prestosql.hive.hive.html. $ wrap $ 0 (ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java:130) в io.prestosql.plugin.hive.metastore.thriftate.TriftHive.metastore.thriftate. java: 1022)... еще 19createTable (ThriftHiveMetastoreClient.java:161) по адресу io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore.lambda $ createTable $51 (ThriftHiveMetastore.java:1024) в io.prestosql.hive.hive.html. $ wrap $ 0 (ThriftMetastoreApiStats.java:42) в io.prestosql.plugin.hive.util.RetryDriver.run (RetryDriver.java:130) в io.prestosql.plugin.hive.metastore.thriftateMastore.ThriftHive. java: 1022)... еще 19hive.metastore.thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19hive.metastore.thrift.ThriftHiveMetastore.createTable (ThriftHiveMetastore.java:1022)... еще 19