From 0055e402262a4068722f33359974ca5b72db1511 Mon Sep 17 00:00:00 2001 From: Bikas Saha Date: Tue, 16 Jul 2013 22:15:47 +0000 Subject: [PATCH] Trivial fix for minor refactor error for YARN-521 git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1503922 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java index f3433118f7b..8c20b5f11f6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java @@ -159,7 +159,7 @@ public abstract class AMRMClient extends Preconditions.checkArgument(containerCount > 0, "The number of containers to request should larger than 0"); Preconditions.checkArgument( - (!relaxLocality && (racks == null || racks.length == 0) + !(!relaxLocality && (racks == null || racks.length == 0) && (nodes == null || nodes.length == 0)), "Can't turn off locality relaxation on a " + "request with no location constraints");