You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Alessandro Bellina (JIRA)" <ji...@apache.org> on 2019/02/22 13:16:00 UTC
[jira] [Commented] (SPARK-26945) Python streaming tests flaky while
cleaning temp directories after StreamingQuery.stop
[ https://issues.apache.org/jira/browse/SPARK-26945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775125#comment-16775125 ]
Alessandro Bellina commented on SPARK-26945:
--------------------------------------------
[~hyukjin.kwon] thanks for taking a look. Seems like q.processAllAvailable is designed for this use case.
> Python streaming tests flaky while cleaning temp directories after StreamingQuery.stop
> --------------------------------------------------------------------------------------
>
> Key: SPARK-26945
> URL: https://issues.apache.org/jira/browse/SPARK-26945
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 2.4.0
> Reporter: Alessandro Bellina
> Priority: Minor
>
> From the test code, it seems like the `shmutil.rmtree` function is trying to delete a directory, but there's likely another thread adding entries to a directory, so when it gets to `os.rmdir(path)` it blows up. I think the test (and other streaming tests) should call `q.awaitTermination` after `q.stop`, before going on. I'll file a separate jira.
> {noformat}
> ERROR: test_query_manager_await_termination (pyspark.sql.tests.test_streaming.StreamingTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/home/jenkins/workspace/SparkPullRequestBuilder/python/pyspark/sql/tests/test_streaming.py", line 259, in test_query_manager_await_termination
> shutil.rmtree(tmpPath)
> File "/home/anaconda/lib/python2.7/shutil.py", line 256, in rmtree
> onerror(os.rmdir, path, sys.exc_info())
> File "/home/anaconda/lib/python2.7/shutil.py", line 254, in rmtree
> os.rmdir(path)
> OSError: [Errno 39] Directory not empty: '/home/jenkins/workspace/SparkPullRequestBuilder/python/target/072153bd-f981-47be-bda2-e2b657a16f65/tmp4WGp7n'{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org