Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
sorting and checkstyle
  • Loading branch information
attilapiros committed Feb 13, 2018
commit ec160aaaad3c3baef07deb93f9c733c88be35fe0
7 changes: 5 additions & 2 deletions core/src/main/scala/org/apache/spark/ui/storage/RDDPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ private[ui] class BlockDataSource(
rddPartition.storageLevel,
rddPartition.memoryUsed,
rddPartition.diskUsed,
rddPartition.executors.map(id => executorIdToAddress.get(id).getOrElse(id)).mkString(" "))
rddPartition.executors
.sorted
.map { id => executorIdToAddress.get(id).getOrElse(id) }
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should we sort by address?

Copy link
Contributor Author

@attilapiros attilapiros Feb 14, 2018

Choose a reason for hiding this comment

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

ok, done

.mkString(" "))
}

/**
Expand Down Expand Up @@ -247,7 +250,7 @@ private[ui] class BlockPagedTable(
pageSize,
sortColumn,
desc,
executorSummaries.map(ex => (ex.id, ex.hostPort)).toMap)
executorSummaries.map { ex => (ex.id, ex.hostPort) }.toMap)

override def pageLink(page: Int): String = {
val encodedSortColumn = URLEncoder.encode(sortColumn, "UTF-8")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ object LabelPropagation {
val count1Val = count1.getOrElse(i, 0L)
val count2Val = count2.getOrElse(i, 0L)
i -> (count1Val + count2Val)
}(collection.breakOut) // more efficient alternative to [[collection.Traversable.toMap]]
}(collection.breakOut) // more efficient alternative to [[collection.Traversable
// .toMap]]
}
def vertexProgram(vid: VertexId, attr: Long, message: Map[VertexId, Long]): VertexId = {
if (message.isEmpty) attr else message.maxBy(_._2)._1
Expand Down