* is added. Present gossip doesn't support more advanced sort of
* reconcilation.
*/
for(String hostname: newHostnames) {
int nodeId = nodeIds.get(hostname);
AdminClient adminClient = new AdminClient("tcp://" + hostname + ":6666",
new AdminClientConfig(),
new ClientConfig());
Versioned<String> versioned = adminClient.metadataMgmtOps.getRemoteMetadata(nodeId,
MetadataStore.CLUSTER_KEY);
Version version = versioned.getVersion();
VectorClock vectorClock = (VectorClock) version;
vectorClock.incrementVersion(nodeId, System.currentTimeMillis());
try {
adminClient.metadataMgmtOps.updateRemoteMetadata(peerNodeId,
MetadataStore.CLUSTER_KEY,
versioned);
adminClient.metadataMgmtOps.updateRemoteMetadata(nodeId,
MetadataStore.CLUSTER_KEY,
versioned);
} catch(VoldemortException e) {
logger.error(e);
}
}
/**
* Finally, verify that all of the nodes have been discovered
*/
assertWithBackoff(1000, 60000, new Attempt() {
private int count = 1;
private AdminClient adminClient = new AdminClient("tcp://" + hostNames.get(0)
+ ":6666",
new AdminClientConfig(),
new ClientConfig());
public void checkCondition() throws Exception, AssertionError {