You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Tzu-Li (Gordon) Tai (JIRA)" <ji...@apache.org> on 2017/07/07 14:43:00 UTC

[jira] [Comment Edited] (FLINK-7133) Fix Elasticsearch version interference

    [ https://issues.apache.org/jira/browse/FLINK-7133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078175#comment-16078175 ] 

Tzu-Li (Gordon) Tai edited comment on FLINK-7133 at 7/7/17 2:42 PM:
--------------------------------------------------------------------

I'm not sure I understand what's happening underneath here.
Is it because {{elasticsearch5}} and {{elasticsearch2}} depends on {{elasticsearch-base}} which then pulls in the shaded asm 4.1, which conflicts with Flink's asm dependency?
If that's the case, wouldn't {{elasticsearch-base}} and {{elasticsearch1}} then always bump into this conflict even if we have two completely separate packages?

Also, I'm curious why this happens only in local mode and not cluster execution.


was (Author: tzulitai):
I'm not sure I understand what's happening underneath here.
Is it because `elasticsearch5` and `elasticsearch2` depends on `elasticsearch-base` which then pulls in the shaded asm 4.1, which conflicts with Flink's asm dependency?
If that's the case, wouldn't `elasticsearch-base` and `elasticsearch1` then always bump into this conflict even if we have two completely separate packages?
Also, I'm curious why this happens only in local mode and not cluster execution.

> Fix Elasticsearch version interference
> --------------------------------------
>
>                 Key: FLINK-7133
>                 URL: https://issues.apache.org/jira/browse/FLINK-7133
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming Connectors
>    Affects Versions: 1.3.0, 1.3.1
>            Reporter: Aljoscha Krettek
>            Priority: Blocker
>             Fix For: 1.3.2
>
>
> At least two users have encountered problems with shading in the Elasticsearch connector:
>  - https://lists.apache.org/thread.html/b5bc1f690dc894ea9a8b69e82c89eb89ba6dfc2fec2588d2ccacee2c@%3Cuser.flink.apache.org%3E
>  - https://lists.apache.org/thread.html/2356670d168f61c20e34611e3c4aeb9c9b3f959f23a9833f631da1ba@%3Cuser.flink.apache.org%3E
> The problem seems to be (quote from the second mail):
> {code}
> I've found out the source of the problem when I build flink locally.
> elastic-search base depends on (by default) ES version 1.7.1 that depends on
> asm 4.1 and that version is shaded to elasticsearch-base-jar. I tried to set
> elasticsearch.version property in Maven to 5.1.2 (the same as elasticsearch5
> connector) but then elasticsearch-base does not compile:
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
> (default-testCompile) on project flink-connector-elasticsearch-base_2.11:
> Compilation failure
> [ERROR]
> /home/adebski/Downloads/flink-release-1.3.1/flink-connectors/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchSinkBaseTest.java:[491,92]
> no suitable constructor found for
> BulkItemResponse(int,java.lang.String,org.elasticsearch.action.ActionResponse)
> [ERROR] constructor
> org.elasticsearch.action.bulk.BulkItemResponse.BulkItemResponse(int,java.lang.String,org.elasticsearch.action.DocWriteResponse)
> is not applicable
> [ERROR] (argument mismatch; org.elasticsearch.action.ActionResponse cannot
> be converted to org.elasticsearch.action.DocWriteResponse)
> [ERROR] constructor
> org.elasticsearch.action.bulk.BulkItemResponse.BulkItemResponse(int,java.lang.String,org.elasticsearch.action.bulk.BulkItemResponse.Failure)
> is not applicable
> [ERROR] (argument mismatch; org.elasticsearch.action.ActionResponse cannot
> be converted to org.elasticsearch.action.bulk.BulkItemResponse.Failure)
> {code}
> To me, it seems like we have to get rid of the "base" package and have two completely separate packages.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)