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:
parent
f5568e15d0
commit
e62cdf915f
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue