You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2021/07/12 09:11:23 UTC
[zeppelin] branch branch-0.9 updated: [ZEPPELIN-5405]
ClassNotFoundException in YarnAppMonitor when hadoop client is not
installed
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.9 by this push:
new 720241f [ZEPPELIN-5405] ClassNotFoundException in YarnAppMonitor when hadoop client is not installed
720241f is described below
commit 720241f74b8b7a1391c04813a1e26677194fefc0
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Wed Jun 16 22:59:16 2021 +0800
[ZEPPELIN-5405] ClassNotFoundException in YarnAppMonitor when hadoop client is not installed
### What is this PR for?
Minor PR to only use YarnAppMonitor when hadoop client is installed, otherwise ClassNotFoundException will be thrown
### What type of PR is it?
[ Improvement ]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5405
### How should this be tested?
* Manually tested
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jeff Zhang <zj...@apache.org>
Closes #4141 from zjffdu/ZEPPELIN-5405 and squashes the following commits:
06e9af7241 [Jeff Zhang] address comment
5ff3585834 [Jeff Zhang] [ZEPPELIN-5405] ClassNotFoundException in YarnAppMonitor when hadoop client is not installed
(cherry picked from commit 6ea94f27b48b4f637cf4e7284b5b24b0fc374fe6)
Signed-off-by: Jeff Zhang <zj...@apache.org>
---
.../interpreter/remote/ExecRemoteInterpreterProcess.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ExecRemoteInterpreterProcess.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ExecRemoteInterpreterProcess.java
index fcabaab..dd81e57 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ExecRemoteInterpreterProcess.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/ExecRemoteInterpreterProcess.java
@@ -95,7 +95,9 @@ public class ExecRemoteInterpreterProcess extends RemoteInterpreterManagedProces
if (!interpreterProcessLauncher.isRunning()) {
throw new IOException("Fail to launch interpreter process:\n" + interpreterProcessLauncher.getErrorMessage());
- } else {
+ }
+
+ if (isHadoopClientAvailable()) {
String launchOutput = interpreterProcessLauncher.getProcessLaunchOutput();
Matcher m = YARN_APP_PATTER.matcher(launchOutput);
if (m.find()) {
@@ -106,6 +108,15 @@ public class ExecRemoteInterpreterProcess extends RemoteInterpreterManagedProces
}
}
+ private boolean isHadoopClientAvailable() {
+ try {
+ Class.forName("org.apache.hadoop.yarn.conf.YarnConfiguration");
+ return true;
+ } catch (ClassNotFoundException e) {
+ return false;
+ }
+ }
+
@Override
public void processStarted(int port, String host) {
super.processStarted(port, host);