Skip to content

Commit ec160aa

Browse files
committed
sorting and checkstyle
1 parent 3ccad53 commit ec160aa

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

core/src/main/scala/org/apache/spark/ui/storage/RDDPage.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ private[ui] class BlockDataSource(
200200
rddPartition.storageLevel,
201201
rddPartition.memoryUsed,
202202
rddPartition.diskUsed,
203-
rddPartition.executors.map(id => executorIdToAddress.get(id).getOrElse(id)).mkString(" "))
203+
rddPartition.executors
204+
.sorted
205+
.map { id => executorIdToAddress.get(id).getOrElse(id) }
206+
.mkString(" "))
204207
}
205208

206209
/**
@@ -247,7 +250,7 @@ private[ui] class BlockPagedTable(
247250
pageSize,
248251
sortColumn,
249252
desc,
250-
executorSummaries.map(ex => (ex.id, ex.hostPort)).toMap)
253+
executorSummaries.map { ex => (ex.id, ex.hostPort) }.toMap)
251254

252255
override def pageLink(page: Int): String = {
253256
val encodedSortColumn = URLEncoder.encode(sortColumn, "UTF-8")

graphx/src/main/scala/org/apache/spark/graphx/lib/LabelPropagation.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ object LabelPropagation {
5555
val count1Val = count1.getOrElse(i, 0L)
5656
val count2Val = count2.getOrElse(i, 0L)
5757
i -> (count1Val + count2Val)
58-
}(collection.breakOut) // more efficient alternative to [[collection.Traversable.toMap]]
58+
}(collection.breakOut) // more efficient alternative to [[collection.Traversable
59+
// .toMap]]
5960
}
6061
def vertexProgram(vid: VertexId, attr: Long, message: Map[VertexId, Long]): VertexId = {
6162
if (message.isEmpty) attr else message.maxBy(_._2)._1

0 commit comments

Comments
 (0)