YARN-4581. AHS writer thread leak makes RM crash while RM is recovering. Contributed by sandflee.

(cherry picked from commit fc6d3a3b23)

Conflicts:

	hadoop-yarn-project/CHANGES.txt
This commit is contained in:
Junping Du 2016-01-15 08:40:56 -08:00
parent a2d0c8ff9c
commit e09222306f
2 changed files with 20 additions and 6 deletions

View File

@ -1200,6 +1200,9 @@ Release 2.8.0 - UNRELEASED
YARN-4534. Remove the redundant symbol in yarn rmadmin help msg. YARN-4534. Remove the redundant symbol in yarn rmadmin help msg.
(Lin Yiqun via aajisaka) (Lin Yiqun via aajisaka)
YARN-4581. AHS writer thread leak makes RM crash while RM is recovering.
(sandflee via junping_du)
Release 2.7.3 - UNRELEASED Release 2.7.3 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES
@ -1264,6 +1267,9 @@ Release 2.7.3 - UNRELEASED
YARN-4414. Nodemanager connection errors are retried at multiple levels YARN-4414. Nodemanager connection errors are retried at multiple levels
(Chang Li via jlowe) (Chang Li via jlowe)
YARN-4581. AHS writer thread leak makes RM crash while RM is recovering.
(sandflee via junping_du)
Release 2.7.2 - UNRELEASED Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES
@ -2156,6 +2162,9 @@ Release 2.6.4 - UNRELEASED
YARN-4414. Nodemanager connection errors are retried at multiple levels YARN-4414. Nodemanager connection errors are retried at multiple levels
(Chang Li via jlowe) (Chang Li via jlowe)
YARN-4581. AHS writer thread leak makes RM crash while RM is recovering.
(sandflee via junping_du)
Release 2.6.3 - 2015-12-17 Release 2.6.3 - 2015-12-17
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -734,12 +734,17 @@ public class FileSystemApplicationHistoryStore extends AbstractService
} else { } else {
fsdos = fs.create(historyFile); fsdos = fs.create(historyFile);
} }
try {
fs.setPermission(historyFile, HISTORY_FILE_UMASK); fs.setPermission(historyFile, HISTORY_FILE_UMASK);
writer = writer =
new TFile.Writer(fsdos, MIN_BLOCK_SIZE, getConfig().get( new TFile.Writer(fsdos, MIN_BLOCK_SIZE, getConfig().get(
YarnConfiguration.FS_APPLICATION_HISTORY_STORE_COMPRESSION_TYPE, YarnConfiguration.FS_APPLICATION_HISTORY_STORE_COMPRESSION_TYPE,
YarnConfiguration.DEFAULT_FS_APPLICATION_HISTORY_STORE_COMPRESSION_TYPE), null, YarnConfiguration.DEFAULT_FS_APPLICATION_HISTORY_STORE_COMPRESSION_TYPE), null,
getConfig()); getConfig());
} catch (IOException e) {
IOUtils.cleanup(LOG, fsdos);
throw e;
}
} }
public synchronized void close() { public synchronized void close() {