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 b11c0944dc..fc64093fcb 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 @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.Collection; +import java.util.function.Supplier; import java.util.List; import org.apache.commons.logging.Log; @@ -45,7 +46,6 @@ import org.apache.hadoop.yarn.util.resource.Resources; import com.google.common.base.Preconditions; -import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; @InterfaceAudience.Public @@ -702,8 +702,8 @@ public TimelineV2Client getRegisteredTimelineV2Client() { /** * Wait for check to return true for each 1000 ms. - * See also {@link #waitFor(com.google.common.base.Supplier, int)} - * and {@link #waitFor(com.google.common.base.Supplier, int, int)} + * See also {@link #waitFor(java.util.function.Supplier, int)} + * and {@link #waitFor(java.util.function.Supplier, int, int)} * @param check the condition for which it should wait */ public void waitFor(Supplier check) throws InterruptedException { @@ -713,7 +713,7 @@ public void waitFor(Supplier check) throws InterruptedException { /** * Wait for check to return true for each * checkEveryMillis ms. - * See also {@link #waitFor(com.google.common.base.Supplier, int, int)} + * See also {@link #waitFor(java.util.function.Supplier, int, int)} * @param check user defined checker * @param checkEveryMillis interval to call check */ diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/AMRMClientAsync.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/AMRMClientAsync.java index 1ecfe1f588..44a36af136 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/AMRMClientAsync.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/AMRMClientAsync.java @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -52,7 +53,6 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; -import com.google.common.base.Supplier; /** * AMRMClientAsync handles communication with the ResourceManager @@ -375,8 +375,8 @@ public abstract void updateBlacklist(List blacklistAdditions, /** * Wait for check to return true for each 1000 ms. - * See also {@link #waitFor(com.google.common.base.Supplier, int)} - * and {@link #waitFor(com.google.common.base.Supplier, int, int)} + * See also {@link #waitFor(java.util.function.Supplier, int)} + * and {@link #waitFor(java.util.function.Supplier, int, int)} * @param check the condition for which it should wait */ public void waitFor(Supplier check) throws InterruptedException { @@ -386,7 +386,7 @@ public void waitFor(Supplier check) throws InterruptedException { /** * Wait for check to return true for each * checkEveryMillis ms. - * See also {@link #waitFor(com.google.common.base.Supplier, int, int)} + * See also {@link #waitFor(java.util.function.Supplier, int, int)} * @param check user defined checker * @param checkEveryMillis interval to call check */ diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/async/impl/TestAMRMClientAsync.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/async/impl/TestAMRMClientAsync.java index 56826c431c..8d912a6040 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/async/impl/TestAMRMClientAsync.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/async/impl/TestAMRMClientAsync.java @@ -34,6 +34,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -62,7 +63,6 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import com.google.common.base.Supplier; public class TestAMRMClientAsync { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java index fa2e7a5713..b6beb382ca 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.function.Supplier; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -88,7 +89,6 @@ import org.mockito.stubbing.Answer; import org.eclipse.jetty.util.log.Log; -import com.google.common.base.Supplier; /** * Test application master client class to resource manager.