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
1 changed files with 3 additions and 1 deletions

View File

@ -114,7 +114,9 @@ public class AllocationFileLoaderService extends AbstractService {
reloadThread = new Thread(() -> {
while (running) {
try {
reloadListener.onCheck();
synchronized (this) {
reloadListener.onCheck();
}
long time = clock.getTime();
long lastModified =
fs.getFileStatus(allocFile).getModificationTime();