use of com.linkedin.d2.quorum.ZKQuorum in project rest.li by linkedin.
the class TestD2ConfigWithZKQuorum method setup.
private void setup() throws Exception {
// Start _quorum
_quorum = new ZKQuorum(QUORUM_SIZE);
_quorum.startAll();
_quorum.assertAllPeersUp();
}
use of com.linkedin.d2.quorum.ZKQuorum in project rest.li by linkedin.
the class TestD2ZKQuorumFailover method setup.
private void setup() throws IOException, Exception {
// Start _quorum
_quorum = new ZKQuorum(QUORUM_SIZE);
_quorum.startAll();
_quorum.assertAllPeersUp();
_zkUriString = "zk://" + _quorum.getHosts();
_zkHosts = _quorum.getHosts().split(",");
// Register clusters/services with zookeeper _quorum
LoadBalancerClientCli.runDiscovery(_quorum.getHosts(), "/d2", D2_CONFIG_DATA);
// Echo servers startup
startAllEchoServers();
assertAllEchoServersRunning(_echoServers);
// Get LoadBalancer Client
_cli = new LoadBalancerClientCli(_quorum.getHosts(), "/d2");
_client = _cli.createZKFSTogglingLBClient(_quorum.getHosts(), "/d2", null);
assertAllEchoServersRegistered(_cli.getZKClient(), _zkUriString, _echoServers);
assertQuorumProcessAllRequests(D2_CONFIG_DATA);
}
use of com.linkedin.d2.quorum.ZKQuorum in project rest.li by linkedin.
the class TestPartitionsWithZKQuorum method setup.
private void setup() throws IOException, Exception {
// Start _quorum
_quorum = new ZKQuorum(QUORUM_SIZE);
_quorum.startAll();
_zkUriString = "zk://" + _quorum.getHosts();
_zkHosts = _quorum.getHosts().split(",");
_quorum.assertAllPeersUp();
}
Aggregations