flink的内存缓存(scala)?无法加载guava

lztngnrs  于 2021-06-21  发布在  Flink
关注(0)|答案(1)|浏览(447)

我想在我的flink作业(scala)中使用内存缓存,这样我就可以为密钥设置ttl(生存时间)。我一直在寻找解决办法,找到了Guava。但是,我不确定它是否适用于flink(v1.6.3-scala),因为我无法在flinkshell中加载任何版本的guava。

scala> :require flink-shaded-guava-18.0-6.0.jar
The path 'flink-shaded-guava-18.0-6.0.jar' cannot be loaded, because existing classpath entries conflict.

scala> :require flink-shaded-guava-18.0-5.0.jar
The path 'flink-shaded-guava-18.0-5.0.jar' cannot be loaded, because existing classpath entries conflict.

scala> :require flink-shaded-guava-18.0-4.0.jar
The path 'flink-shaded-guava-18.0-4.0.jar' cannot be loaded, because existing classpath entries conflict.

scala> :require flink-shaded-guava-18.0-3.0.jar
The path 'flink-shaded-guava-18.0-3.0.jar' cannot be loaded, because existing classpath entries conflict.

scala> :require flink-shaded-guava-18.0-2.0.jar
The path 'flink-shaded-guava-18.0-2.0.jar' cannot be loaded, because existing classpath entries conflict.

scala> :require flink-shaded-guava-18.0-1.0.jar
The path 'flink-shaded-guava-18.0-1.0.jar' cannot be loaded, because existing classpath entries conflict.

有别的选择吗?对解决这个错误有帮助吗?

ygya80vv

ygya80vv1#

也许你可以在Flink1.6中尝试使用ttl的FlinkNative键控状态。看这里,Flink医生。。

相关问题