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

(cherry picked from commit 2044967e75)
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
1 changed files with 5 additions and 1 deletions

View File

@ -72,6 +72,10 @@ public abstract class YarnCLI extends Configured implements Tool {
}
public void stop() {
// this.client may be null when it is called before
// invoking `createAndStartYarnClient`
if (this.client != null) {
this.client.stop();
}
}
}