@@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletRequest
2323import scala .xml .{Node , Unparsed }
2424
2525import org .apache .spark .status .AppStatusStore
26- import org .apache .spark .status .api .v1 .{RDDDataDistribution , RDDPartitionInfo }
26+ import org .apache .spark .status .api .v1 .{ExecutorSummary , RDDDataDistribution , RDDPartitionInfo }
2727import org .apache .spark .ui ._
2828import org .apache .spark .util .Utils
2929
@@ -76,7 +76,8 @@ private[ui] class RDDPage(parent: SparkUITab, store: AppStatusStore) extends Web
7676 rddStorageInfo.partitions.get,
7777 blockPageSize,
7878 blockSortColumn,
79- blockSortDesc)
79+ blockSortDesc,
80+ store.executorList(false ))
8081 _blockTable.table(page)
8182 } catch {
8283 case e @ (_ : IllegalArgumentException | _ : IndexOutOfBoundsException ) =>
@@ -182,7 +183,8 @@ private[ui] class BlockDataSource(
182183 rddPartitions : Seq [RDDPartitionInfo ],
183184 pageSize : Int ,
184185 sortColumn : String ,
185- desc : Boolean ) extends PagedDataSource [BlockTableRowData ](pageSize) {
186+ desc : Boolean ,
187+ executorIdToAddress : Map [String , String ]) extends PagedDataSource [BlockTableRowData ](pageSize) {
186188
187189 private val data = rddPartitions.map(blockRow).sorted(ordering(sortColumn, desc))
188190
@@ -198,7 +200,7 @@ private[ui] class BlockDataSource(
198200 rddPartition.storageLevel,
199201 rddPartition.memoryUsed,
200202 rddPartition.diskUsed,
201- rddPartition.executors.mkString(" " ))
203+ rddPartition.executors.map(id => executorIdToAddress.get(id).getOrElse(id)). mkString(" " ))
202204 }
203205
204206 /**
@@ -226,7 +228,8 @@ private[ui] class BlockPagedTable(
226228 rddPartitions : Seq [RDDPartitionInfo ],
227229 pageSize : Int ,
228230 sortColumn : String ,
229- desc : Boolean ) extends PagedTable [BlockTableRowData ] {
231+ desc : Boolean ,
232+ executorSummaries : Seq [ExecutorSummary ]) extends PagedTable [BlockTableRowData ] {
230233
231234 override def tableId : String = " rdd-storage-by-block-table"
232235
@@ -243,7 +246,8 @@ private[ui] class BlockPagedTable(
243246 rddPartitions,
244247 pageSize,
245248 sortColumn,
246- desc)
249+ desc,
250+ executorSummaries.map(ex => (ex.id, ex.hostPort)).toMap)
247251
248252 override def pageLink (page : Int ): String = {
249253 val encodedSortColumn = URLEncoder .encode(sortColumn, " UTF-8" )
0 commit comments