码迷,mamicode.com
首页 > 编程语言 > 详细

spark/java连接 kudu incompatible RPC 异常解决

时间:2018-11-08 18:33:33      阅读:507      评论:0      收藏:0      [点我收藏+]

标签:exception   stream   pre   disabled   not   ali   集群   .net   程序   

如果是新搭的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 异常解决

标签:exception   stream   pre   disabled   not   ali   集群   .net   程序   

原文地址:https://www.cnblogs.com/zuoql/p/9930036.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!