diff options
author | Kousuke Saruta <sarutak@oss.nttdata.co.jp> | 2015-01-25 15:34:20 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-01-25 15:34:20 -0800 |
commit | 8f5c827b01026bf45fc774ed7387f11a941abea8 (patch) | |
tree | f6db03737fdf904b6a400b24116d78bb7573aab9 /core/src/main/scala/org/apache | |
parent | 9f6435763d173d2abf82d16b5878983fa8bf3419 (diff) | |
download | spark-8f5c827b01026bf45fc774ed7387f11a941abea8.tar.gz spark-8f5c827b01026bf45fc774ed7387f11a941abea8.tar.bz2 spark-8f5c827b01026bf45fc774ed7387f11a941abea8.zip |
[SPARK-5344][WebUI] HistoryServer cannot recognize that inprogress file was renamed to completed file
`FsHistoryProvider` tries to update application status but if `checkForLogs` is called before `.inprogress` file is renamed to completed file, the file is not recognized as completed.
Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>
Closes #4132 from sarutak/SPARK-5344 and squashes the following commits:
9658008 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into SPARK-5344
d2c72b6 [Kousuke Saruta] Fixed update issue of FsHistoryProvider
Diffstat (limited to 'core/src/main/scala/org/apache')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala b/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala index 2b084a2d73..0ae45f4ad9 100644 --- a/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala +++ b/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala @@ -203,7 +203,9 @@ private[history] class FsHistoryProvider(conf: SparkConf) extends ApplicationHis if (!logInfos.isEmpty) { val newApps = new mutable.LinkedHashMap[String, FsApplicationHistoryInfo]() def addIfAbsent(info: FsApplicationHistoryInfo) = { - if (!newApps.contains(info.id)) { + if (!newApps.contains(info.id) || + newApps(info.id).logPath.endsWith(EventLoggingListener.IN_PROGRESS) && + !info.logPath.endsWith(EventLoggingListener.IN_PROGRESS)) { newApps += (info.id -> info) } } |