Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
SPARK-26734: Remove line break and stop tracker in test.
  • Loading branch information
rlodge committed Feb 5, 2019
commit 9cd6fb57b631316cd098dcba3337490d9582070c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ private[streaming] class ReceivedBlockTracker(
// a few thousand elements. So we explicitly allocate a collection for serialization which
// we know doesn't have this issue. (See SPARK-26734).
val streamIdToBlocks = streamIds.map { streamId =>
(streamId,
mutable.ArrayBuffer(getReceivedBlockQueue(streamId).clone(): _*))
(streamId, mutable.ArrayBuffer(getReceivedBlockQueue(streamId).clone(): _*))
}.toMap
val allocatedBlocks = AllocatedBlocks(streamIdToBlocks)
if (writeToLog(BatchAllocationEvent(batchTime, allocatedBlocks))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ class ReceivedBlockTrackerSuite
BatchAllocationEvent(1, AllocatedBlocks(Map(streamId -> blockInfos)))
getWrittenLogData() shouldEqual expectedWrittenData1
getWriteAheadLogFiles() should have size 1

receivedBlockTracker.stop()
}

test("recovery with write ahead logs should remove only allocated blocks from received queue") {
Expand Down