Skip to content

Commit

Permalink
Update node list on workers
Browse files Browse the repository at this point in the history
Some connectors require an active list of all worers on worker nodes.  This
commit restores this behavior which was recently removed.
  • Loading branch information
dain committed Jan 23, 2019
1 parent 14db5b5 commit 17112e0
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,14 @@ private static PrestoNode findCurrentNode(List<ServiceDescriptor> allServices, S
@PostConstruct
public void startPollingNodeStates()
{
// poll worker states only on the coordinators
if (currentNode.isCoordinator()) {
nodeStateUpdateExecutor.scheduleWithFixedDelay(() -> {
try {
pollWorkers();
}
catch (Exception e) {
log.error(e, "Error polling state of nodes");
}
}, 5, 5, TimeUnit.SECONDS);
}
nodeStateUpdateExecutor.scheduleWithFixedDelay(() -> {
try {
pollWorkers();
}
catch (Exception e) {
log.error(e, "Error polling state of nodes");
}
}, 5, 5, TimeUnit.SECONDS);
pollWorkers();
}

Expand Down

0 comments on commit 17112e0

Please sign in to comment.