use of com.bakdata.conquery.models.messages.namespaces.specific.RequestConsistency in project conquery by bakdata.
the class RegisterWorker method react.
@Override
public void react(ManagerNodeNetworkContext context) throws Exception {
ShardNodeInformation node = getShardNode(context);
Wait.builder().stepTime(Duration.ofMillis(5)).total(Duration.ofSeconds(10)).build().until(() -> getShardNode(context) != null);
if (node == null) {
throw new IllegalStateException("Could not find the slave " + context.getRemoteAddress() + " to register worker " + info.getId());
}
info.setConnectedShardNode(node);
context.getNamespaces().register(node, info);
// Request consistency report
context.getNamespaces().getWorkers().get(info.getId()).send(new RequestConsistency());
}
Aggregations