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

    https://github.com/apache/spark/pull/22952#discussion_r237200636
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamOptions.scala
 ---
    @@ -74,6 +76,39 @@ class FileStreamOptions(parameters: 
CaseInsensitiveMap[String]) extends Logging
        */
       val fileNameOnly: Boolean = withBooleanParameter("fileNameOnly", false)
     
    +  /**
    +   * The archive directory to move completed files. The option will be 
only effective when
    +   * "cleanSource" is set to "archive".
    +   *
    +   * Note that the completed file will be moved to this archive directory 
with respecting to
    +   * its own path.
    +   *
    +   * For example, if the path of source file is "/a/b/dataset.txt", and 
the path of archive
    +   * directory is "/archived/here", file will be moved to 
"/archived/here/a/b/dataset.txt".
    +   */
    +  val sourceArchiveDir: Option[String] = parameters.get("sourceArchiveDir")
    +
    +  /**
    +   * Defines how to clean up completed files. Available options are 
"archive", "delete", "no_op".
    +   */
    +  val cleanSource: CleanSourceMode.Value = {
    +    val modeStrOption = parameters.getOrElse("cleanSource", 
CleanSourceMode.NO_OP.toString)
    --- End diff --
    
    nit: could you create a method to `CleanSourceMode` to convert a string to 
`CleanSourceMode.Value`?


---

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

Reply via email to