[ 
https://issues.apache.org/jira/browse/SPARK-14531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236846#comment-15236846
 ] 

Herman Schistad commented on SPARK-14531:
-----------------------------------------

Thanks Yong. I'm actually unsure though if that configuration parameter is a 
bit misleading, after having read the source code a bit more in detail.

>From what I understand the DEFAULT_POLLING_BATCH_SIZE designates the number of 
>events Spark pulls from the Flume sink on each pull, but it does not limit the 
>number of pulls to do within one batch interval. Example: the polling batch 
>size is 1000, the batch interval is 10 seconds and the average pull (from 
>Flume to Spark) takes 500ms. Now, the *total number of events* within the 
>batch interval would be: (10,000/500)*1000 = 20,000.

This can be seen by studying the `run()` method in the FlumeBatchFetcher class 
[0] where Spark calls getBatch() in a while loop without any checks on upper 
bounds (maxRate).

[~hshreedharan] could maybe confirm such behaviour? What do you think Yong?

[0]: 
https://github.com/apache/spark/blob/master/external/flume/src/main/scala/org/apache/spark/streaming/flume/FlumeBatchFetcher.scala#L37

> Flume streaming should respect maxRate (and backpressure)
> ---------------------------------------------------------
>
>                 Key: SPARK-14531
>                 URL: https://issues.apache.org/jira/browse/SPARK-14531
>             Project: Spark
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.6.1
>            Reporter: Herman Schistad
>            Priority: Minor
>
> As far as I can understand the FlumeUtils.createPollingStream(...) ignores 
> key spark streaming configuration options such as:
> spark.streaming.backpressure.enabled
> spark.streaming.receiver.maxRate
> ...
> I might just be mistaken, but since the DEFAULT_POLLING_BATCH_SIZE is set to 
> 1000 in the source code itself, then I presume it should use the variables 
> above instead.
> *Relevant code:*  
> https://github.com/apache/spark/blob/master/external/flume/src/main/scala/org/apache/spark/streaming/flume/FlumeUtils.scala



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to