本地提交遇到Failed to get topology from ZK
回 1楼宁晶的帖子
我是在本地搭建了JStorm环境,进行实验时发现了这个Error,不知道怎么解决...
-------------------------
回 3楼玄弟的帖子
[zk: localhost:2181(CONNECTED) 0] ls /jstorm/topology
[]
[zk: localhost:2181(CONNECTED) 1] get /jstorm/topology
cZxid = 0x35
ctime = Tue May 24 17:56:15 CST 2016
mZxid = 0x35
mtime = Tue May 24 17:56:15 CST 2016
pZxid = 0x1181
cversion = 4
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 1
numChildren = 0
storm list
Successfully get cluster info
{
'nimbus': {
'nimbusMaster': {
'host': '172.28.134.248:8627',
'uptimeSecs': '344'
},
'nimbusSlaves': [],
'supervisorNum': 1,
'totalPortNum': 4,
'usedPortNum': 0,
'freePortNum': 4,
'version': '2.1.1',
'__isset_bitfield': 15
},
'supervisors': [
{
'host': '172.28.134.248',
'supervisorId': 'c1ff5e34-7752-4db6-9828-fee919e7e655',
'uptimeSecs': 300,
'numWorkers': 4,
'numUsedWorkers': 0,
'__isset_bitfield': 7
}
],
'topologies': []
}
貌似上面什么都没有...
以下是我的Topology程序:
public class MyTopology {
public static void main(String[] args) {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout('spout', new SequenceSpout(), 1);
builder.setBolt('split', new Split(), 1).shuffleGrouping('spout');
builder.setBolt('counter', new Counter(), 2).fieldsGrouping('split', new Fields('word'));
Config conf = new Config();
conf.setDebug(true);
conf.setNumWorkers(3);
LocalCluster cluster = new LocalCluster();
cluster.submitTopology('MyWordCounter', conf, builder.createTopology());
}
}
赞0
踩0