Github user petermaxlee commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15067#discussion_r79278249
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
 ---
    @@ -125,6 +125,32 @@ class StreamingQuerySuite extends StreamTest with 
BeforeAndAfter {
         )
       }
     
    +  testQuietly("StreamExecution metadata garbarge collection") {
    +    val inputData = MemoryStream[Int]
    +    val mapped = inputData.toDS().map(6 / _)
    +
    +    // Run a few batches through the application
    +    testStream(mapped)(
    +      AddData(inputData, 1, 2),
    +      CheckAnswer(6, 3),
    +      AddData(inputData, 1, 2),
    +      CheckAnswer(6, 3, 6, 3),
    +      AddData(inputData, 4, 6),
    +      CheckAnswer(6, 3, 6, 3, 1, 1),
    +
    +      // Three batches have run, but only one set of metadata should be 
present
    +      AssertOnQuery(
    +        q => {
    +          val metadataLogDir = new 
java.io.File(q.offsetLog.metadataPath.toString)
    +          val logFileNames = 
metadataLogDir.listFiles().toSeq.map(_.getName())
    +          val toTest = logFileNames.filter(! _.endsWith(".crc")) // 
Workaround for SPARK-17475
    +          toTest.size == 1 && toTest.head == "2"
    --- End diff --
    
    actually this test case will always pass, even without the change here. I 
will submit a patch based on yours that fixes the issues here.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to