[ https://issues.apache.org/jira/browse/FLINK-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14636603#comment-14636603 ]
ASF GitHub Bot commented on FLINK-2391: --------------------------------------- GitHub user ffbin opened a pull request: https://github.com/apache/flink/pull/932 [FLINK-2391]Fix Storm-compatibility FlinkTopologyBuilder.createTopology bug 1.Error Scene: Error happend in program like this: builder.setSpout("source0", new Generator(pt), pt.getInt("sourceParallelism")); builder.setBolt("sa", new RepartPassThroughBolt(pt), pt.getInt("sinkParallelism")).fieldsGrouping("source0", new Fields("id")); builder.setBolt("sink", new Sink(pt), pt.getInt("sinkParallelism")).fieldsGrouping("sa", new Fields("id")); final FlinkLocalCluster cluster = FlinkLocalCluster.getLocalCluster(); cluster.submitTopology("throughput", conf, builder.createTopology()); if the last bolt use fieldsGrouping, createTopology will throw NullPointerException. 2.Reason: where get streaming group attribute index, it get downstream operator outputFields,this is error。Because the last bolt has no outputFields, so the outputSchema of declarer in null and throw NullPointerException. 3.Modify: where get streaming group attribute index, it get upstream operator outputFields. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ffbin/flink FFB_Flink Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/932.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #932 ---- commit e9c098670a14020d38f9b5e05442a2a606d90dcb Author: ffbin <869218...@qq.com> Date: 2015-07-22T09:04:45Z modify ---- > Storm-compatibility:method FlinkTopologyBuilder.createTopology() throws > java.lang.NullPointerException > ------------------------------------------------------------------------------------------------------ > > Key: FLINK-2391 > URL: https://issues.apache.org/jira/browse/FLINK-2391 > Project: Flink > Issue Type: Bug > Components: flink-contrib > Affects Versions: 0.10 > Environment: win7 32bit;linux > Reporter: Huang Wei > Labels: features > Fix For: 0.10 > > Original Estimate: 168h > Remaining Estimate: 168h > > core dumped at FlinkOutputFieldsDeclarer.java : 160(package > FlinkOutputFieldsDeclarer). > code : fieldIndexes[i] = this.outputSchema.fieldIndex(groupingFields.get(i)); > in this line, the var this.outputSchema may be null. -- This message was sent by Atlassian JIRA (v6.3.4#6332)