Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

kuduClient can't connect to kudu cluster which sentry is enabled

kuduClient can't connect to kudu cluster which sentry is enabled

New Contributor

env

kudu 1.10.0-cdh6.3.0 (rev 048e55b587f608ff68356889635ab4dd9b1582a7)

sentry was enable in cdh (include hive hue hdfs kudu ....)

 

spark-shell

 

scala> import org.apache.kudu.Schema
import org.apache.kudu.Schema

scala> import org.apache.kudu.client.{Delete, Insert, KuduClient, KuduTable, PartialRow, PartitionSchema, SessionConfiguration}
import org.apache.kudu.client.{Delete, Insert, KuduClient, KuduTable, PartialRow, PartitionSchema, SessionConfiguration}

scala> import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.SparkSession

scala> val spark: SparkSession = SparkSession.builder().appName("kuduCreateInputTest").master("local[*]").getOrCreate()
20/01/04 15:50:47 WARN sql.SparkSession$Builder: Using an existing SparkSession; some configuration may not take effect.
spark: org.apache.spark.sql.SparkSession = org.apache.spark.sql.SparkSession@270663e2

scala> val kudu_master = "10.1.20.247:7051,10.1.20.224:7051,10.1.20.164:7051"
kudu_master: String = 10.1.20.247:7051,10.1.20.224:7051,10.1.20.164:7051

scala> val kuduClient: KuduClient = new KuduClient.KuduClientBuilder(kudu_master).build()
kuduClient: org.apache.kudu.client.KuduClient = org.apache.kudu.client.KuduClient@25c4d2a0

scala> val session = kuduClient.newSession()
session: org.apache.kudu.client.KuduSession = org.apache.kudu.client.KuduSession@48e0d3a7

scala> session.setFlushMode(SessionConfiguration.FlushMode.MANUAL_FLUSH)

scala>

scala> val table_name = "kudu_db.test_table1"
table_name: String = kudu_db.test_table1

scala> val kuduTable: KuduTable = kuduClient.openTable(table_name)
org.apache.kudu.client.NonRecoverableException: Could not deserialize the response, incompatible RPC? Error is: error.code
at org.apache.kudu.client.KuduException.transformException(KuduException.java:107)
at org.apache.kudu.client.KuduClient.joinAndHandleException(KuduClient.java:342)
at org.apache.kudu.client.KuduClient.openTable(KuduClient.java:212)
... 51 elided
Caused by: java.lang.RuntimeException: Could not deserialize the response, incompatible RPC? Error is: error.code
at org.apache.kudu.client.KuduRpc.readProtobuf(KuduRpc.java:384)
at org.apache.kudu.client.GetTableSchemaRequest.deserialize(GetTableSchemaRequest.java:79)
at org.apache.kudu.client.RpcProxy.responseReceived(RpcProxy.java:228)
at org.apache.kudu.client.RpcProxy.access$000(RpcProxy.java:60)
at org.apache.kudu.client.RpcProxy$1.call(RpcProxy.java:132)
at org.apache.kudu.client.RpcProxy$1.call(RpcProxy.java:128)
at org.apache.kudu.client.Connection.messageReceived(Connection.java:375)
at org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.apache.kudu.client.Connection.handleUpstream(Connection.java:239)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.apache.kudu.shaded.org.jboss.netty.handler.timeout.ReadTimeoutHandler.messageReceived(ReadTimeoutHandler.java:184)
at org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.apache.kudu.shaded.org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.apache.kudu.shaded.org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.apache.kudu.shaded.org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
at org.apache.kudu.shaded.org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.apache.kudu.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.apache.kudu.shaded.org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.apache.kudu.shaded.org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.apache.kudu.shaded.org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.apache.kudu.shaded.org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
at org.apache.kudu.shaded.org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.apache.kudu.shaded.org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.apache.kudu.shaded.org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.apache.kudu.shaded.org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.apache.kudu.shaded.org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
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)

 

 

kudu master log:

 

W0104 15:50:50.293691 2214 sentry_authz_provider.cc:348] Action <METADATA> on table <kudu_db.test_table1> with authorizable scope <TABLE> is not permitted for user <hdfs>

 

bug the user "hdfs" can query kudu_db.test_table1 in hue;

 

Don't have an account?
Coming from Hortonworks? Activate your account here