HDFS-13799. TestEditLogTailer#testTriggersLogRollsForAllStandbyNN fails due to missing synchronization

between rollEditsRpcExecutor and tailerThread shutdown. Contributed by Hrishikesh Gadre.
This commit is contained in:
Xiao Chen 2018-08-07 16:11:37 -07:00 committed by Arpit Agarwal
parent e4b75ad583
commit 754069906b
1 changed files with 2 additions and 1 deletions

View File

@ -234,7 +234,6 @@ public class EditLogTailer {
}
public void stop() throws IOException {
rollEditsRpcExecutor.shutdown();
tailerThread.setShouldRun(false);
tailerThread.interrupt();
try {
@ -242,6 +241,8 @@ public class EditLogTailer {
} catch (InterruptedException e) {
LOG.warn("Edit log tailer thread exited with an exception");
throw new IOException(e);
} finally {
rollEditsRpcExecutor.shutdown();
}
}