Skip to content

Commit 5f9df24

Browse files
committed
style
1 parent 7fd156a commit 5f9df24

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

core/src/main/scala/org/apache/spark/status/api/v1/JsonRootResource.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ class JsonRootResource extends UIRootFromServletContext {
8686
}
8787

8888
object JsonRootResource {
89-
def getJsonServlet(uiRoot: UIRoot) = {
89+
90+
def getJsonServlet(uiRoot: UIRoot): ServletContextHandler = {
9091
val jerseyContext = new ServletContextHandler(ServletContextHandler.NO_SESSIONS)
9192
jerseyContext.setContextPath("/json")
9293
val holder:ServletHolder = new ServletHolder(classOf[ServletContainer])

core/src/main/scala/org/apache/spark/status/api/v1/OneStageAttemptResource.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ class OneStageAttemptResource(uiRoot: UIRoot) {
5353
val stageAttempts = stageAndStatus.flatMap{ case (status, stages) =>
5454
stages.filter { _.stageId == stageId }.map{_.attemptId}
5555
}
56-
if (stageAttempts.isEmpty)
56+
if (stageAttempts.isEmpty) {
5757
throw new NotFoundException(s"unknown stage: $stageId")
58-
else
58+
} else {
5959
throw new NotFoundException(s"unknown attempt for stage $stageId. " +
6060
s"Found attempts: ${stageAttempts.mkString("[", ",", "]")}")
61+
}
6162
}
6263

6364
}

0 commit comments

Comments
 (0)