diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index c8efc71f0d2..b8cece03ff6 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -92,6 +92,9 @@ Release 2.0.3-alpha - Unreleased YARN-224. Fair scheduler logs too many nodeUpdate INFO messages. (Sandy Ryza via tomwhite) + YARN-222. Fair scheduler should create queue for each user by default. + (Sandy Ryza via tomwhite) + Release 2.0.2-alpha - 2012-09-07 YARN-9. Rename YARN_HOME to HADOOP_YARN_HOME. (vinodkv via acmurthy) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairSchedulerConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairSchedulerConfiguration.java index 8a7f7fc45ed..f5706d93bfd 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairSchedulerConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairSchedulerConfiguration.java @@ -18,7 +18,7 @@ public class FairSchedulerConfiguration extends Configuration { /** Whether to use the user name as the queue name (instead of "default") if * the request does not specify a queue. */ protected static final String USER_AS_DEFAULT_QUEUE = CONF_PREFIX + "user-as-default-queue"; - protected static final boolean DEFAULT_USER_AS_DEFAULT_QUEUE = false; + protected static final boolean DEFAULT_USER_AS_DEFAULT_QUEUE = true; protected static final String LOCALITY_THRESHOLD = CONF_PREFIX + "locality.threshold"; protected static final float DEFAULT_LOCALITY_THRESHOLD = -1.0f; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java index 4a269201665..620d0fb913f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java @@ -401,11 +401,11 @@ public class TestFairScheduler { createAppAttemptId(1, 1), "default", "user1"); scheduler.handle(appAddedEvent1); - // Scheduler should have one queue (the default) - assertEquals(1, scheduler.getQueueManager().getQueues().size()); + // Scheduler should have two queues (the default and the one created for user1) + assertEquals(2, scheduler.getQueueManager().getQueues().size()); // That queue should have one app - assertEquals(1, scheduler.getQueueManager().getQueue("default").getApplications().size()); + assertEquals(1, scheduler.getQueueManager().getQueue("user1").getApplications().size()); AppRemovedSchedulerEvent appRemovedEvent1 = new AppRemovedSchedulerEvent( createAppAttemptId(1, 1), RMAppAttemptState.FINISHED); @@ -413,8 +413,8 @@ public class TestFairScheduler { // Now remove app scheduler.handle(appRemovedEvent1); - // Default queue should have no apps - assertEquals(0, scheduler.getQueueManager().getQueue("default").getApplications().size()); + // Queue should have no apps + assertEquals(0, scheduler.getQueueManager().getQueue("user1").getApplications().size()); } @Test