You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2020/05/06 06:33:09 UTC

[GitHub] [zeppelin] zjffdu opened a new pull request #3763: [ZEPPELIN-4790]. Throw exception when using flink for scala 2.12

zjffdu opened a new pull request #3763:
URL: https://github.com/apache/zeppelin/pull/3763


   ### What is this PR for?
   
   This PR will throw exception when using flink for scala 2.12 which is not supported now. See the screenshot below.
   
   
   ### What type of PR is it?
   [ Improvement ]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-4790
   
   ### How should this be tested?
   * Manually tested.
   
   ### Screenshots (if appropriate)
   
   ![image](https://user-images.githubusercontent.com/164491/81144289-4f89de80-8fa6-11ea-9df0-8abba0406b7c.png)
   
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] zjffdu commented on a change in pull request #3763: [ZEPPELIN-4790]. Throw exception when using flink for scala 2.12

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3763:
URL: https://github.com/apache/zeppelin/pull/3763#discussion_r420815898



##########
File path: flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java
##########
@@ -48,18 +48,39 @@
 
   public FlinkInterpreter(Properties properties) {
     super(properties);
-    this.innerIntp = new FlinkScalaInterpreter(getProperties());
+  }
+
+  private String extractScalaVersion() throws InterpreterException {
+    String scalaVersionString = scala.util.Properties.versionString();
+    LOGGER.info("Using Scala: " + scalaVersionString);
+    if (scalaVersionString.contains("version 2.10")) {
+      return "2.10";
+    } else if (scalaVersionString.contains("version 2.11")) {
+      return "2.11";
+    } else if (scalaVersionString.contains("version 2.12")) {
+      return "2.12";
+    } else {
+      throw new InterpreterException("Unsupported scala version: " + scalaVersionString);
+    }

Review comment:
       addressed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] alexott commented on a change in pull request #3763: [ZEPPELIN-4790]. Throw exception when using flink for scala 2.12

Posted by GitBox <gi...@apache.org>.
alexott commented on a change in pull request #3763:
URL: https://github.com/apache/zeppelin/pull/3763#discussion_r420673696



##########
File path: flink/src/main/java/org/apache/zeppelin/flink/FlinkInterpreter.java
##########
@@ -48,18 +48,39 @@
 
   public FlinkInterpreter(Properties properties) {
     super(properties);
-    this.innerIntp = new FlinkScalaInterpreter(getProperties());
+  }
+
+  private String extractScalaVersion() throws InterpreterException {
+    String scalaVersionString = scala.util.Properties.versionString();
+    LOGGER.info("Using Scala: " + scalaVersionString);
+    if (scalaVersionString.contains("version 2.10")) {
+      return "2.10";
+    } else if (scalaVersionString.contains("version 2.11")) {
+      return "2.11";
+    } else if (scalaVersionString.contains("version 2.12")) {
+      return "2.12";
+    } else {
+      throw new InterpreterException("Unsupported scala version: " + scalaVersionString);
+    }

Review comment:
       Do we plan to support multiple Scala versions in the future, and have some functionality depending on it?
   Otherwise I would maybe just implement something like "isSupportedScalaVersion" with one check for Scala 2.11 as of now.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org