dashboard: Fix empty rule pushing bug of FlowRuleZookeeperPublisher sample (#732)
This commit is contained in:
parent
1d1878c1dd
commit
55838d9fb0
|
|
@ -44,7 +44,7 @@ public class FlowRuleZookeeperPublisher implements DynamicRulePublisher<List<Flo
|
||||||
if (stat == null) {
|
if (stat == null) {
|
||||||
zkClient.create().creatingParentContainersIfNeeded().withMode(CreateMode.PERSISTENT).forPath(path, null);
|
zkClient.create().creatingParentContainersIfNeeded().withMode(CreateMode.PERSISTENT).forPath(path, null);
|
||||||
}
|
}
|
||||||
byte[] data = CollectionUtils.isEmpty(rules) ? "".getBytes() : converter.convert(rules).getBytes();
|
byte[] data = CollectionUtils.isEmpty(rules) ? "[]".getBytes() : converter.convert(rules).getBytes();
|
||||||
zkClient.setData().forPath(path, data);
|
zkClient.setData().forPath(path, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue