-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-647] - Native Windows support for startup scripts and configuration #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| <directory>../conf</directory> | ||
| <excludes> | ||
| <exclude>interpreter.json</exclude> | ||
| <exclude>zeppelin-env.cmd</exclude> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@granturing Fix the indentations, please.
|
@granturing Appreciate for the patch! |
|
It works well on my windows XP with oracle jdk 1.7.0_79. great work! |
|
It works on Windows 7 as well. |
|
I tried it on Windows 7, works well. Except for these two test failure in cassandra, when I do |
|
@doanduyhai is cassandra supported on windows? |
|
Yes, Cassandra is supported on Windows. The error is about parsing multi line comments. The first test failure looks interesting. Basically it says that the following test fails: "Parser" should "parse multi-line comment" in {
val query:String =
"""/*This is a comment
|line1
|line2
|line3
|*/
""".stripMargin
val parsed = parser.parseAll(parser.multiLineComment, query)
parsed should matchPattern {
case parser.Success(Comment("This is a comment\nline1\nline2\nline3\n"), _) =>
}
}because it does not match the regexp pattern:
I'm wondering if it is not related to the difference between Linux/Unix and Windows for the line terminator |
|
Let me checkout the project on Windows and try (I need to find a Windows :D) |
|
The last CI failure is because of spark release download timeout. |
|
Hi Felix, agree with the Cassandra test failure. I have a couple more things I want to verify and then we should be good to go. I'm writing up some docs related to Windows deployment that will be part of this PR. |
|
+1 for track the Windows Cassandra test failure in a new JIRA |
…y due to delayed expansion
resolved conflict in docs/install/install.md
|
So, interestingly enough I only see an issue with Spark (using Hadoop 2.6). Running Flink seems fine, but it could be dependent on the Hadoop client versions being used by the two. But yes, the HDFS interpreter will need to have the necessary Windows dependencies. You want me to pull that line out? |
|
Hmm, interesting. Let's keep this here for now then. |
|
Couple questions:
private static final boolean isWindows = System.getProperty("os.name")
.startsWith("Windows");
private final String shell = isWindows ? "cmd /c" : "bash -c";
private static final String INTERPRETER_SCRIPT =
System.getProperty("os.name").startsWith("Windows") ?
"../bin/interpreter.cmd" :
"../bin/interpreter.sh"; |
|
I've been running this extensively the past few weeks and have nothing left to add at this point, unless there's additional feedback. |
|
@granturing Thanks for great work. LGTM. Can #749 and #769 also be applied? |
|
The script seems to have a problem with CLASSPATH's that contain spaces (e.g. C:\Program Files\xyz\bin). I'm not knowledgeable enough with with Windows Batch scripting to determine if this a problem with the startup script or my particular environment. The script fails in the following section of "zeppelin.cmd": The error thrown: |
|
@dnldxn thanks for testing that. I changed a few things to better handle spaces. Unfortunately, using the bundled Spark with a ZEPPELIN_HOME with spaces will not work, due to Spark issues. External Spark works fine though. |
|
Is it okay to be merged? |
|
I have no more changes. @dnldxn were you able to validate the latest commit on your setup? |
|
@granturing Yep, it works great on my Windows 10 system. |
|
@granturing Selenium tests failed, could you close/re-open this PR to launch CI again? |
|
One version failed because it couldn't download Spark, the other because of connection refused errors running API tests. My last commit was only against the Windows batch files which aren't being tested in the CI build though. |
|
Most of the profiles are green, including those with tests, so LGTM |
|
LGTM. Merge if there're no more discussions. |
…guration ### What is this PR for? This is to give Windows first-class support for running Zeppelin without the need for Cygwin or other hacks. ### What type of PR is it? Improvement ### Todos * [x] - Fix notebook dir path handling which right now assumes URI compatible string (see https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java#L63) * [x] - Add documentation for configuring and running on Windows * [x] - Independent code review of the CMD scripts to ensure they're correct ### Is there a relevant Jira issue? ZEPPELIN-647 ### How should this be tested? * Pull this PR * Build * Override default ZEPPELIN_NOTEBOOK_DIR in zeppelin-env.cmd to be an absolute file URI such as file:///c:/notebook * Start with bin\zeppelin.cmd * If using any Hadoop system ensure you have winutils.exe in your HADOOP_HOME\bin, see (https://github.com/steveloughran/winutils) ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Silvio Fiorito <[email protected]> Author: Silvio Fiorito <Silvio Fiorito> Closes apache#734 from granturing/windows-support and squashes the following commits: 8aadd45 [Silvio Fiorito] Fixes to handle spaces in paths properly, both for ZEPPELIN_HOME and CLASSPATH 73aaf4f [Silvio Fiorito] Default to the appropriate interpreter when running on Windows db28fe9 [Silvio Fiorito] Support for running unit tests on Windows using the appropriate interpreter script a1e3097 [Silvio Fiorito] Support for Windows CMD shell interpreter 82acdcf [Silvio Fiorito] Merge branch 'master' into windows-support 9e8b309 [Silvio Fiorito] Initital doc updates for running on Windows 03baf62 [Silvio Fiorito] Additional fix for embedded pyspark environment variables 2b9f01c [Silvio Fiorito] Fix for pyspark PYTHONPATH environment variable not being set properly due to delayed expansion c700808 [Silvio Fiorito] Check for Windows path before creating URI to prevent URISyntaxExecption d30e4b9 [Silvio Fiorito] And again fix indentations missed last time 5b49d3e [Silvio Fiorito] Cleaned up indentation 9e40482 [Silvio Fiorito] Initial support for Windows platform, startup scripts
What is this PR for?
This is to give Windows first-class support for running Zeppelin without the need for Cygwin or other hacks.
What type of PR is it?
Improvement
Todos
Is there a relevant Jira issue?
ZEPPELIN-647
How should this be tested?
Screenshots (if appropriate)
Questions: