Skip to content

[SPARK-14914] Skip some test cases on Windows due to limitation of Windows #12696

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

Closed
wants to merge 10 commits into from

Conversation

taoli91
Copy link
Contributor

@taoli91 taoli91 commented Apr 26, 2016

What changes were proposed in this pull request?

This pull request fix some general issue on windows:

  1. There are some jdk bugs on windows.
  2. Symlink handling on windows.

How was this patch tested?

Unit tests (Not fully passed on windows)

@@ -947,7 +945,9 @@ private[spark] object Utils extends Logging {
*/
def isSymlink(file: File): Boolean = {
if (file == null) throw new NullPointerException("File must not be null")
if (isWindows) return false
if (isWindows) {
return Files.isSymbolicLink(Paths.get(file.toURI))
Copy link
Member

Choose a reason for hiding this comment

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

Let's just invoke this method as the body of this method, now that we can use Java 7, for Windows and all platforms.

val sparkSubmit = if (Utils.isWindows) {
Seq(new File("..\\bin\\spark-submit.cmd").getAbsolutePath) ++ args
} else {
Seq("./bin/spark-submit") ++ args
Copy link
Member

Choose a reason for hiding this comment

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

Everything else but the path is the same right? the rest of these blocks don't need to be duplicated, even though it's very minor.

Copy link
Member

Choose a reason for hiding this comment

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

OK this PR looks fine to me. My last suggested change would be to simply this changed bit of code to something like ...

val sparkSubmitPath = if (Utils.isWindows) "..." else "..."
...
val process = Utils.executeCommand(
   sparkSubmitPath.getAbsolutePath +: args,
...

I don't feel strongly about it

Copy link
Member

Choose a reason for hiding this comment

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

(Is getCanonicalPath a little safer to go ahead and resolve the ".."? not sure)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srowen I found out that if we do new File("../bin/spark-submit").getCanonicalPath, the path returned from Windows and Linux would be the same. Would you mind if I make them consistent?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, consistent is good. (Could be very slightly simpler with +: etc but this is really trivial)

@srowen
Copy link
Member

srowen commented May 4, 2016

Jenkins test this please

@SparkQA
Copy link

SparkQA commented May 4, 2016

Test build #57763 has finished for PR 12696 at commit 18fbda5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

@taoli91 Do you mind if I ask rebase this? I would like to support to verify this PR.

@HyukjinKwon
Copy link
Member

@taoli91 Would you be interested in https://issues.apache.org/jira/browse/SPARK-17591?

@srowen
Copy link
Member

srowen commented Sep 26, 2016

@HyukjinKwon if you want to move this forward and there's no reply, I think you could fork this and continue it.

@HyukjinKwon
Copy link
Member

@srowen Sure, I will wait for a few days and then try to proceed this.

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.

4 participants