File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
core/src/main/scala/org/apache/spark/deploy/history Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -129,16 +129,21 @@ class FsHistoryProvider(conf: SparkConf) extends ApplicationHistoryProvider
129129 // For any application that either (i) is not listed or (ii) has changed since the last time
130130 // the listing was created (defined by the log dir's modification time), load the app's info.
131131 // Otherwise just reuse what's already in memory.
132- appList.set(logInfos
133- .map { dir =>
134- val curr = currentApps.getOrElse(dir.getPath().getName(), null )
135- if (curr == null || curr.lastUpdated < getModificationTime(dir)) {
136- loadAppInfo(dir, false )
137- } else {
138- curr
132+ val newApps = new mutable.ListBuffer [ApplicationHistoryInfo ]
133+ for (dir <- logInfos) {
134+ val curr = currentApps.getOrElse(dir.getPath().getName(), null )
135+ if (curr == null || curr.lastUpdated < getModificationTime(dir)) {
136+ try {
137+ newApps += loadAppInfo(dir, false )
138+ } catch {
139+ case e : Exception => logError(s " Failed to load app info from directory $dir. " )
139140 }
141+ } else {
142+ newApps += curr
140143 }
141- .sortBy { info => - info.lastUpdated })
144+ }
145+
146+ appList.set(newApps.sortBy { info => - info.lastUpdated })
142147 } catch {
143148 case t : Throwable => logError(" Exception in checking for event log updates" , t)
144149 }
You can’t perform that action at this time.
0 commit comments