YARN-4424. Fix deadlock in RMAppImpl. (Jian he via wangda)

(cherry picked from commit 7e4715186d)

Conflicts:
	hadoop-yarn-project/CHANGES.txt

(cherry picked from commit 7013f9d6cd)

Conflicts:
	hadoop-yarn-project/CHANGES.txt
This commit is contained in:
Wangda Tan 2015-12-08 14:25:16 -08:00
parent c4ae007fd4
commit a4ba6c8525
2 changed files with 10 additions and 14 deletions

View File

@ -2000,6 +2000,8 @@ Release 2.6.3 - UNRELEASED
YARN-4434. NodeManager Disk Checker parameter documentation is not correct.
(Weiwei Yang via aajisaka)
YARN-4424. Fix deadlock in RMAppImpl. (Jian he via wangda)
Release 2.6.2 - 2015-10-28
INCOMPATIBLE CHANGES

View File

@ -490,21 +490,15 @@ public class RMAppImpl implements RMApp, Recoverable {
@Override
public FinalApplicationStatus getFinalApplicationStatus() {
this.readLock.lock();
try {
// finish state is obtained based on the state machine's current state
// as a fall-back in case the application has not been unregistered
// ( or if the app never unregistered itself )
// when the report is requested
if (currentAttempt != null
&& currentAttempt.getFinalApplicationStatus() != null) {
return currentAttempt.getFinalApplicationStatus();
}
return
createFinalApplicationStatus(this.stateMachine.getCurrentState());
} finally {
this.readLock.unlock();
// finish state is obtained based on the state machine's current state
// as a fall-back in case the application has not been unregistered
// ( or if the app never unregistered itself )
// when the report is requested
if (currentAttempt != null
&& currentAttempt.getFinalApplicationStatus() != null) {
return currentAttempt.getFinalApplicationStatus();
}
return createFinalApplicationStatus(this.stateMachine.getCurrentState());
}
@Override