Skip to content

[FLINK-2391]Fix Storm-compatibility FlinkTopologyBuilder.createTopology bug - #940

Closed
ffbin wants to merge 1 commit into
apache:masterfrom
ffbin:Feature2
Closed

[FLINK-2391]Fix Storm-compatibility FlinkTopologyBuilder.createTopology bug#940
ffbin wants to merge 1 commit into
apache:masterfrom
ffbin:Feature2

Conversation

@ffbin

@ffbin ffbin commented Jul 27, 2015

Copy link
Copy Markdown
Contributor

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:
Save operator declarer in one hashmap. Get producer declarer from hashmap when get upstream operator outputFields.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: prodDeclarer (not procDeclarer)

@mjsax

mjsax commented Jul 27, 2015

Copy link
Copy Markdown
Member

LGTM. Let's see if Travis passes. Before merging, you need to update your commit message to be meaningful.

@mjsax

mjsax commented Jul 27, 2015

Copy link
Copy Markdown
Member

Your commit message is still not ok. You update the GitHub description, but not the commit message. It is still "modify". You need to do a git commit --amend -m "New commit message". The commit message should relate to the JIRA, ie, "[FLINK-2391] Storm-compatibility:method FlinkTopologyBuilder.createTopology() throws java.lang.NullPointerException"

@rmetzger

Copy link
Copy Markdown
Contributor

By the way, you don't need to open another pull request for updating it.
Just force-push into the branch this PR is based on (Feature2).

…teTopology() throws java.lang.NullPointerException bug
@ffbin

ffbin commented Jul 27, 2015

Copy link
Copy Markdown
Contributor Author

Thank you very much!

@mjsax

mjsax commented Jul 27, 2015

Copy link
Copy Markdown
Member

+1 for merging

@StephanEwen

Copy link
Copy Markdown
Contributor

Will merge this...

@asfgit asfgit closed this in ada9037 Jul 29, 2015
@mjsax

mjsax commented Jul 30, 2015

Copy link
Copy Markdown
Member

Thanks for reporting the bug and providing a fix.

@ffbin
ffbin deleted the Feature2 branch August 14, 2015 01:26
nikste pushed a commit to nikste/flink that referenced this pull request Sep 29, 2015
…teTopology() throws java.lang.NullPointerException bug

This closes apache#940
nltran pushed a commit to nltran/flink that referenced this pull request Jan 8, 2016
…teTopology() throws java.lang.NullPointerException bug

This closes apache#940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants