SLIDER-799 action EscalateOutstandingRequests
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/06e8db3e Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/06e8db3e Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/06e8db3e Branch: refs/heads/develop Commit: 06e8db3e8fb00f299333604491f7c29debac5955 Parents: 8338898 Author: Steve Loughran <ste...@apache.org> Authored: Tue Mar 17 11:23:46 2015 +0000 Committer: Steve Loughran <ste...@apache.org> Committed: Tue Mar 17 11:23:46 2015 +0000 ---------------------------------------------------------------------- .../actions/EscalateOutstandingRequests.java | 25 +++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/06e8db3e/slider-core/src/main/java/org/apache/slider/server/appmaster/actions/EscalateOutstandingRequests.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/actions/EscalateOutstandingRequests.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/actions/EscalateOutstandingRequests.java index e527be6..2c545ea 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/actions/EscalateOutstandingRequests.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/actions/EscalateOutstandingRequests.java @@ -18,5 +18,28 @@ package org.apache.slider.server.appmaster.actions; -public class EscalateOutstandingRequests { +import org.apache.slider.server.appmaster.SliderAppMaster; +import org.apache.slider.server.appmaster.state.AppState; + +import java.util.concurrent.TimeUnit; + +/** + * Escalate outstanding requests by asking AM + */ +public class EscalateOutstandingRequests extends AsyncAction { + + public EscalateOutstandingRequests() { + super("EscalateOutstandingRequests"); + } + + public EscalateOutstandingRequests(long delay, + TimeUnit timeUnit) { + super("EscalateOutstandingRequests", delay, timeUnit, ATTR_REVIEWS_APP_SIZE); + } + + @Override + public void execute(SliderAppMaster appMaster, QueueAccess queueService, AppState appState) throws + Exception { + appMaster.escalateOutstandingRequests(); + } }