Flink升级到1.4版本遇到的坑
2020-01-15 06:38
423 查看
Flink 1.4没出来以前,一直使用Flink 1.3.2,感觉还算稳定,最近将运行环境升级到1.4,遇到了一些坑:
1.需要将可运行程序,基于1.4.0重新编译一次
2.对比了一下flink-conf.yml中的配置,发现一处不同点:
# The port under which the web-based runtime monitor listens.
# A value of -1 deactivates the web server.
1.3.2:jobmanager.web.port: 8081
1.4.0:web.port: 8081
1.4.0 少了前面的“jobmanager”,但是查看官网1.4.0的文档,配置项却是:jobmanager.web.port(https://ci.apache.org/projects/flink/flink-docs-release-1.4/ops/config.html)
查看源代码,原来是两个都行,不过后面应该建议都用web开头的,改了还不少:
3.在Configuration的Common Options部分,1.4多了如下的东西:
classloader.resolve-order: Whether Flink should use a child-first ClassLoader when loading
user-code classes or a parent-first ClassLoader. Can be one of parent-first or child-first. (default: child-first) classloader.parent-first-patterns: A (semicolon-separated) list of patterns that specifies
which classes should always be resolved through the parent ClassLoader first.
A pattern is a simple prefix that is checked against the fully qualified class name.
By default, this is set to java.;org.apache.flink.;javax.annotation;org.slf4j;org.apache.log4j;org.apache.logging.log4j;ch.qos.logback.
If you want to change this setting you have to make sure to also include the default patterns in your list of patterns if you want to keep that default behaviour.
Flink程序,原来在1.3.2上跑着没问题,换到1.4后,总是报:
java.lang.LinkageError: loader constraint violation:
loader (instance of org/apache/flink/runtime/execution/librarycache/FlinkUserCodeClassLoaders$ChildFirstClassLoader)
previously initiated loading for a different type with name "scala/collection/Iterable"
查看发布说明,才知道默认类加载顺序变了:
https://flink.apache.org/news/2017/12/12/release-1.4.0.html
在flink-conf.yml中配置了
classloader.resolve-order: parent-first
后问题解决
所以每个版本的发布说明,得仔细看清楚。
转载于:https://www.cnblogs.com/liugh/p/8057656.html
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- Flink升级到1.4版本遇到的坑
- 解决升级go版本遇到的Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.问题
- 从Spark1.4版本升级为Spark2.2.1所遇到的坑
- lucene版本升级到4.6.0以上之后使用mmseg4j分词器遇到的问题
- jQuery1.9+ 废弃的函数和方法 升级Jquery版本遇到的问题
- 程序从Silverlight 2 Beta2升级到Silverlight 2 Release版本时遇到的几个问题
- 升级Android支持库版本遇到的两个问题
- spring-cloud Finchley.M9搭建oauth2 jwt以及版本升级中遇到的坑
- 升级CentOS 5.3遇到Python版本不匹配问题?
- Android Studio 2.3.*升级到3.0遇到的问题和解决版本
- 2016 cocoapods的安装和使用以及版本升级遇到的问题
- 旧版本scrapy升级新版本遇到的一些问题
- Android Studio NDK版本升级遇到的问题(16升级到18)及差异
- 升级Android支持库版本遇到的两个问题
- AndroidStudio低版本(1.5)升级到高版本(2.1)之后你可能会遇到的其中一个项目构建问题
- php版本从5.1升级到5.3遇到的问题与解决方式
- 升级MySQL 5.7版本遇到的一些小问题
- App版本更新时对SQLite数据库升级或者降级遇到的问题
- jQuery1.9+ 废弃的函数和方法 升级Jquery版本遇到的问题
- 升级Android支持库版本遇到的两个问题