@@ -125,7 +125,7 @@ class BroadcastSuite extends FunSuite with LocalSparkContext {
125
125
// Verify that the broadcast file is created, and blocks are persisted only on the driver
126
126
def afterCreation (blockIds : Seq [BroadcastBlockId ], bmm : BlockManagerMaster ) {
127
127
assert(blockIds.size === 1 )
128
- val statuses = bmm.getBlockStatus(blockIds.head)
128
+ val statuses = bmm.getBlockStatus(blockIds.head, askSlaves = true )
129
129
assert(statuses.size === 1 )
130
130
statuses.head match { case (bm, status) =>
131
131
assert(bm.executorId === " <driver>" , " Block should only be on the driver" )
@@ -142,7 +142,7 @@ class BroadcastSuite extends FunSuite with LocalSparkContext {
142
142
// Verify that blocks are persisted in both the executors and the driver
143
143
def afterUsingBroadcast (blockIds : Seq [BroadcastBlockId ], bmm : BlockManagerMaster ) {
144
144
assert(blockIds.size === 1 )
145
- val statuses = bmm.getBlockStatus(blockIds.head)
145
+ val statuses = bmm.getBlockStatus(blockIds.head, askSlaves = true )
146
146
assert(statuses.size === numSlaves + 1 )
147
147
statuses.foreach { case (_, status) =>
148
148
assert(status.storageLevel === StorageLevel .MEMORY_AND_DISK )
@@ -155,7 +155,7 @@ class BroadcastSuite extends FunSuite with LocalSparkContext {
155
155
// is true. In the latter case, also verify that the broadcast file is deleted on the driver.
156
156
def afterUnpersist (blockIds : Seq [BroadcastBlockId ], bmm : BlockManagerMaster ) {
157
157
assert(blockIds.size === 1 )
158
- val statuses = bmm.getBlockStatus(blockIds.head)
158
+ val statuses = bmm.getBlockStatus(blockIds.head, askSlaves = true )
159
159
val expectedNumBlocks = if (removeFromDriver) 0 else 1
160
160
val possiblyNot = if (removeFromDriver) " " else " not"
161
161
assert(statuses.size === expectedNumBlocks,
@@ -197,7 +197,7 @@ class BroadcastSuite extends FunSuite with LocalSparkContext {
197
197
// Verify that blocks are persisted only on the driver
198
198
def afterCreation (blockIds : Seq [BroadcastBlockId ], bmm : BlockManagerMaster ) {
199
199
blockIds.foreach { blockId =>
200
- val statuses = bmm.getBlockStatus(blockIds.head)
200
+ val statuses = bmm.getBlockStatus(blockIds.head, askSlaves = true )
201
201
assert(statuses.size === 1 )
202
202
statuses.head match { case (bm, status) =>
203
203
assert(bm.executorId === " <driver>" , " Block should only be on the driver" )
@@ -211,7 +211,7 @@ class BroadcastSuite extends FunSuite with LocalSparkContext {
211
211
// Verify that blocks are persisted in both the executors and the driver
212
212
def afterUsingBroadcast (blockIds : Seq [BroadcastBlockId ], bmm : BlockManagerMaster ) {
213
213
blockIds.foreach { blockId =>
214
- val statuses = bmm.getBlockStatus(blockId)
214
+ val statuses = bmm.getBlockStatus(blockId, askSlaves = true )
215
215
if (blockId.field == " meta" ) {
216
216
// Meta data is only on the driver
217
217
assert(statuses.size === 1 )
@@ -235,7 +235,7 @@ class BroadcastSuite extends FunSuite with LocalSparkContext {
235
235
val expectedNumBlocks = if (removeFromDriver) 0 else 1
236
236
val possiblyNot = if (removeFromDriver) " " else " not"
237
237
blockIds.foreach { blockId =>
238
- val statuses = bmm.getBlockStatus(blockId)
238
+ val statuses = bmm.getBlockStatus(blockId, askSlaves = true )
239
239
assert(statuses.size === expectedNumBlocks,
240
240
" Block should%s be unpersisted on the driver" .format(possiblyNot))
241
241
}
0 commit comments