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
fix style, fix test
  • Loading branch information
yifeih committed May 13, 2019
commit 93c244990d066696c1b42cdf5a2eea8a5856c243
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.spark.api.shuffle;

import org.apache.spark.api.java.Optional;

import java.util.Objects;

/**
Expand Down
16 changes: 8 additions & 8 deletions core/src/test/scala/org/apache/spark/MapOutputTrackerSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ class MapOutputTrackerSuite extends SparkFunSuite {
tracker.registerMapOutput(10, 1, MapStatus(BlockManagerId("b", "hostB", 1000),
Array(10000L, 1000L)))
val statuses = tracker.getMapSizesByShuffleLocation(10, 0)
assert(statuses.toSet ===
Seq(
(Some(DefaultMapShuffleLocations.get(BlockManagerId("a", "hostA", 1000))),
ArrayBuffer((ShuffleBlockId(10, 0, 0), size1000))),
(Some(DefaultMapShuffleLocations.get(BlockManagerId("b", "hostB", 1000))),
ArrayBuffer((ShuffleBlockId(10, 1, 0), size10000))))
.toSet)
val output = Seq(
(DefaultMapShuffleLocations.get(BlockManagerId("a", "hostA", 1000)).getLocationsForBlock(0),
ArrayBuffer((ShuffleBlockId(10, 0, 0), size1000))),
(DefaultMapShuffleLocations.get(BlockManagerId("b", "hostB", 1000)).getLocationsForBlock(0),
ArrayBuffer((ShuffleBlockId(10, 1, 0), size10000))))
.toSet
assert(statuses.toSet === output)
assert(0 == tracker.getNumCachedSerializedBroadcast)
tracker.stop()
rpcEnv.shutdown()
Expand Down Expand Up @@ -157,7 +157,7 @@ class MapOutputTrackerSuite extends SparkFunSuite {
slaveTracker.updateEpoch(masterTracker.getEpoch)
assert(slaveTracker.getMapSizesByShuffleLocation(10, 0).toSeq ===
Seq(
(Some(DefaultMapShuffleLocations.get(BlockManagerId("a", "hostA", 1000))),
(DefaultMapShuffleLocations.get(BlockManagerId("a", "hostA", 1000)).getLocationsForBlock(0),
ArrayBuffer((ShuffleBlockId(10, 0, 0), size1000)))))
assert(0 == masterTracker.getNumCachedSerializedBroadcast)

Expand Down