You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by we...@apache.org on 2017/08/20 16:45:30 UTC
spark git commit: [SPARK-21721][SQL][FOLLOWUP] Clear FileSystem
deleteOnExit cache when paths are successfully removed
Repository: spark
Updated Branches:
refs/heads/master 41e0eb71a -> 28a6cca7d
[SPARK-21721][SQL][FOLLOWUP] Clear FileSystem deleteOnExit cache when paths are successfully removed
## What changes were proposed in this pull request?
Fix a typo in test.
## How was this patch tested?
Jenkins tests.
Author: Liang-Chi Hsieh <vi...@gmail.com>
Closes #19005 from viirya/SPARK-21721-followup.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/28a6cca7
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/28a6cca7
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/28a6cca7
Branch: refs/heads/master
Commit: 28a6cca7df900d13613b318c07acb97a5722d2b8
Parents: 41e0eb7
Author: Liang-Chi Hsieh <vi...@gmail.com>
Authored: Mon Aug 21 00:45:23 2017 +0800
Committer: Wenchen Fan <we...@databricks.com>
Committed: Mon Aug 21 00:45:23 2017 +0800
----------------------------------------------------------------------
.../org/apache/spark/sql/hive/execution/SQLQuerySuite.scala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/28a6cca7/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
----------------------------------------------------------------------
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
index ef3d9b2..d0e0d20 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
@@ -2023,7 +2023,8 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
}
test("SPARK-21721: Clear FileSystem deleterOnExit cache if path is successfully removed") {
- withTable("test21721") {
+ val table = "test21721"
+ withTable(table) {
val deleteOnExitField = classOf[FileSystem].getDeclaredField("deleteOnExit")
deleteOnExitField.setAccessible(true)
@@ -2031,10 +2032,10 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
val setOfPath = deleteOnExitField.get(fs).asInstanceOf[Set[Path]]
val testData = sparkContext.parallelize(1 to 10).map(i => TestData(i, i.toString)).toDF()
- sql("CREATE TABLE test21721 (key INT, value STRING)")
+ sql(s"CREATE TABLE $table (key INT, value STRING)")
val pathSizeToDeleteOnExit = setOfPath.size()
- (0 to 10).foreach(_ => testData.write.mode(SaveMode.Append).insertInto("test1"))
+ (0 to 10).foreach(_ => testData.write.mode(SaveMode.Append).insertInto(table))
assert(setOfPath.size() == pathSizeToDeleteOnExit)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org