You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2017/11/10 19:07:32 UTC

[GitHub] spark pull request #19407: [SPARK-21667][Streaming] ConsoleSink should not f...

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

    https://github.com/apache/spark/pull/19407#discussion_r150314230
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/streaming/DataStreamWriter.scala ---
    @@ -267,11 +267,12 @@ final class DataStreamWriter[T] private[sql](ds: Dataset[T]) {
             useTempCheckpointLocation = true,
             trigger = trigger)
         } else {
    -      val (useTempCheckpointLocation, recoverFromCheckpointLocation) =
    +      val recoverFromCheckpointLocation = true
    +      val useTempCheckpointLocation =
    --- End diff --
    
    nit: `val useTempCheckpointLocation = source == "console"`
    
    you can just also update the below statement to
    ```
          df.sparkSession.sessionState.streamingQueryManager.startQuery(
            extraOptions.get("queryName"),
            extraOptions.get("checkpointLocation"),
            df,
            dataSource.createSink(outputMode),
            outputMode,
            useTempCheckpointLocation = source == "console",
            recoverFromCheckpointLocation = true,
            trigger = trigger)
    ```


---

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