通过提交我的拓扑 stormsubmitter.submittopoloy
. 可以在storm ui中看到地形,但发出的数字始终为0。
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("WordSpout", new WordSpout());
builder.setBolt("WordSplitBolt", new WordSplitBolt(),5).shuffleGrouping("WordSpout");
builder.setBolt("WordCountBolt", new WordCountBolt(),5).fieldsGrouping("WordSplitBolt", new Fields("word"));
builder.setBolt("WordReportBolt", new WordReportBolt(),10).globalGrouping("WordCountBolt");
Config cfg = new Config();
cfg.setDebug(true);
try{
StormSubmitter.submitTopology("wordcount-topo", cfg, builder.createTopology());
}
catch (AlreadyAliveException e)
{
}
catch (InvalidTopologyException e)
{
}
catch (AuthorizationException e)
{
}
请参见此处的屏幕截图:https://i.stack.imgur.com/w7jrg.jpg
在中收到以下错误 work.log
文件:
2019-10-16 11:51:08.973 STDERR Thread-0 [INFO] Unrecognized VM option 'PrintGCDateStamps'
2019-10-16 11:51:08.973 STDERR Thread-1 [INFO] [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:artifacts/gc.log instead.
2019-10-16 11:51:08.977 STDERR Thread-0 [INFO] Error: Could not create the Java Virtual Machine.
2019-10-16 11:51:08.978 STDERR Thread-0 [INFO] Error: A fatal exception has occurred. Program will exit.
1条答案
按热度按时间nr9pn0ug1#
修正了,应该是java版本的差异。
目标storm cluster java版本是11。我开发topo的dev环境java版本是8,这导致了这个问题。
调整java版本,使它们相同,然后修复问题