码迷,mamicode.com
首页 > 其他好文 > 详细

spark streaming限制吞吐

时间:2015-05-19 12:36:22      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:

使用spark.streaming.receiver.maxRate这个属性限制每秒的最大吞吐。官方文档如下:

Maximum rate (number of records per second) at which each receiver will receive data. Effectively, each stream will consume at most this number of records per second. Setting this configuration to 0 or a negative number will put no limit on the rate. See the deployment guide in the Spark Streaming programing guide for mode details.

默认没有设置,也就是做没做限制。

如果做限制100,那么每秒最大吞吐就是100条。

 

然后文档中还有一个属性spark.streaming.kafka.maxRatePerPartition,也是限制吞吐的,不过是限制kafka读取的速度,官方文档是这么说的:

Maximum rate (number of records per second) at which data will be read from each Kafka partition when using the new Kafka direct stream API. See the Kafka Integration guide for more details.

默认也是没有设置。

现在还搞不清楚这两个的关联。  这个需要去研究源代码。 猜想spark.streaming.receiver.maxRate是限制除kafka以外的吞吐,而spark.streaming.kafka.macRatePerPartition的吞吐。

spark streaming限制吞吐

标签:

原文地址:http://www.cnblogs.com/hark0623/p/4513955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!