aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/scala
diff options
context:
space:
mode:
authorImran Rashid <irashid@cloudera.com>2016-09-21 17:49:36 -0400
committerAndrew Or <andrewor14@gmail.com>2016-09-21 17:49:36 -0400
commit9fcf1c51d518847eda7f5ea71337cfa7def3c45c (patch)
tree6897409cc22d91c539ca3fec581438087d4a7bd6 /core/src/test/scala
parent2cd1bfa4f0c6625b0ab1dbeba2b9586b9a6a9f42 (diff)
downloadspark-9fcf1c51d518847eda7f5ea71337cfa7def3c45c.tar.gz
spark-9fcf1c51d518847eda7f5ea71337cfa7def3c45c.tar.bz2
spark-9fcf1c51d518847eda7f5ea71337cfa7def3c45c.zip
[SPARK-17623][CORE] Clarify type of TaskEndReason with a failed task.
## What changes were proposed in this pull request? In TaskResultGetter, enqueueFailedTask currently deserializes the result as a TaskEndReason. But the type is actually more specific, its a TaskFailedReason. This just leads to more blind casting later on – it would be more clear if the msg was cast to the right type immediately, so method parameter types could be tightened. ## How was this patch tested? Existing unit tests via jenkins. Note that the code was already performing a blind-cast to a TaskFailedReason before in any case, just in a different spot, so there shouldn't be any behavior change. Author: Imran Rashid <irashid@cloudera.com> Closes #15181 from squito/SPARK-17623.
Diffstat (limited to 'core/src/test/scala')
-rw-r--r--core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala b/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala
index c89be22a34..00314abf49 100644
--- a/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala
+++ b/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala
@@ -146,7 +146,7 @@ class JsonProtocolSuite extends SparkFunSuite {
val fetchFailed = FetchFailed(BlockManagerId("With or", "without you", 15), 17, 18, 19,
"Some exception")
val fetchMetadataFailed = new MetadataFetchFailedException(17,
- 19, "metadata Fetch failed exception").toTaskEndReason
+ 19, "metadata Fetch failed exception").toTaskFailedReason
val exceptionFailure = new ExceptionFailure(exception, Seq.empty[AccumulableInfo])
testTaskEndReason(Success)
testTaskEndReason(Resubmitted)