diff options
author | Mosharaf Chowdhury <mosharaf@cs.berkeley.edu> | 2013-10-17 13:14:12 -0700 |
---|---|---|
committer | Mosharaf Chowdhury <mosharaf@cs.berkeley.edu> | 2013-10-17 13:14:12 -0700 |
commit | 35b2415fb32cea506c60d6f1f824ac194f4604f8 (patch) | |
tree | 6d4187f386848ad618877a251f7430e46e5b6d22 /core | |
parent | e6637504880a941f909ece188573ee0c4853b96b (diff) | |
download | spark-35b2415fb32cea506c60d6f1f824ac194f4604f8.tar.gz spark-35b2415fb32cea506c60d6f1f824ac194f4604f8.tar.bz2 spark-35b2415fb32cea506c60d6f1f824ac194f4604f8.zip |
Code styling. Updated doc.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala b/core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala index 8c23584d60..073a0a5029 100644 --- a/core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala +++ b/core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala @@ -84,7 +84,7 @@ extends Broadcast[T](id) with Logging with Serializable { val start = System.nanoTime logInfo("Started reading broadcast variable " + id) - // Master might send invalid values + // Initialize @transient variables that will receive garbage values from the master. resetWorkerVariables() if (receiveBroadcast(id)) { @@ -135,8 +135,9 @@ extends Broadcast[T](id) with Logging with Serializable { } attemptId -= 1 } - if (totalBlocks == -1) + if (totalBlocks == -1) { return false + } // Receive actual blocks val recvOrder = new Random().shuffle(Array.iterate(0, totalBlocks)(_ + 1).toList) @@ -151,8 +152,7 @@ extends Broadcast[T](id) with Logging with Serializable { pieceId, arrayOfBlocks(pid), StorageLevel.MEMORY_AND_DISK, true) case None => - throw new SparkException( - "Failed to get " + pieceId + " of " + broadcastId) + throw new SparkException("Failed to get " + pieceId + " of " + broadcastId) } } } |