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 15ca137 [ZEPPELIN-5413] Throw proper error message when user set
execution.runtime-mode in flink sql
15ca137 is described below
commit 15ca137d4f2774cdb15c5a0938cdba27590fba04
Author: Jeff Zhang <[email protected]>
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 <[email protected]>
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
---
.../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);
}