Skip to content

Commit 482c5af

Browse files
committed
Turn UpdateBlockInfo into case class.
This helps us log UpdateBlockInfo properly once #1870 is merged. Author: Reynold Xin <[email protected]> Closes #1872 from rxin/UpdateBlockInfo and squashes the following commits: 0cee1c2 [Reynold Xin] Turn UpdateBlockInfo into case class.
1 parent 5b6585d commit 482c5af

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

core/src/main/scala/org/apache/spark/storage/BlockManagerMessages.scala

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private[spark] object BlockManagerMessages {
5353
sender: ActorRef)
5454
extends ToBlockManagerMaster
5555

56-
class UpdateBlockInfo(
56+
case class UpdateBlockInfo(
5757
var blockManagerId: BlockManagerId,
5858
var blockId: BlockId,
5959
var storageLevel: StorageLevel,
@@ -84,24 +84,6 @@ private[spark] object BlockManagerMessages {
8484
}
8585
}
8686

87-
object UpdateBlockInfo {
88-
def apply(
89-
blockManagerId: BlockManagerId,
90-
blockId: BlockId,
91-
storageLevel: StorageLevel,
92-
memSize: Long,
93-
diskSize: Long,
94-
tachyonSize: Long): UpdateBlockInfo = {
95-
new UpdateBlockInfo(blockManagerId, blockId, storageLevel, memSize, diskSize, tachyonSize)
96-
}
97-
98-
// For pattern-matching
99-
def unapply(h: UpdateBlockInfo)
100-
: Option[(BlockManagerId, BlockId, StorageLevel, Long, Long, Long)] = {
101-
Some((h.blockManagerId, h.blockId, h.storageLevel, h.memSize, h.diskSize, h.tachyonSize))
102-
}
103-
}
104-
10587
case class GetLocations(blockId: BlockId) extends ToBlockManagerMaster
10688

10789
case class GetLocationsMultipleBlockIds(blockIds: Array[BlockId]) extends ToBlockManagerMaster

0 commit comments

Comments
 (0)