How to resolve org.elasticsearch.common.compress.Compressor interface and netty dependency trouble?


(Jörg Prante) #1

Hi kimchy, hi all,

I'm trying to set up a kind of a transport plugin that uses netty, for I'd
like to play with websockets for publish/subscribe.

Because the netty dependency is shaded, I duplicated the maven dependency
for netty.

But this does not work. In org.elasticsearch.transport.netty, the
org.elasticsearch.common.compress.Compressor interface is used:

Compressor compressor = CompressorFactory.compressor(buffer);

with "buffer" being an org.jboss.netty.buffer.ChannelBuffer. Because of the
shading in ES, the ChannelBuffer becomes
org.elasticsearch.common.netty.buffer.ChannelBuffer. As a result, the code
is n longer compilable, because CompressorFactory.compressor() does not
accept my duplicated original netty class.

Is it possible to resolve this?

Am I forced to remove compressing in plugin code? Should I open an issue?
Maybe it is an unwanted issue of the new compress lzf feature.

I would be glad if it is somehow possible to get rid of the nasty
dependency shading at all, it would make life of plugin authors much easier.

Best regards,

Jörg


(system) #2