You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Ethan Li (JIRA)" <ji...@apache.org> on 2017/10/03 18:53:00 UTC
[jira] [Created] (STORM-2769) Fast-fail if output stream Id is null
Ethan Li created STORM-2769:
-------------------------------
Summary: Fast-fail if output stream Id is null
Key: STORM-2769
URL: https://issues.apache.org/jira/browse/STORM-2769
Project: Apache Storm
Issue Type: Bug
Reporter: Ethan Li
Assignee: Ethan Li
Priority: Minor
If we accidentally set null to output stream Id and end up with the code like:
{code:java}
@Override
public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declareStream(null, new Fields("word", "count"));
}
{code}
We could get the following exception:
{code:java}
java.lang.NullPointerException
at org.apache.thrift.protocol.TBinaryProtocol.writeString(TBinaryProtocol.java:200)
at org.apache.storm.generated.ComponentCommon$ComponentCommonStandardScheme.write(ComponentCommon.java:739)
at org.apache.storm.generated.ComponentCommon$ComponentCommonStandardScheme.write(ComponentCommon.java:636)
at org.apache.storm.generated.ComponentCommon.write(ComponentCommon.java:556)
at org.apache.storm.generated.Bolt$BoltStandardScheme.write(Bolt.java:477)
at org.apache.storm.generated.Bolt$BoltStandardScheme.write(Bolt.java:427)
at org.apache.storm.generated.Bolt.write(Bolt.java:362)
at org.apache.storm.generated.StormTopology$StormTopologyStandardScheme.write(StormTopology.java:1483)
at org.apache.storm.generated.StormTopology$StormTopologyStandardScheme.write(StormTopology.java:1254)
at org.apache.storm.generated.StormTopology.write(StormTopology.java:1110)
at org.apache.storm.generated.Nimbus$submitTopology_args$submitTopology_argsStandardScheme.write(Nimbus.java:7676)
at org.apache.storm.generated.Nimbus$submitTopology_args$submitTopology_argsStandardScheme.write(Nimbus.java:7601)
at org.apache.storm.generated.Nimbus$submitTopology_args.write(Nimbus.java:7528)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:71)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
at org.apache.storm.generated.Nimbus$Client.send_submitTopology(Nimbus.java:304)
at org.apache.storm.generated.Nimbus$Client.submitTopology(Nimbus.java:293)
at org.apache.storm.StormSubmitter.submitTopologyInDistributeMode(StormSubmitter.java:332)
at org.apache.storm.StormSubmitter.submitTopologyAs(StormSubmitter.java:266)
at org.apache.storm.StormSubmitter.submitTopology(StormSubmitter.java:393)
at org.apache.storm.StormSubmitter.submitTopology(StormSubmitter.java:165)
at org.apache.storm.topology.ConfigurableTopology.submit(ConfigurableTopology.java:94)
at org.apache.storm.starter.WordCountTopology.run(WordCountTopology.java:100)
at org.apache.storm.topology.ConfigurableTopology.start(ConfigurableTopology.java:70)
at org.apache.storm.starter.WordCountTopology.main(WordCountTopology.java:79)
{code}
It's because null in map is not supported by thrift. We should check stream Id not null [here|https://github.com/apache/storm/blob/master/storm-client/src/jvm/org/apache/storm/topology/OutputFieldsGetter.java#L42]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)