Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/5732#discussion_r29429719
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/dstream/ReceiverInputDStream.scala
---
@@ -67,27 +67,26 @@ abstract class ReceiverInputDStream[T:
ClassTag](@transient ssc_ : StreamingCont
} else {
// Otherwise, ask the tracker for all the blocks that have been
allocated to this stream
// for this batch
- val blockInfos =
-
ssc.scheduler.receiverTracker.getBlocksOfBatch(validTime).get(id).getOrElse(Seq.empty)
- val blockStoreResults = blockInfos.map { _.blockStoreResult }
- val blockIds = blockStoreResults.map {
_.blockId.asInstanceOf[BlockId] }.toArray
+ val receiverTracker = ssc.scheduler.receiverTracker
+ val blockInfos =
receiverTracker.getBlocksOfBatch(validTime).getOrElse(id, Seq.empty)
+ val blockIds = blockInfos.map { _.blockId.asInstanceOf[BlockId]
}.toArray
- // Check whether all the results are of the same type
- val resultTypes = blockStoreResults.map { _.getClass }.distinct
- if (resultTypes.size > 1) {
- logWarning("Multiple result types in block information, WAL
information will be ignored.")
- }
+ // Is WAL segment info present with all the blocks
+ val isWALSegmentInfoPresent = blockInfos.forall {
_.walRecordHandleOption.nonEmpty }
--- End diff --
is it better to rename as `isWALRecordHandleInfoPresent` ? Looked though
this part of code, some variables use `segment` but actually is `handle`, might
be better to keep consistent :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]