瀏覽代碼

YARN-6118. Add javadoc for Resources.isNone. Contributed by Andres Perez.

(cherry picked from commit 3a0a0a485a4145e3bd2e5946731ee1d901b51ead)
Sunil G 8 年之前
父節點
當前提交
7b2b6caf12

+ 6 - 0
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);
   }