Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/17124#discussion_r103865389
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/StateStoreSuite.scala
---
@@ -295,6 +295,28 @@ class StateStoreSuite extends SparkFunSuite with
BeforeAndAfter with PrivateMeth
provider.getStore(0).commit()
}
+ test("SPARK-19779: A tmp file of delta file should not be reserved on
HDFS " +
--- End diff --
Instead of adding a new test, I prefer to just add several lines to the
above `SPARK-19677: Committing a delta file atop an existing one should not
fail on HDFS`. E.g.
```
test("SPARK-19677: Committing a delta file atop an existing one should
not fail on HDFS") {
val conf = new Configuration()
conf.set("fs.fake.impl", classOf[RenameLikeHDFSFileSystem].getName)
conf.set("fs.default.name", "fake:///")
val provider = newStoreProvider(hadoopConf = conf)
provider.getStore(0).commit()
provider.getStore(0).commit()
// Verify we don't leak temp files
val tempFiles = FileUtils.listFiles(new
File(provider.id.checkpointLocation), null, true)
.asScala.filter(_.getName.contains("temp-"))
assert(tempFiles.isEmpty)
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]