YARN-5798. Set UncaughtExceptionHandler for all FairScheduler threads. (Yufei Gu via kasha)
This commit is contained in:
parent
11be3f70e0
commit
74dd142250
|
@ -51,6 +51,7 @@ import org.apache.hadoop.yarn.security.PrivilegedEntity.EntityType;
|
||||||
import org.apache.hadoop.yarn.security.YarnAuthorizationProvider;
|
import org.apache.hadoop.yarn.security.YarnAuthorizationProvider;
|
||||||
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
|
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
|
||||||
|
import org.apache.hadoop.yarn.server.resourcemanager.RMCriticalThreadUncaughtExceptionHandler;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore.RMState;
|
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.reservation.ReservationConstants;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceWeights;
|
import org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceWeights;
|
||||||
|
@ -1268,12 +1269,16 @@ public class FairScheduler extends
|
||||||
|
|
||||||
updateThread = new UpdateThread();
|
updateThread = new UpdateThread();
|
||||||
updateThread.setName("FairSchedulerUpdateThread");
|
updateThread.setName("FairSchedulerUpdateThread");
|
||||||
|
updateThread.setUncaughtExceptionHandler(
|
||||||
|
new RMCriticalThreadUncaughtExceptionHandler(rmContext));
|
||||||
updateThread.setDaemon(true);
|
updateThread.setDaemon(true);
|
||||||
|
|
||||||
if (continuousSchedulingEnabled) {
|
if (continuousSchedulingEnabled) {
|
||||||
// start continuous scheduling thread
|
// start continuous scheduling thread
|
||||||
schedulingThread = new ContinuousSchedulingThread();
|
schedulingThread = new ContinuousSchedulingThread();
|
||||||
schedulingThread.setName("FairSchedulerContinuousScheduling");
|
schedulingThread.setName("FairSchedulerContinuousScheduling");
|
||||||
|
schedulingThread.setUncaughtExceptionHandler(
|
||||||
|
new RMCriticalThreadUncaughtExceptionHandler(rmContext));
|
||||||
schedulingThread.setDaemon(true);
|
schedulingThread.setDaemon(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1299,6 +1304,8 @@ public class FairScheduler extends
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
protected void createPreemptionThread() {
|
protected void createPreemptionThread() {
|
||||||
preemptionThread = new FSPreemptionThread(this);
|
preemptionThread = new FSPreemptionThread(this);
|
||||||
|
preemptionThread.setUncaughtExceptionHandler(
|
||||||
|
new RMCriticalThreadUncaughtExceptionHandler(rmContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateReservationThreshold() {
|
private void updateReservationThreshold() {
|
||||||
|
|
Loading…
Reference in New Issue