Skip to content

Commit dc615b9

Browse files
vvysotskyiekrivokonmapr
authored andcommitted
MapR [SPARK-737] Calling poll(1000) from paranoidPoll causes batch scheduling delay (apache#675)
1 parent 84fcd71 commit dc615b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/DirectKafkaInputDStream.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private[spark] class DirectKafkaInputDStream[K, V](
170170
* which would throw off consumer position. Fix position if this happens.
171171
*/
172172
private def paranoidPoll(c: Consumer[K, V]): Unit = {
173-
val msgs = c.poll(1000)
173+
val msgs = c.poll(0)
174174

175175
val newAssignment = c.assignment()
176176
val parts = if (currentOffsets.size < newAssignment.size()) {

external/kafka-0-9/src/main/scala/org/apache/spark/streaming/kafka09/DirectKafkaInputDStream.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private[spark] class DirectKafkaInputDStream[K, V](
171171
* which would throw off consumer position. Fix position if this happens.
172172
*/
173173
private def paranoidPoll(c: Consumer[K, V]): Unit = {
174-
val msgs = c.poll(1000)
174+
val msgs = c.poll(0)
175175

176176
val newAssignment = c.assignment()
177177
val parts = if (currentOffsets.size < newAssignment.size()) {

0 commit comments

Comments
 (0)