Skip to content
Closed
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
Refine assert exception
  • Loading branch information
suyanNone committed Jul 21, 2015
commit 4dbe4d32c9364d8c11c417e0e91688ee20160dab
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.spark.scheduler

import org.apache.spark.shuffle.MetadataFetchFailedException

Copy link
Contributor

Choose a reason for hiding this comment

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

this is not used, delete

import scala.collection.mutable.{ArrayBuffer, HashSet, HashMap, Map}
import scala.language.reflectiveCalls
import scala.util.control.NonFatal
Expand Down Expand Up @@ -776,9 +778,11 @@ class DAGSchedulerSuite
runEvent(CompletionEvent(taskSets(0).tasks(2), Success,
makeMapStatus("hostC", shuffleMapRdd.partitions.size), null, createFakeTaskInfo(), null))

val thrown = intercept[Exception] { mapOutputTracker.getServerStatuses(0, 2) }
// Assert not throw MetadataFetchFailedException: Missing an output location for shuffle 0
assert(thrown == null)
try {
mapOutputTracker.getServerStatuses(0, 2)
} catch {
case e: MetadataFetchFailedException => fail("Should not throw metadataFetchFailedException")
}

runEvent(CompletionEvent(taskSets(1).tasks(0), Success,
makeMapStatus("hostC", reduceRdd.partitions.size), null, createFakeTaskInfo(), null))
Expand Down