Skip to content

Commit

Permalink
Call open before discover. This will avoid discover being called befo…
Browse files Browse the repository at this point in the history
…re open (apache#7703)

Co-authored-by: Sanjeev Kulkarni <[email protected]>
  • Loading branch information
srkukarni and Sanjeev Kulkarni authored Jul 30, 2020
1 parent c7dc782 commit bbd5fa1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ private void start() throws Exception {
// This is the first thing to do to ensure that any tasks discovered during the discover
// phase are not lost
setupInstanceSubscription();
batchSource.open(this.config, this.sourceContext);
if (sourceContext.getInstanceId() == 0) {
discoveryTriggerer.init(batchSourceConfig.getDiscoveryTriggererConfig(),
this.sourceContext);
discoveryTriggerer.start(this::triggerDiscover);
}
batchSource.open(this.config, this.sourceContext);
}

private void triggerDiscover(String discoveredEvent) {
Expand Down

0 comments on commit bbd5fa1

Please sign in to comment.