Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18887#discussion_r141088131
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -318,25 +357,21 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
         try {
           val newLastScanTime = getNewLastScanTime()
           logDebug(s"Scanning $logDir with lastScanTime==$lastScanTime")
    -      val statusList = Option(fs.listStatus(new Path(logDir))).map(_.toSeq)
    -        .getOrElse(Seq.empty[FileStatus])
    +      val statusList = Option(fs.listStatus(new 
Path(logDir))).map(_.toSeq).getOrElse(Nil)
           // scan for modified applications, replay and merge them
    -      val logInfos: Seq[FileStatus] = statusList
    +      val logInfos = statusList
    --- End diff --
    
    can we just do `val logInfos = Option(fs.listStatus(new 
Path(logDir))).map(_.toSeq).getOrElse(Nil)`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to