YARN-6118. Add javadoc for Resources.isNone. Contributed by Andres Perez.
This commit is contained in:
parent
5b151290ae
commit
3a0a0a485a
|
@ -144,6 +144,12 @@ public class Resources {
|
||||||
return 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) {
|
public static boolean isNone(Resource other) {
|
||||||
return NONE.equals(other);
|
return NONE.equals(other);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue