You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2014/12/13 10:06:11 UTC

[GitHub] spark pull request: [SPARK-4518][SPARK-4519][Streaming] Refactored...

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

    https://github.com/apache/spark/pull/3419#discussion_r21787066
  
    --- Diff: streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala ---
    @@ -268,6 +232,50 @@ class InputStreamsSuite extends TestSuiteBase with BeforeAndAfter {
           assert(output(i) === expectedOutput(i))
         }
       }
    +
    +  def testFileStream(newFilesOnly: Boolean) {
    +    var ssc: StreamingContext = null
    +    val testDir: File = null
    +    try {
    +      val testDir = Utils.createTempDir()
    +      val existingFile = new File(testDir, "0")
    +      Files.write("0\n", existingFile, Charset.forName("UTF-8"))
    +
    +      Thread.sleep(1000)
    +      // Set up the streaming context and input streams
    +      val newConf = conf.clone.set(
    +        "spark.streaming.clock", "org.apache.spark.streaming.util.SystemClock")
    --- End diff --
    
    Just curious:  why does this test need to use wallclock time instead of the same sort of `ManualClock` + `Thread.sleep()` pattern that occurs elsewhere in the code?  I'm in the middle of a hunt to remove Thread.sleep() calls, so this caught my eye.


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

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