YARN-7689. TestRMContainerAllocator fails after YARN-6124. Contributed by Wilfred Spiegelenburg.

This commit is contained in:
Miklos Szegedi 2018-01-09 16:59:39 -08:00
parent 8ee7080e5d
commit 55066cc53d
4 changed files with 3 additions and 10 deletions

View File

@ -170,7 +170,8 @@ public abstract class AbstractYarnScheduler
// the NM in the next heartbeat.
private boolean autoUpdateContainers = false;
protected SchedulingMonitorManager schedulingMonitorManager;
protected SchedulingMonitorManager schedulingMonitorManager =
new SchedulingMonitorManager();
/**
* Construct the service.
@ -230,9 +231,7 @@ public abstract class AbstractYarnScheduler
updateThread.interrupt();
updateThread.join(THREAD_JOIN_TIMEOUT_MS);
}
if (schedulingMonitorManager != null) {
schedulingMonitorManager.stop();
}
super.serviceStop();
}

View File

@ -62,7 +62,6 @@ import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes;
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
import org.apache.hadoop.yarn.server.resourcemanager.monitor.SchedulingMonitorManager;
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
import org.apache.hadoop.yarn.server.resourcemanager.placement.ApplicationPlacementContext;
import org.apache.hadoop.yarn.server.resourcemanager.placement.PlacementFactory;
@ -398,7 +397,6 @@ public class CapacityScheduler extends
super.serviceInit(conf);
initScheduler(configuration);
// Initialize SchedulingMonitorManager
schedulingMonitorManager = new SchedulingMonitorManager();
schedulingMonitorManager.initialize(rmContext, conf);
}

View File

@ -52,7 +52,6 @@ import org.apache.hadoop.yarn.security.YarnAuthorizationProvider;
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
import org.apache.hadoop.yarn.server.resourcemanager.RMCriticalThreadUncaughtExceptionHandler;
import org.apache.hadoop.yarn.server.resourcemanager.monitor.SchedulingMonitorManager;
import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore.RMState;
import org.apache.hadoop.yarn.server.resourcemanager.reservation.ReservationConstants;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
@ -1366,7 +1365,6 @@ public class FairScheduler extends
super.serviceInit(conf);
// Initialize SchedulingMonitorManager
schedulingMonitorManager = new SchedulingMonitorManager();
schedulingMonitorManager.initialize(rmContext, conf);
}

View File

@ -46,7 +46,6 @@ import org.apache.hadoop.yarn.factories.RecordFactory;
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
import org.apache.hadoop.yarn.server.resourcemanager.monitor.SchedulingMonitorManager;
import org.apache.hadoop.yarn.server.resourcemanager.nodelabels.RMNodeLabelsManager;
import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore.RMState;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent;
@ -258,7 +257,6 @@ public class FifoScheduler extends
super.serviceInit(conf);
// Initialize SchedulingMonitorManager
schedulingMonitorManager = new SchedulingMonitorManager();
schedulingMonitorManager.initialize(rmContext, conf);
}