Skip to content

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented May 6, 2020

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?

How should this be tested?

  • Manually tested.

Screenshots (if appropriate)

image

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok, although I'm not sure if we need to make it so complex.

Comment on lines 53 to 64
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);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asfgit asfgit closed this in e229682 May 8, 2020
asfgit pushed a commit that referenced this pull request May 8, 2020
### 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

Author: Jeff Zhang <[email protected]>

Closes #3763 from zjffdu/ZEPPELIN-4790 and squashes the following commits:

eac7b9a [Jeff Zhang] address comment
57b0737 [Jeff Zhang] [ZEPPELIN-4790]. Throw exception when using flink for scala 2.12

(cherry picked from commit e229682)
Signed-off-by: Jeff Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants