|
@@ -66,6 +66,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
|
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
|
|
import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
|
|
|
import org.apache.hadoop.yarn.server.resourcemanager.amlauncher.ApplicationMasterLauncher;
|
|
|
+import org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.ProportionalCapacityPreemptionPolicy;
|
|
|
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
|
|
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler;
|
|
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler;
|
|
@@ -227,6 +228,9 @@ public class SLSRunner extends Configured implements Tool {
|
|
|
if (Class.forName(schedulerClass) == CapacityScheduler.class) {
|
|
|
rmConf.set(YarnConfiguration.RM_SCHEDULER,
|
|
|
SLSCapacityScheduler.class.getName());
|
|
|
+ rmConf.setBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, true);
|
|
|
+ rmConf.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
|
|
|
+ ProportionalCapacityPreemptionPolicy.class.getName());
|
|
|
} else if (Class.forName(schedulerClass) == FairScheduler.class) {
|
|
|
rmConf.set(YarnConfiguration.RM_SCHEDULER,
|
|
|
SLSFairScheduler.class.getName());
|