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/06/23 08:27:10 UTC
[zeppelin] branch branch-0.9 updated: [ZEPPELIN-5413] Throw proper
error message when user set execution.runtime-mode in flink sql
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 b651ca9 [ZEPPELIN-5413] Throw proper error message when user set execution.runtime-mode in flink sql
b651ca9 is described below
commit b651ca9d1452c0842259a7eedc3e7b29c334ff91
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Fri Jun 18 11:22:08 2021 +0800
[ZEPPELIN-5413] Throw proper error message when user set execution.runtime-mode in flink sql
### What is this PR for?
`execution.runtime-mode` is available in flink sql-client, but it is not available in zeppelin flink interpreter. So we need to throw proper error message when user set execution.runtime-mode in flink sql.
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5413
### 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 #4140 from zjffdu/ZEPPELIN-5413 and squashes the following commits:
b8415c654c [Jeff Zhang] Address comment
b1c2f2b43b [Jeff Zhang] Use UnsupportedOperationException
2d2f6091d9 [Jeff Zhang] [ZEPPELIN-5413] Throw proper error message when user set execution.runtime-mode in flink sql
(cherry picked from commit 15ca137d4f2774cdb15c5a0938cdba27590fba04)
Signed-off-by: Jeff Zhang <zj...@apache.org>
---
.../main/java/org/apache/zeppelin/flink/FlinkSqlInterrpeter.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/flink/flink-scala-parent/src/main/java/org/apache/zeppelin/flink/FlinkSqlInterrpeter.java b/flink/flink-scala-parent/src/main/java/org/apache/zeppelin/flink/FlinkSqlInterrpeter.java
index baa6ea7..bbdd330 100644
--- a/flink/flink-scala-parent/src/main/java/org/apache/zeppelin/flink/FlinkSqlInterrpeter.java
+++ b/flink/flink-scala-parent/src/main/java/org/apache/zeppelin/flink/FlinkSqlInterrpeter.java
@@ -502,11 +502,17 @@ public abstract class FlinkSqlInterrpeter extends AbstractInterpreter {
public abstract void callInnerSelect(String sql, InterpreterContext context) throws IOException;
- public void callSet(String key, String value, InterpreterContext context) throws IOException {
+ public void callSet(String key, String value, InterpreterContext context) throws Exception {
+ if ("execution.runtime-mode".equals(key)) {
+ throw new UnsupportedOperationException("execution.runtime-mode is not supported to set, " +
+ "you can use %flink.ssql & %flink.bsql to switch between streaming mode and batch mode");
+ }
+
if (!tableConfigOptions.containsKey(key)) {
throw new IOException(key + " is not a valid table/sql config, please check link: " +
"https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/config.html");
}
+
LOGGER.info("Set table config: {}={}", key, value);
this.tbenv.getConfig().getConfiguration().setString(key, value);
}