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

    https://github.com/apache/spark/pull/18887#discussion_r141124934
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -685,26 +618,11 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
        * @return a summary of the component state
        */
       override def toString: String = {
    -    val header = s"""
    -      | FsHistoryProvider: logdir=$logDir,
    -      | last scan time=$lastScanTime
    -      | Cached application count =${applications.size}}
    -    """.stripMargin
    -    val sb = new StringBuilder(header)
    -    applications.foreach(entry => sb.append(entry._2).append("\n"))
    -    sb.toString
    -  }
    -
    -  /**
    -   * Look up an application attempt
    -   * @param appId application ID
    -   * @param attemptId Attempt ID, if set
    -   * @return the matching attempt, if found
    -   */
    -  def lookup(appId: String, attemptId: Option[String]): 
Option[FsApplicationAttemptInfo] = {
    -    applications.get(appId).flatMap { appInfo =>
    -      appInfo.attempts.find(_.attemptId == attemptId)
    -    }
    +    val count = listing.count(classOf[ApplicationInfoWrapper])
    +    s"""|FsHistoryProvider{logdir=$logDir,
    --- End diff --
    
    That would make the string look weird.


---

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

Reply via email to