diff options
author | Karen Feng <karenfeng.us@gmail.com> | 2013-07-24 11:27:17 -0700 |
---|---|---|
committer | Karen Feng <karenfeng.us@gmail.com> | 2013-07-24 11:27:17 -0700 |
commit | bd3931c87415679fef8b91390d50188c3da98430 (patch) | |
tree | f1e3f3d33cc8e0a3ea42361abea222cb9c11b21a /core/src | |
parent | 93c6015f82d4d27a6f09686b1e849be1cbbd0615 (diff) | |
download | spark-bd3931c87415679fef8b91390d50188c3da98430.tar.gz spark-bd3931c87415679fef8b91390d50188c3da98430.tar.bz2 spark-bd3931c87415679fef8b91390d50188c3da98430.zip |
Changed ifs with returns to if/else
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/spark/scheduler/cluster/TaskInfo.scala | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/src/main/scala/spark/scheduler/cluster/TaskInfo.scala b/core/src/main/scala/spark/scheduler/cluster/TaskInfo.scala index f840100eca..afcfe96a09 100644 --- a/core/src/main/scala/spark/scheduler/cluster/TaskInfo.scala +++ b/core/src/main/scala/spark/scheduler/cluster/TaskInfo.scala @@ -53,14 +53,15 @@ class TaskInfo( def status: String = { if (running) - return "RUNNING" - if (failed) - return "FAILED" - if (successful) - return "SUCCESSFUL" - if (finished) - return "FINISHED" - "UNKNOWN" + "RUNNING" + else if (failed) + "FAILED" + else if (successful) + "SUCCESSFUL" + else if (finished) + "FINISHED" + else + "UNKNOWN" } def duration: Long = { |