You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Angus Xiao (JIRA)" <ji...@apache.org> on 2019/07/08 11:57:00 UTC

[jira] [Commented] (FLINK-12297) Make ClosureCleaner recursive

    [ https://issues.apache.org/jira/browse/FLINK-12297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16880249#comment-16880249 ] 

Angus Xiao commented on FLINK-12297:
------------------------------------

Did this recursive closure cleaner import a bug when cleaning an object with recursive references? [~aitozi] [~aljoscha]

I got an stackoverflow exception when clean a function with a JsonRowDeserializationSchema object. It seems the 

objectMapper field has recursive references. So I added a set to avoid this. Is this right?

  !image-2019-07-08-19-54-04-416.png!

> Make ClosureCleaner recursive
> -----------------------------
>
>                 Key: FLINK-12297
>                 URL: https://issues.apache.org/jira/browse/FLINK-12297
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataSet, API / DataStream
>    Affects Versions: 1.8.0
>            Reporter: Dawid Wysakowicz
>            Assignee: Aitozi
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 1.8.1, 1.9.0
>
>         Attachments: image-2019-07-08-19-54-04-416.png
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Right now we do not invoke closure cleaner on output tags. Therefore such code:
> {code}
> 	@Test
> 	public void testFlatSelectSerialization() throws Exception {
> 		StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
> 		DataStreamSource<Integer> elements = env.fromElements(1, 2, 3);
> 		OutputTag<Integer> outputTag = new OutputTag<Integer>("AAA") {};
> 		CEP.pattern(elements, Pattern.begin("A")).flatSelect(
> 			outputTag,
> 			new PatternFlatTimeoutFunction<Integer, Integer>() {
> 				@Override
> 				public void timeout(
> 					Map<String, List<Integer>> pattern,
> 					long timeoutTimestamp,
> 					Collector<Integer> out) throws Exception {
> 				}
> 			},
> 			new PatternFlatSelectFunction<Integer, Object>() {
> 				@Override
> 				public void flatSelect(Map<String, List<Integer>> pattern, Collector<Object> out) throws Exception {
> 				}
> 			}
> 		);
> 		env.execute();
> 	}
> {code}
> will fail with {{The implementation of the PatternFlatSelectAdapter is not serializable. }} exception



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)