YARN-845. RM crash with NPE on NODE_UPDATE (Mayank Bansal via bikas)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1499886 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5428bfbf53
commit
eff5d9b17e
@ -663,6 +663,8 @@ Release 2.1.0-beta - 2013-07-02
|
||||
mechanisms are enabled and thus fix YARN/MR test failures after HADOOP-9421.
|
||||
(Daryn Sharp and Vinod Kumar Vavilapalli via vinodkv)
|
||||
|
||||
YARN-845. RM crash with NPE on NODE_UPDATE (Mayank Bansal via bikas)
|
||||
|
||||
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
|
||||
|
||||
YARN-158. Yarn creating package-info.java must not depend on sh.
|
||||
|
@ -801,9 +801,10 @@ private synchronized FiCaSchedulerApp getApplication(
|
||||
if (reservedContainer != null) {
|
||||
FiCaSchedulerApp application =
|
||||
getApplication(reservedContainer.getApplicationAttemptId());
|
||||
return
|
||||
assignReservedContainer(application, node, reservedContainer,
|
||||
clusterResource);
|
||||
synchronized (application) {
|
||||
return assignReservedContainer(application, node, reservedContainer,
|
||||
clusterResource);
|
||||
}
|
||||
}
|
||||
|
||||
// Try to assign containers to applications in order
|
||||
|
@ -38,6 +38,7 @@
|
||||
import org.apache.hadoop.yarn.api.records.Priority;
|
||||
import org.apache.hadoop.yarn.api.records.Resource;
|
||||
import org.apache.hadoop.yarn.api.records.ResourceRequest;
|
||||
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
|
||||
import org.apache.hadoop.yarn.factories.RecordFactory;
|
||||
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger;
|
||||
@ -426,6 +427,16 @@ public synchronized void unreserve(FiCaSchedulerNode node, Priority priority) {
|
||||
this.reservedContainers.remove(priority);
|
||||
}
|
||||
|
||||
// reservedContainer should not be null here
|
||||
if (reservedContainer == null) {
|
||||
String errorMesssage =
|
||||
"Application " + getApplicationId() + " is trying to unreserve "
|
||||
+ " on node " + node + ", currently has "
|
||||
+ reservedContainers.size() + " at priority " + priority
|
||||
+ "; currentReservation " + currentReservation;
|
||||
LOG.warn(errorMesssage);
|
||||
throw new YarnRuntimeException(errorMesssage);
|
||||
}
|
||||
// Reset the re-reservation count
|
||||
resetReReservations(priority);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user