flink-user-zh mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guanyq <dlgua...@163.com>
Subject Re:回复:flink1.9,state process api 读取MapState,出错
Date Thu, 30 Apr 2020 02:54:19 GMT
我把静态类替换成List<String>也还报同样错误
附件是代码

















在 2020-04-30 10:32:26,"shao.hongxiao" <17611022895@163.com> 写道:
>是不是静态内部类的问题?
>Rules for POJO types
>
>Flink recognizes a data type as a POJO type (and allows “by-name” field referencing)
if the following conditions are fulfilled:
>
>The class is public and standalone (no non-static inner class)
>The class has a public no-argument constructor
>All non-static, non-transient fields in the class (and all superclasses) are either public
(and non-final) or have a public getter- and a setter- method that follows the Java beans
naming conventions for getters and setters.
>
>Note that when a user-defined data type can’t be recognized as a POJO type, it must
be processed as GenericType and serialized with Kryo.
>
>
>
>| |
>邵红晓
>|
>|
>邮箱:17611022895@163.com
>|
>签名由网易邮箱大师定制
>在2020年4月30日 09:40,shx<17611022895@163.com> 写道:
>能发一下写入状态的代码看一下吗,还有一个问题,键值状态访问,你的代码里是读出了所有key关键的mapstate吗,谢谢
>
>
>
>
>| |
>邵红晓
>|
>|
>邮箱:17611022895@163.com
>|
>
>签名由 网易邮箱大师 定制
>
>在2020年04月30日 09:04,guanyq 写道:
>代码中没特别指定Serializer。都是默认的序列化。
>在 2020-04-29 18:20:22,"Congxian Qiu" <qcx978132955@gmail.com> 写道:
>Hi
>从错误日志看,是 StateMigration 相关的问题。
>你需要确认下,你的代码中的 Serializer 和 savepoint 中 state 相关的 serializer
>是一样的或者是兼容的,你可以参考下这个文档[1]
>
>[1]
>https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/stream/state/schema_evolution.html
>
>Best,
>Congxian
>
>
>guanyq <dlguanyq@163.com> 于2020年4月29日周三 下午6:09写道:
>
>
>附件是代码和错误日志。目前不知道如何调查。麻烦帮忙看下 谢谢。
Mime
View raw message