spark1.6.3+elasticsearch5.4 netty jar冲突

作者: luyee2010   发布时间:2017-07-10
spark1.6.x   elasticsearch5.x  
 
netty冲突
 
(Netty4Utils:117)-NoSuchMethodError io.netty.buffer.CompositeByteBuf.addComponents(ZLjava/lang/Iterable;)Lio/netty/buffer/CompositeByteBuf;
at org.elasticsearch.transport.netty4.Netty4Utils.toByteBuf(Netty4Utils.Java:78)
at org.elasticsearch.transport.netty4.Netty4Transport.sendMessage(Netty4Transport.java:422)
at org.elasticsearch.transport.netty4.Netty4Transport.sendMessage(Netty4Transport.java:93)
at org.elasticsearch.transport.TcpTransport.internalSendMessage(TcpTransport.java:1058)
at org.elasticsearch.transport.TcpTransport.sendRequestToChannel(TcpTransport.java:1040)
 试过其他jar排除方案都不生效,暂时可以fix的解决方案
 
```
.put("transport.type","netty3")
```

1 个评论

一个解决第三方包依赖冲突的方法是,将ES里冲突的包shade起来。 参考: https://www.elastic.co/blog/to-shade-or-not-to-shade

要回复文章请先登录注册