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

(cherry picked from commit 2044967e7581f00c3f6378860426a69078faf694)
This commit is contained in:
Suma Shivaprasad 2019-02-05 09:39:38 -08:00 committed by Akira Ajisaka
parent f5568e15d0
commit e62cdf915f
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50

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();
}
}
}