Skip to content
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

[SPARK-21239][STREAMING] Support WAL recover in windows #18452

Closed
wants to merge 2 commits into from

Conversation

Myasuka
Copy link
Member

@Myasuka Myasuka commented Jun 28, 2017

What changes were proposed in this pull request?

When driver failed over, it will read WAL from HDFS by calling WriteAheadLogBackedBlockRDD.getBlockFromWriteAheadLog(), however, it need a dummy local path to satisfy the method parameter requirements, but the path in windows will contain a colon which is not valid for hadoop. I removed the potential driver letter and colon.

I found one email from spark-user ever talked about this bug

How was this patch tested?

Without this fix, once driver failed over on YARN, WAL recovery would not take effect. But the WAL recovery mechanism would take effect once patched this fix of this PR on windows YARN cluster.

When driver failed over, it will read WAL from HDFS by calling
WriteAheadLogBackedBlockRDD.getBlockFromWriteAheadLog(), however, it need
a dummy local path to satisfy the method parameter requirements, but the
path in windows will contain a colon which is not valid for hadoop.
@Myasuka Myasuka changed the title Support WAL recover in windows [SPARK-21239][STREAMING]Support WAL recover in windows Jun 28, 2017
@Myasuka Myasuka changed the title [SPARK-21239][STREAMING]Support WAL recover in windows [SPARK-21239][STREAMING] Support WAL recover in windows Jun 28, 2017
val nonExistentDirectory = new File(
System.getProperty("java.io.tmpdir"), UUID.randomUUID().toString).getAbsolutePath
System.getProperty("java.io.tmpdir").replaceFirst("[a-zA-Z]:", ""),
UUID.randomUUID().toString).getPath
Copy link
Member

Choose a reason for hiding this comment

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

Hi, @Myasuka .
I'm just wondering why do you change getAbsolutePath to getPath together? Is it related to your fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, getAbsolutePath will still get path with driver letter and colon, which is illegal fro HDFS, that's why I change getAbsolutePath to getPath.

Copy link
Member

Choose a reason for hiding this comment

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

In that case, what about this?

val nonExistentDirectory = new File(
  System.getProperty("java.io.tmpdir"), 
  UUID.randomUUID().toString).getAbsolutePath.replaceFirst("[a-zA-Z]:", "")

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is the same, if you prefer this change, I could add another commit.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@vanzin
Copy link
Contributor

vanzin commented Nov 26, 2018

Doesn't SPARK-25778 / #22867 already take care of this?

@gaborgsomogyi
Copy link
Contributor

@Myasuka +1 what Marcelo asked. Can you either update your PR or close it?

@vanzin
Copy link
Contributor

vanzin commented Dec 14, 2018

I'm just going to close this for now since it's pretty old anyway. It can always be reopened.

@vanzin vanzin closed this Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants