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-7315][STREAMING][TEST] Fix flaky WALBackedBlockRDDSuite #5853

Closed
wants to merge 2 commits into from

Conversation

tdas
Copy link
Contributor

@tdas tdas commented May 1, 2015

FileUtils.getTempDirectoryPath() path may or may not exist. We want to make sure that it does not exist.

// this dummy directory should not already exist otherwise the WAL will try to recover
// past events from the directory and throw errors.
val nonExistentDirectory = new File(
FileUtils.getTempDirectory(), UUID.randomUUID().toString).getAbsolutePath
Copy link
Member

Choose a reason for hiding this comment

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

I keep trying to get rid of uses of commons-io since it is not actually a Spark dependency. This can be Utils.createTempDir? The other usage in StreamingContextSuite can be replaced with Guava. Not exactly the topic of this PR but might yet be worth doing if you're potentially removing this usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it cannot be Utils.createTempDir because that actually created the directory, which I dont want it to. But I can very easily replace FileUtils.getTimeDirectory with System.getProperty("java.io.tmpDir")

Copy link
Member

Choose a reason for hiding this comment

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

Got it. You can delete the result too but of course this is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I thought the same. But then why do an additional file creation and deletion, especially when this is going to run potentially 10s of times every second.

@SparkQA
Copy link

SparkQA commented May 2, 2015

Test build #31629 has finished for PR 5853 at commit b08d4f1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • "public class " + className + extendsText + " implements java.io.Serializable
    • class DataFrameStatFunctions(object):

@SparkQA
Copy link

SparkQA commented May 2, 2015

Test build #31636 has finished for PR 5853 at commit 141afd5.

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

@asfgit asfgit closed this in ecc6eb5 May 2, 2015
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request May 28, 2015
`FileUtils.getTempDirectoryPath()` path may or may not exist. We want to make sure that it does not exist.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes apache#5853 from tdas/SPARK-7315 and squashes the following commits:

141afd5 [Tathagata Das] Removed use of FileUtils
b08d4f1 [Tathagata Das] Fix flaky WALBackedBlockRDDSuite
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
`FileUtils.getTempDirectoryPath()` path may or may not exist. We want to make sure that it does not exist.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes apache#5853 from tdas/SPARK-7315 and squashes the following commits:

141afd5 [Tathagata Das] Removed use of FileUtils
b08d4f1 [Tathagata Das] Fix flaky WALBackedBlockRDDSuite
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
`FileUtils.getTempDirectoryPath()` path may or may not exist. We want to make sure that it does not exist.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes apache#5853 from tdas/SPARK-7315 and squashes the following commits:

141afd5 [Tathagata Das] Removed use of FileUtils
b08d4f1 [Tathagata Das] Fix flaky WALBackedBlockRDDSuite
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.

3 participants