From 79e37dc6dba44e7d1d913593304db7a8516056aa Mon Sep 17 00:00:00 2001 From: Yufei Gu Date: Tue, 3 Oct 2017 15:08:29 -0700 Subject: [PATCH] YARN-7211. AMSimulator in SLS does't work due to responseId refactoring.(Contributed by Botong Huang via Yufei Gu) --- .../org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java b/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java index c69805e5b99..72698ea10a5 100644 --- a/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java +++ b/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/appmaster/AMSimulator.java @@ -83,7 +83,7 @@ public abstract class AMSimulator extends TaskRunner.Task { RecordFactoryProvider.getRecordFactory(null); // response queue protected final BlockingQueue responseQueue; - protected int RESPONSE_ID = 1; + private int responseId = 0; // user name protected String user; // queue name @@ -274,7 +274,7 @@ public abstract class AMSimulator extends TaskRunner.Task { List toRelease) { AllocateRequest allocateRequest = recordFactory.newRecordInstance(AllocateRequest.class); - allocateRequest.setResponseId(RESPONSE_ID ++); + allocateRequest.setResponseId(responseId++); allocateRequest.setAskList(ask); allocateRequest.setReleaseList(toRelease); return allocateRequest;