From 3a0a0a485a4145e3bd2e5946731ee1d901b51ead 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. --- .../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 462e02add1..044a232703 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 static Resource none() { 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); }