SLIDER-476 make AM queue executor single thread
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/ddde0300 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/ddde0300 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/ddde0300 Branch: refs/heads/feature/SLIDER-149_Support_a_YARN_service_registry Commit: ddde0300d3f17fbaa4e0dbdd4d820b18dffc99f9 Parents: 1deafee Author: Steve Loughran <[email protected]> Authored: Thu Oct 2 13:51:52 2014 -0700 Committer: Steve Loughran <[email protected]> Committed: Thu Oct 2 13:51:52 2014 -0700 ---------------------------------------------------------------------- .../org/apache/slider/server/appmaster/SliderAppMaster.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/ddde0300/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java index 365eeab..24d5eea 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java @@ -197,7 +197,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService public static final int HEARTBEAT_INTERVAL = 1000; public static final int NUM_RPC_HANDLERS = 5; - public static final int SCHEDULED_EXECUTOR_POOL_SIZE = 1; /** * Singleton of metrics registry @@ -212,7 +211,6 @@ public class SliderAppMaster extends AbstractSliderLaunchedService private AMRMClientAsync asyncRMClient; @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized") - private RMOperationHandler rmOperationHandler; private RMOperationHandler providerRMOperationHandler; @@ -411,11 +409,10 @@ public class SliderAppMaster extends AbstractSliderLaunchedService SliderUtils.validateSliderServerEnvironment(log); executorService = new WorkflowExecutorService<ExecutorService>("AmExecutor", - Executors.newCachedThreadPool( + Executors.newSingleThreadExecutor( new ServiceThreadFactory("AmExecutor", true))); addService(executorService); - addService(actionQueues); //init all child services super.serviceInit(conf);
