From 0f82b5d878a76b1626c9e07b2fbb55ce2a79232a Mon Sep 17 00:00:00 2001 From: Uma Mahesh Date: Sat, 19 Dec 2015 23:10:13 -0800 Subject: [PATCH] YARN-4480. Clean up some inappropriate imports. (Kai Zheng via umamahesh) --- .../apache/hadoop/hdfs/server/namenode/TestBackupNode.java | 1 - hadoop-yarn-project/CHANGES.txt | 2 ++ .../nodemanager/amrmproxy/MockResourceManagerFacade.java | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java index 5ad9d9b41b..5b965ae805 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestBackupNode.java @@ -31,7 +31,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.directory.api.ldap.aci.UserClass; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.fs.FileSystem; diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 1efc944208..fd1aa45dc5 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -632,6 +632,8 @@ Release 2.8.0 - UNRELEASED YARN-4164. Changed updateApplicationPriority API to return the updated application priority. (Rohith Sharma K S via jianhe) + YARN-4480. Clean up some inappropriate imports. (Kai Zheng via umamahesh) + OPTIMIZATIONS YARN-3339. TestDockerContainerExecutor should pull a single image and not diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/MockResourceManagerFacade.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/MockResourceManagerFacade.java index c83adeed72..9dd245da0a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/MockResourceManagerFacade.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/MockResourceManagerFacade.java @@ -25,8 +25,8 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.directory.api.util.Strings; -import org.apache.directory.api.util.exception.NotImplementedException; +import com.google.common.base.Strings; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.token.TokenIdentifier; @@ -224,7 +224,7 @@ public AllocateResponse allocate(AllocateRequest request) // it is OK to hard code it to some dummy value NodeId nodeId = NodeId.newInstance( - !Strings.isEmpty(rr.getResourceName()) ? rr + !Strings.isNullOrEmpty(rr.getResourceName()) ? rr .getResourceName() : "dummy", 1000); container.setNodeId(nodeId); container.setResource(rr.getCapability());