You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/05 06:59:40 UTC
[GitHub] [spark] yanxiaole commented on a change in pull request #29350: [SPARK-32529][CORE] Fix Historyserver log scan aborted by application status change
yanxiaole commented on a change in pull request #29350:
URL: https://github.com/apache/spark/pull/29350#discussion_r465514321
##########
File path: core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -530,10 +530,16 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
// If the file is currently not being tracked by the SHS, add an entry for it and try
// to parse it. This will allow the cleaner code to detect the file as stale later on
// if it was not possible to parse it.
- listing.write(LogInfo(reader.rootPath.toString(), newLastScanTime, LogType.EventLogs,
- None, None, reader.fileSizeForLastIndex, reader.lastIndex, None,
- reader.completed))
- reader.fileSizeForLastIndex > 0
+ try {
+ listing.write(LogInfo(reader.rootPath.toString(), newLastScanTime,
+ LogType.EventLogs, None, None, reader.fileSizeForLastIndex, reader.lastIndex,
+ None, reader.completed))
+ reader.fileSizeForLastIndex > 0
+ } catch {
+ case _: FileNotFoundException => false
+ }
+ case _: FileNotFoundException =>
Review comment:
added
> nit: I'd have empty new line after `}`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org