YARN-9246 NPE when executing a command yarn node -status or -states without additional arguments. Contributed by Masahiro Tanaka

This commit is contained in:
Suma Shivaprasad 2019-02-05 09:39:38 -08:00
parent 194f0b49fb
commit 2044967e75

View File

@ -72,6 +72,10 @@ public void setClient(YarnClient client) {
}
public void stop() {
this.client.stop();
// this.client may be null when it is called before
// invoking `createAndStartYarnClient`
if (this.client != null) {
this.client.stop();
}
}
}