YARN-8391. Investigate AllocationFileLoaderService.reloadListener locking issue. Contributed by Szilard Nemeth.

This commit is contained in:
Miklos Szegedi 2018-06-20 10:29:12 -07:00
parent 4939ffedb1
commit 9a9e969570

View File

@ -114,7 +114,9 @@ public void serviceInit(Configuration conf) throws Exception {
reloadThread = new Thread(() -> {
while (running) {
try {
reloadListener.onCheck();
synchronized (this) {
reloadListener.onCheck();
}
long time = clock.getTime();
long lastModified =
fs.getFileStatus(allocFile).getModificationTime();