Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/6935#discussion_r51447272
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -613,13 +739,23 @@ private[history] class FsHistoryProvider(conf:
SparkConf, clock: Clock)
private def getModificationTime(fsEntry: FileStatus): Option[Long] = {
if (isLegacyLogDirectory(fsEntry)) {
val statusList = fs.listStatus(fsEntry.getPath)
- if (!statusList.isEmpty)
Some(statusList.map(_.getModificationTime()).max) else None
+ if (statusList.nonEmpty)
Some(statusList.map(_.getModificationTime()).max) else None
} else {
Some(fsEntry.getModificationTime())
}
}
/**
+ * Get the size of the log, or `None` if there isn't one in the child
+ * directory of a legacy log entry
--- End diff --
I think the comment should just be " ... `None` for a legacy log entry".
That is, if there is a legacy log entry, you don't try to look at any of the
files in the directory, so you'll never update incompleted apps. Which I think
is fine.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]