[jira] [Created] (FLINK-20350) [Kinesis][GCP PubSub] Incompatible Connectors due to Guava conflict

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20350) [Kinesis][GCP PubSub] Incompatible Connectors due to Guava conflict

Shang Yuanchun (Jira)
Danny Cranmer created FLINK-20350:
-------------------------------------

             Summary: [Kinesis][GCP PubSub] Incompatible Connectors due to Guava conflict
                 Key: FLINK-20350
                 URL: https://issues.apache.org/jira/browse/FLINK-20350
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Google Cloud PubSub, Connectors / Kinesis
    Affects Versions: 1.11.2, 1.11.1
            Reporter: Danny Cranmer


*Problem*
Kinesis and GCP PubSub connector do not work together. The following error is thrown.

{code}
java.lang.NoClassDefFoundError: Could not initialize class io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder
        at org.apache.flink.streaming.connectors.gcp.pubsub.DefaultPubSubSubscriberFactory.getSubscriber(DefaultPubSubSubscriberFactory.java:52) ~[flink-connector-gcp-pubsub_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.connectors.gcp.pubsub.PubSubSource.createAndSetPubSubSubscriber(PubSubSource.java:213) ~[flink-connector-gcp-pubsub_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.connectors.gcp.pubsub.PubSubSource.open(PubSubSource.java:102) ~[flink-connector-gcp-pubsub_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:36) ~[flink-core-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102) ~[flink-streaming-java_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:291) ~[flink-streaming-java_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$0(StreamTask.java:473) ~[flink-streaming-java_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.runThrowing(StreamTaskActionExecutor.java:92) ~[flink-streaming-java_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:469) ~[flink-streaming-java_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:522) ~[flink-streaming-java_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:721) ~[flink-runtime_2.11-1.11.1.jar:1.11.1]
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:546) ~[flink-runtime_2.11-1.11.1.jar:1.11.1]
        at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_252]
{code}

*Cause*
This is caused by a Guava dependency conflict:
- Kinesis Consumer > {{18.0}}
- GCP PubSub > {{26.0-android}}

{{NettyChannelBuilder}} fails to initialise due to missing method in guava:
- {{com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V}}

*Possible Fixes*
- Align Guava versions
- Shade Guava in either connector



--
This message was sent by Atlassian Jira
(v8.3.4#803005)