使用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的吞吐。

最新文章

  1. tomcat添加https
  2. HTTP-崔希凡笔记
  3. Javascript动态调整文章的行距、字体、颜色,及打印页面和关闭窗口功能
  4. Find命令搜索过去一段时间内修改过的文件
  5. NULL, '\0',0 '0'的区别
  6. mybati的存储过程
  7. [转]MVC模式已死?何不试试MOVE
  8. Windows Phone 8.1 发送http 网络请求。
  9. CSS传统布局之布局模型
  10. 深入分析Android动画(二)
  11. Mysql基本操作命令【转载】
  12. php中安装memcache
  13. 计算文章作品发布时间的php代码
  14. BZOJ4520 CQOI2016K远点对(KD-Tree+堆)
  15. HTML5 css3 阴影效果
  16. How to disable a plugin when Jenkins is down?
  17. servlet类第二篇
  18. Python使用paramiko库远程安全连接SSH
  19. Asp.Net Core 依赖注入默认DI,Autofac注入
  20. Python爬虫教程-17-ajax爬取实例(豆瓣电影)

热门文章

  1. 简单prufer应用
  2. maven的三种工程pom、jar、war的区别
  3. linux command ------ netstat
  4. 菜单栏--Dom选择器
  5. python命名空间与闭包函数详解
  6. 数学:莫比乌斯反演-GCD计数
  7. AngularJS 启程
  8. centos 7 两台机器搭建三主三从 redis 集群
  9. JAVA 位操作学习
  10. 深入分析Java Web技术内幕