[ https://issues.apache.org/jira/browse/FLINK-36604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mingliang Liu resolved FLINK-36604. ----------------------------------- Fix Version/s: 2.1.0 Resolution: Fixed > StreamingJobGraphGenerator::setOperatorConfig checks input serializer lengh > --------------------------------------------------------------------------- > > Key: FLINK-36604 > URL: https://issues.apache.org/jira/browse/FLINK-36604 > Project: Flink > Issue Type: Improvement > Components: API / DataStream > Affects Versions: 1.18.1, 1.20.0 > Reporter: Mingliang Liu > Assignee: Mingliang Liu > Priority: Major > Labels: pull-request-available > Fix For: 2.1.0 > > > Currently {{StreamingJobGraphGenerator::setOperatorConfig}} does not check > the input serializers length, and always assumes it's valid. Actually, as > serializers can be null and hence filtered out, the input serializers array > could be empty. When this happens, the error message is cryptical to users, > for example: > {code:java} > java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 > at > org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.setOperatorConfig(StreamingJobGraphGenerator.java:1081) > at > org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createChain(StreamingJobGraphGenerator.java:740) > at > org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createChain(StreamingJobGraphGenerator.java:688) > at > org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.setChaining(StreamingJobGraphGenerator.java:654) > at > org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:254) > at > org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:160) > at > org.apache.flink.streaming.api.graph.StreamGraph.getJobGraph(StreamGraph.java:1035) > at > org.apache.flink.client.StreamGraphTranslator.translateToJobGraph(StreamGraphTranslator.java:56) > at > org.apache.flink.client.FlinkPipelineTranslationUtil.getJobGraph(FlinkPipelineTranslationUtil.java:45) > at > org.apache.flink.client.deployment.executors.PipelineExecutorUtils.getJobGraph(PipelineExecutorUtils.java:61) > at > org.apache.flink.client.deployment.executors.LocalExecutor.getJobGraph(LocalExecutor.java:105) > at > org.apache.flink.client.deployment.executors.LocalExecutor.execute(LocalExecutor.java:82) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:2238) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:2125) > at > org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:68) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:2099) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:2077) > {code} > We can add a precondition check and report meaningful error message for > debugging. -- This message was sent by Atlassian Jira (v8.20.10#820010)