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 2020/11/18 01:55:49 UTC
[zeppelin] branch branch-0.9 updated: [ZEPPELIN-5132] Allow job id
injection for spark job url when knox is enabled
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 fecb83f [ZEPPELIN-5132] Allow job id injection for spark job url when knox is enabled
fecb83f is described below
commit fecb83fa63c9788ed7a15038aad94ec22d71797b
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Fri Nov 13 16:53:08 2020 +0800
[ZEPPELIN-5132] Allow job id injection for spark job url when knox is enabled
### What is this PR for?
### What type of PR is it?
[Bug Fix | Improvement | Feature | Documentation | Hot Fix | Refactoring]
### Todos
* [ ] - Task
### What is the Jira issue?
* Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/
* Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. [ZEPPELIN-533]
### How should this be tested?
* First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update?
* Is there breaking changes for older versions?
* Does this needs documentation?
Author: Jeff Zhang <zj...@apache.org>
Closes #3972 from zjffdu/ZEPPELIN-5132 and squashes the following commits:
f2b61e465 [Jeff Zhang] [ZEPPELIN-5132] Allow job id injection for spark job url when knox is enabled
(cherry picked from commit 7c7f59a50429905a75f922b2f7e560379e5f3ed8)
Signed-off-by: Jeff Zhang <zj...@apache.org>
---
.../main/scala/org/apache/zeppelin/spark/SparkShims.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/spark/spark-shims/src/main/scala/org/apache/zeppelin/spark/SparkShims.java b/spark/spark-shims/src/main/scala/org/apache/zeppelin/spark/SparkShims.java
index 306b031..adabbc1 100644
--- a/spark/spark-shims/src/main/scala/org/apache/zeppelin/spark/SparkShims.java
+++ b/spark/spark-shims/src/main/scala/org/apache/zeppelin/spark/SparkShims.java
@@ -108,11 +108,17 @@ public abstract class SparkShims {
int jobId,
Properties jobProperties,
InterpreterContext context) {
- String jobUrl = sparkWebUrl + "/jobs/job?id=" + jobId;
- String version = VersionInfo.getVersion();
- if (master.toLowerCase().contains("yarn") && !supportYarn6615(version)) {
- jobUrl = sparkWebUrl + "/jobs";
+ String jobUrl = null;
+ if (sparkWebUrl.contains("{jobId}")) {
+ jobUrl = sparkWebUrl.replace("{jobId}", jobId + "");
+ } else {
+ jobUrl = sparkWebUrl + "/jobs/job?id=" + jobId;
+ String version = VersionInfo.getVersion();
+ if (master.toLowerCase().contains("yarn") && !supportYarn6615(version)) {
+ jobUrl = sparkWebUrl + "/jobs";
+ }
}
+
String jobGroupId = jobProperties.getProperty("spark.jobGroup.id");
Map<String, String> infos = new java.util.HashMap<String, String>();