Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f66f2ea
Add AllExecutors REST Endpoint
kishorvpatil Jun 7, 2016
8df49af
Adding ExecutorsPage template
kishorvpatil Jun 8, 2016
c0e2afa
History page for Executors use mustache template
kishorvpatil Jun 14, 2016
3b4962a
Merge branch 'master' of git://git.apache.org/spark into SPARK-15951
kishorvpatil Jun 22, 2016
c73e905
Remove unused javascript methods
kishorvpatil Jun 27, 2016
2453e21
Fix the tooltip placement for detailed executors table headers
kishorvpatil Jul 12, 2016
55419aa
Fix the baseURI reference for safari
kishorvpatil Jul 12, 2016
fc3dbd7
Removed unused imports and refactor to use in-line references
kishorvpatil Jul 12, 2016
3454193
Lower heading level for summary to 4
kishorvpatil Jul 12, 2016
5cf514d
Fixed decimal precision for disk usage displayed
kishorvpatil Jul 13, 2016
31c369a
Refactor common method out and reformat script files
kishorvpatil Jul 13, 2016
eb96c5d
Refactor to use common methods from utils.js
kishorvpatil Jul 13, 2016
43e4a87
Remove unused method
kishorvpatil Jul 13, 2016
fe12d59
Remove unused variables
kishorvpatil Jul 13, 2016
286d6d8
Fix REST API documenation for all executors
kishorvpatil Jul 13, 2016
faf814f
Remove unwanted variables/methods from javascript
kishorvpatil Jul 13, 2016
abf68c7
Fix ExecutorsPage for standalone mode
kishorvpatil Jul 14, 2016
bc132b1
Minor documentation fix
kishorvpatil Jul 14, 2016
66df19f
Move formateBytes function to utils.js
kishorvpatil Jul 14, 2016
e81d45b
Remove commented unused js lines
kishorvpatil Jul 18, 2016
87301c1
Remove unused javascript functions
kishorvpatil Jul 20, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.status.api.v1

import javax.ws.rs.{GET, PathParam, Produces}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PathParam doesn't appear to be used

import javax.ws.rs.core.MediaType

import org.apache.spark.ui.SparkUI
import org.apache.spark.ui.exec.ExecutorsPage

@Produces(Array(MediaType.APPLICATION_JSON))
private[v1] class AllExecutorListResource(ui: SparkUI) {

@GET
def executorList(): Seq[ExecutorSummary] = {
val listener = ui.executorsListener
listener.synchronized {
// The follow codes should be protected by `listener` to make sure no executors will be
// removed before we query their status. See SPARK-12784.
val storageStatusList = listener.activeStorageStatusList
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just change this to be activeNumExecutors = listener.activeStorageStatusList.size since we don't ever use this list other then to get the size. same with below for dead ones.

val deadStorageStatusList = listener.deadStorageStatusList
(0 until storageStatusList.size).map { statusId =>
ExecutorsPage.getExecInfo(listener, statusId, isActive = true)
} ++ (0 until deadStorageStatusList.size).map { statusId =>
ExecutorsPage.getExecInfo(listener, statusId, isActive = false)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ private[v1] class ApiRootResource extends UIRootFromServletContext {
}
}

@Path("applications/{appId}/allexecutors")
def getAllExecutors(@PathParam("appId") appId: String): AllExecutorListResource = {
uiRoot.withSparkUI(appId, None) { ui =>
new AllExecutorListResource(ui)
}
}

@Path("applications/{appId}/{attemptId}/executors")
def getExecutors(
@PathParam("appId") appId: String,
Expand All @@ -100,6 +107,15 @@ private[v1] class ApiRootResource extends UIRootFromServletContext {
}
}

@Path("applications/{appId}/{attemptId}/allexecutors")
def getAllExecutors(
@PathParam("appId") appId: String,
@PathParam("attemptId") attemptId: String): AllExecutorListResource = {
uiRoot.withSparkUI(appId, Some(attemptId)) { ui =>
new AllExecutorListResource(ui)
}
}


@Path("applications/{appId}/stages")
def getStages(@PathParam("appId") appId: String): AllStagesResource = {
Expand Down
6 changes: 5 additions & 1 deletion docs/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@ where `[base-app-id]` is the YARN application ID.
</tr>
<tr>
<td><code>/applications/[app-id]/executors</code></td>
<td>A list of all executors for the given application.</td>
<td>A list of all active executors for the given application.</td>
</tr>
<tr>
<td><code>/applications/[app-id]/executors</code></td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are duplicate end points: /applications/[app-id]/executors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I think you meant allexecutors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<td>A list of all(active/dead) executors for the given application.</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe change active/dead to be active and dead.

</tr>
<tr>
<td><code>/applications/[app-id]/storage/rdd</code></td>
Expand Down