我在cassandra sink相关代码中遇到运行时异常:
07/16/2018 17:09:48 Job execution switched to status FAILING.
java.lang.NoSuchMethodError: com.datastax.driver.core.BoundStatement.set(ILjava/lang/Object;Lorg/apache/flink/cassandra/shaded/com/google/common/reflect/TypeToken;)Lcom/datastax/driver/core/BoundStatement;
我还有另一个依赖项,它也使用datastax驱动程序和cassandra flink连接器。
我试图从flink cassandra连接器中排除datastax驱动程序,但没有按预期工作
我的sbt依赖项如下所示:
val datafeedsDeltaStreamDeps: Seq[ModuleID] = commonDependencies ++ flinkDeps ++ Seq(
"org.apache.flink" %% "flink-connector-cassandra" % "1.4.1" excludeAll ExclusionRule(organization = "com.datastax"), <<< I tried to exclude the data stax from the flink cassandra connector
"com.dy.productfeed" %% "feedsinterface" % "0.4.0", << this also has a cassandra dependency in it
CommonDependencies.statsdClient
)
但我仍然看到Flink包裹下的“Cassandra”司机
1条答案
按热度按时间9jyewag01#
datastax库在flink-cassandra-connector.jar中有阴影,所以不能排除它。如果需要特定的datastax版本,可以使用以下命令针对该版本构建flink源代码: