spark/java连接 kudu incompatible RPC 异常解决
Posted zuoql
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spark/java连接 kudu incompatible RPC 异常解决相关的知识,希望对你有一定的参考价值。
如果是新搭的CDH 集群并使用默认的kudu设置, 使用spark /java 连接kudu时候,一般都会碰到此类异常。
程序:
val masteraddr = "kudumasterip:7051"
//创建kudu的数据库链接
val client = new KuduClient.KuduClientBuilder(masteraddr).build
//打开表
val table = client.openTable("impala::testdb.PERSON")
异常信息:
java.lang.RuntimeException: Could not deserialize the response, incompatible RPC? Error is: step
at org.apache.kudu.client.KuduRpc.readProtobuf(KuduRpc.java:383)
at org.apache.kudu.client.Negotiator.parseSaslMsgResponse(Negotiator.java:282)
at org.apache.kudu.client.Negotiator.handleResponse(Negotiator.java:235)
at org.apache.kudu.client.Negotiator.messageReceived(Negotiator.java:229)
at org.apache.kudu.client.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.apache.kudu.client.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.client.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.apache.kudu.client.shaded.org.jboss.netty.handler.timeout.ReadTimeoutHandler.messageReceived(ReadTimeoutHandler.java:184)
at org.apache.kudu.client.shaded.org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.apache.kudu.client.shaded.org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.apache.kudu.client.shaded.org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
解决方法:
在CDH 页面上设置kudu 高级配置项:
-rpc_encryption=disabled
-rpc_authentication=disabled
-trusted_subnets=0.0.0.0/0
以上是关于spark/java连接 kudu incompatible RPC 异常解决的主要内容,如果未能解决你的问题,请参考以下文章
Azure Web App 在 Kudu Env 中未显示连接字符串
Flink Sql 自定义实现 kudu connector
kudu未解决 Flink 读取 kudu KuduReaderIterator not found it may have expired