From e04e8fa8103fb58c2e449d78af6cbf5b552279f4 Mon Sep 17 00:00:00 2001 From: Siddharth Seth Date: Wed, 4 Feb 2015 12:52:02 -0800 Subject: [PATCH] =?UTF-8?q?YARN-1723.=20AMRMClientAsync=20missing=20blackl?= =?UTF-8?q?ist=20addition=20and=20removal=20functionality.=20Contributed?= =?UTF-8?q?=20by=20Bartosz=20=C5=81ugowski.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../yarn/client/api/async/AMRMClientAsync.java | 11 +++++++++++ .../client/api/async/impl/AMRMClientAsyncImpl.java | 13 +++++++++++++ 3 files changed, 27 insertions(+) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index cb12eb94a65..1d6f2b44870 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -239,6 +239,9 @@ Release 2.7.0 - UNRELEASED YARN-1393. SLS: Add how-to-use instructions. (Wei Yan via kasha) + YARN-1723. AMRMClientAsync missing blacklist addition and removal + functionality. (Bartosz Ɓugowski via sseth) + OPTIMIZATIONS BUG FIXES 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 af26da1799a..f62e71b48f9 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 @@ -194,6 +194,17 @@ extends AbstractService { */ public abstract int getClusterNodeCount(); + /** + * Update application's blacklist with addition or removal resources. + * + * @param blacklistAdditions list of resources which should be added to the + * application blacklist + * @param blacklistRemovals list of resources which should be removed from the + * application blacklist + */ + public abstract void updateBlacklist(List blacklistAdditions, + List blacklistRemovals); + /** * Wait for check to return true for each 1000 ms. * See also {@link #waitFor(com.google.common.base.Supplier, int)} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java index 82768bbf610..addc3b6daec 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java @@ -205,6 +205,19 @@ extends AMRMClientAsync { public int getClusterNodeCount() { return client.getClusterNodeCount(); } + + /** + * Update application's blacklist with addition or removal resources. + * + * @param blacklistAdditions list of resources which should be added to the + * application blacklist + * @param blacklistRemovals list of resources which should be removed from the + * application blacklist + */ + public void updateBlacklist(List blacklistAdditions, + List blacklistRemovals) { + client.updateBlacklist(blacklistAdditions, blacklistRemovals); + } private class HeartbeatThread extends Thread { public HeartbeatThread() {