Skip to content

Commit

Permalink
Merge pull request #25 from vinted/bugfix/fix_sweeper_executor_thread…
Browse files Browse the repository at this point in the history
…_shutdown

Fix Sweeper executor thread shutdown
  • Loading branch information
saulius committed May 27, 2016
2 parents 6b9e6f3 + 883f86e commit 0c428c6
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -217,8 +217,6 @@ public void run() throws Exception
try
{
runCollectorForTopicDir(fs, topicName, new Path(topic.getPath(), sourceSubdir), destinationPath);
log.info("Shutting down priority executor");
executorService.shutdown();
}
catch (Exception e)
{
Expand All @@ -229,6 +227,11 @@ public void run() throws Exception
}
}

if (!executorService.isTerminated()) {
log.info("Shutting down priority executor");
executorService.shutdown();
}

while (!executorService.isTerminated())
{
executorService.awaitTermination(30, TimeUnit.SECONDS);
Expand Down

0 comments on commit 0c428c6

Please sign in to comment.