LuciferYang commented on a change in pull request #30353:
URL: https://github.com/apache/spark/pull/30353#discussion_r522085873



##########
File path: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -665,7 +665,7 @@ private[history] class FsHistoryProvider(conf: SparkConf, 
clock: Clock)
     try {
       // If no attempt is specified, or there is no attemptId for attempts, 
return all attempts
       attemptId
-        .map { id => app.attempts.filter(_.info.attemptId == Some(id)) }
+        .map { id => app.attempts.filter(_.info.attemptId.contains(id)) }

Review comment:
       mainly to reduce unnecessary object creation, if the readability is 
affected, it can be left unchanged




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to