Repository: spark
Updated Branches:
  refs/heads/branch-2.3 73408f085 -> 8d7723f2e


[CORE][MINOR] Fix obvious error and compiling for Scala 2.12.7

## What changes were proposed in this pull request?

Fix an obvious error.

## How was this patch tested?

Existing tests.

Closes #22577 from sadhen/minor_fix.

Authored-by: Darcy Shen <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit 40e6ed89405828ff312eca0abd43cfba4b9185b2)
Signed-off-by: Sean Owen <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8d7723f2
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8d7723f2
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8d7723f2

Branch: refs/heads/branch-2.3
Commit: 8d7723f2ef7113315aba16fc2f5f9b532d18ef16
Parents: 73408f0
Author: Darcy Shen <[email protected]>
Authored: Sun Sep 30 09:00:23 2018 -0500
Committer: Sean Owen <[email protected]>
Committed: Sun Sep 30 09:00:54 2018 -0500

----------------------------------------------------------------------
 .../org/apache/spark/status/api/v1/OneApplicationResource.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/8d7723f2/core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
 
b/core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
index bd4df07..e0ff68b 100644
--- 
a/core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
+++ 
b/core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
@@ -155,7 +155,7 @@ private[v1] class OneApplicationAttemptResource extends 
AbstractApplicationResou
   def getAttempt(): ApplicationAttemptInfo = {
     uiRoot.getApplicationInfo(appId)
       .flatMap { app =>
-        app.attempts.filter(_.attemptId == attemptId).headOption
+        app.attempts.find(_.attemptId.contains(attemptId))
       }
       .getOrElse {
         throw new NotFoundException(s"unknown app $appId, attempt $attemptId")


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

Reply via email to