|
@@ -249,8 +249,6 @@ public class CapacityScheduler extends
|
|
|
|
|
|
private CSMaxRunningAppsEnforcer maxRunningEnforcer;
|
|
|
|
|
|
- private boolean activitiesManagerEnabled = true;
|
|
|
-
|
|
|
public CapacityScheduler() {
|
|
|
super(CapacityScheduler.class.getName());
|
|
|
this.maxRunningEnforcer = new CSMaxRunningAppsEnforcer(this);
|
|
@@ -351,9 +349,7 @@ public class CapacityScheduler extends
|
|
|
this.workflowPriorityMappingsMgr = new WorkflowPriorityMappingsManager();
|
|
|
|
|
|
this.activitiesManager = new ActivitiesManager(rmContext);
|
|
|
- if (activitiesManagerEnabled) {
|
|
|
- activitiesManager.init(conf);
|
|
|
- }
|
|
|
+ activitiesManager.init(conf);
|
|
|
initializeQueues(this.conf);
|
|
|
this.isLazyPreemptionEnabled = conf.getLazyPreemptionEnabled();
|
|
|
|
|
@@ -411,9 +407,7 @@ public class CapacityScheduler extends
|
|
|
private void startSchedulerThreads() {
|
|
|
writeLock.lock();
|
|
|
try {
|
|
|
- if (activitiesManagerEnabled) {
|
|
|
- activitiesManager.start();
|
|
|
- }
|
|
|
+ activitiesManager.start();
|
|
|
if (scheduleAsynchronously) {
|
|
|
Preconditions.checkNotNull(asyncSchedulerThreads,
|
|
|
"asyncSchedulerThreads is null");
|
|
@@ -447,9 +441,7 @@ public class CapacityScheduler extends
|
|
|
public void serviceStop() throws Exception {
|
|
|
writeLock.lock();
|
|
|
try {
|
|
|
- if (activitiesManagerEnabled) {
|
|
|
- this.activitiesManager.stop();
|
|
|
- }
|
|
|
+ this.activitiesManager.stop();
|
|
|
if (scheduleAsynchronously && asyncSchedulerThreads != null) {
|
|
|
for (Thread t : asyncSchedulerThreads) {
|
|
|
t.interrupt();
|
|
@@ -3480,7 +3472,6 @@ public class CapacityScheduler extends
|
|
|
this.maxRunningEnforcer = enforcer;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* Returning true as capacity scheduler supports placement constraints.
|
|
|
*/
|
|
@@ -3489,11 +3480,6 @@ public class CapacityScheduler extends
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- @VisibleForTesting
|
|
|
- public void setActivitiesManagerEnabled(boolean enabled) {
|
|
|
- this.activitiesManagerEnabled = enabled;
|
|
|
- }
|
|
|
-
|
|
|
@VisibleForTesting
|
|
|
public void setQueueManager(CapacitySchedulerQueueManager qm) {
|
|
|
this.queueManager = qm;
|