use of org.voltdb.AbstractTopology in project voltdb by VoltDB.
the class TopologyZKUtils method readTopologyFromZK.
public static AbstractTopology readTopologyFromZK(ZooKeeper zk) {
AbstractTopology topology = null;
try {
byte[] data = zk.getData(VoltZK.topology, false, null);
String jsonTopology = new String(data, Charsets.UTF_8);
topology = AbstractTopology.topologyFromJSON(jsonTopology);
} catch (KeeperException | InterruptedException | JSONException e) {
VoltDB.crashLocalVoltDB("Unable to read topology from ZK, dying", true, e);
}
return topology;
}
Aggregations