From 7b2b6caf12d1582a7866012d49707d6d5474babe Mon Sep 17 00:00:00 2001 From: Sunil G Date: Fri, 10 Feb 2017 15:48:46 +0530 Subject: [PATCH] YARN-6118. Add javadoc for Resources.isNone. Contributed by Andres Perez. (cherry picked from commit 3a0a0a485a4145e3bd2e5946731ee1d901b51ead) --- .../org/apache/hadoop/yarn/util/resource/Resources.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/resource/Resources.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/resource/Resources.java index 220f0c35740..5e623d9d6bc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/resource/Resources.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/resource/Resources.java @@ -144,6 +144,12 @@ public class Resources { return NONE; } + /** + * Check whether a resource object is empty (0 memory and 0 virtual cores). + * @param other The resource to check + * @return {@code true} if {@code other} has 0 memory and 0 virtual cores, + * {@code false} otherwise + */ public static boolean isNone(Resource other) { return NONE.equals(other); }