You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2021/06/10 12:49:52 UTC
[hadoop] branch branch-3.2 updated: YARN-9246 NPE when executing a
command yarn node -status or -states without additional arguments.
Contributed by Masahiro Tanaka
This is an automated email from the ASF dual-hosted git repository.
aajisaka pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new e62cdf9 YARN-9246 NPE when executing a command yarn node -status or -states without additional arguments. Contributed by Masahiro Tanaka
e62cdf9 is described below
commit e62cdf915fe7fcf539dca28045a806a4552a3ab3
Author: Suma Shivaprasad <su...@apache.org>
AuthorDate: Tue Feb 5 09:39:38 2019 -0800
YARN-9246 NPE when executing a command yarn node -status or -states without additional arguments. Contributed by Masahiro Tanaka
(cherry picked from commit 2044967e7581f00c3f6378860426a69078faf694)
---
.../src/main/java/org/apache/hadoop/yarn/client/cli/YarnCLI.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/YarnCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/YarnCLI.java
index 0747b63..c1e02d5 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/YarnCLI.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/YarnCLI.java
@@ -72,6 +72,10 @@ public abstract class YarnCLI extends Configured implements Tool {
}
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();
+ }
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org