当我尝试以本地模式开发storm-kafka时,我收到了以下信息:
50010 [ProcessThread(sid:0 cport:-1):] INFO o.a.s.s.o.a.z.s.PrepRequestProcessor - 获得用户级KeeperException 处理sessionid时:0x163f707a19f0013输入:create cxid:0x3 zxid:0x59 txntype:-1 reqpath:不适用错误路径:/ tmp / test / KafkaSpout 错误:KeeperErrorCode = / tmp / test / KafkaSpout的NoNode
它似乎与SpoutConfig
中的参数有关
这是我的代码:
BrokerHosts hosts = new ZkHosts("localhost:2181");
SpoutConfig spoutConfig = new SpoutConfig(hosts, topicName, "/tmp/test", "KafkaSpout");
spoutConfig.scheme = new SchemeAsMultiScheme(new StringScheme());
builder.setSpout("KafkaSpout", new KafkaSpout(spoutConfig), 2);
所以如何正确设置zkRoot