A simple online wordcount go wrong:
Unable to get offset lags for kafka. "Reason: Java. Lang. NullPointerException at org. Apache. Storm. Kafka. Monitor. KafkaOffsetLagUtil.
GetOffsetLags (KafkaOffsetLagUtil. Java: 272) at org. Apache. Storm. Kafka. Monitor. KafkaOffsetLagUtil. Main (KafkaOffsetLagUtil. Java: 124)
TopologyBuilder TopologyBuilder=new TopologyBuilder ();
SpoutConfig SpoutConfig=new SpoutConfig (
New ZkHosts (" kong2 kong1:2181:2181, kong3:2181, kong4:2181, kong5:2181 "),
"WordCount,"
"/wordCount",
"WordCount");
SpoutConfig. StartOffsetTime=kafka. API. OffsetRequest. LatestTime ();
TopologyBuilder. SetSpout (" KafkaSpout ", new KafkaSpout (spoutConfig), 2);
Bolt1 topologyBuilder. SetBolt (", "new MySplitBolt (), 4). ShuffleGrouping (" KafkaSpout");
Bolt2 topologyBuilder. SetBolt (", "new MyWordCountAndPrintBolt (), 2). The shuffleGrouping (" bolt1");