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/06/17 04:00:40 UTC
[zeppelin] branch master updated: [ZEPPELIN-4885]. Add property to
specify Module order of flink interpreter
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 72c127f [ZEPPELIN-4885]. Add property to specify Module order of flink interpreter
72c127f is described below
commit 72c127f79dbe2f4be55b6b7893f387aeb36248c6
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Tue Jun 16 16:11:27 2020 +0800
[ZEPPELIN-4885]. Add property to specify Module order of flink interpreter
### What is this PR for?
It is a trivial PR which add property `zeppelin.flink.module.enableHive` to control whether load hive udf first when there's same udf name in both hive and flink.
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4885
### How should this be tested?
* CI pass, and 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 #3802 from zjffdu/ZEPPELIN-4885 and squashes the following commits:
45754580f [Jeff Zhang] [ZEPPELIN-4885]. Add property to specify Module order of flink interpreter
---
docs/interpreter/flink.md | 5 +++++
flink/interpreter/src/main/resources/interpreter-setting.json | 7 +++++++
.../scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala | 4 +++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/docs/interpreter/flink.md b/docs/interpreter/flink.md
index dc79969..c0d8b2c 100644
--- a/docs/interpreter/flink.md
+++ b/docs/interpreter/flink.md
@@ -207,6 +207,11 @@ You can also set other flink properties which are not listed in the table. For a
<td>Hive version that you would like to connect</td>
</tr>
<tr>
+ <td>zeppelin.flink.module.enableHive</td>
+ <td>false</td>
+ <td>Whether enable hive module, hive udf take precedence over flink udf if hive module is enabled.</td>
+ </tr>
+ <tr>
<td>zeppelin.flink.maxResult</td>
<td>1000</td>
<td>max number of row returned by sql interpreter</td>
diff --git a/flink/interpreter/src/main/resources/interpreter-setting.json b/flink/interpreter/src/main/resources/interpreter-setting.json
index eea51a4..c8bdbbe 100644
--- a/flink/interpreter/src/main/resources/interpreter-setting.json
+++ b/flink/interpreter/src/main/resources/interpreter-setting.json
@@ -152,6 +152,13 @@
"description": "Hive version that you would like to connect",
"type": "string"
},
+ "zeppelin.flink.module.enableHive": {
+ "envName": null,
+ "propertyName": null,
+ "defaultValue": false,
+ "description": "Whether enable hive module, hive udf take precedence over flink udf if hive module is enabled.",
+ "type": "checkbox"
+ },
"zeppelin.flink.printREPLOutput": {
"envName": null,
"propertyName": "zeppelin.flink.printREPLOutput",
diff --git a/flink/interpreter/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala b/flink/interpreter/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
index 2431d01..027838e 100644
--- a/flink/interpreter/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
+++ b/flink/interpreter/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala
@@ -466,7 +466,9 @@ class FlinkScalaInterpreter(val properties: Properties) {
this.btenv.registerCatalog("hive", hiveCatalog)
this.btenv.useCatalog("hive")
this.btenv.useDatabase(database)
- this.btenv.loadModule("hive", new HiveModule(hiveVersion))
+ if (properties.getProperty("zeppelin.flink.module.enableHive", "false").toBoolean) {
+ this.btenv.loadModule("hive", new HiveModule(hiveVersion))
+ }
}
private def loadUDFJar(jar: String): Unit = {