美文网首页
Spark Streaming dynamic executor

Spark Streaming dynamic executor

作者: clive0x | 来源:发表于2019-10-31 19:36 被阅读0次

ExecutorAllocationManager.scala

1.spark.streaming.dynamicAllocation.enabled:false 是否开户动态Manager管理

2.判断条件

avgProcessTime(批次平均处理时间processTimeSum/ProcessTimeCount)/batch Interval 

当> spark.streaming.dynamicAllocation.scalingUpRatio:0.9时,表示目前executors处理有压力,需要申请更多executors来解压。

当< spark.streaming.dynamicAllocation.scalingDownRatio:0.3时,表示处理能力足够,可以减少executors。

executors数在[spark.streaming.dynamicAllocation.minExecutors,spark.streaming.dynamicAllocation.maxExecutors]间。

spark.streaming.dynamicAllocation.minExecutors(如果没有配置,默认值为numReceivers)

spark.streaming.dynamicAllocation.maxExecutors默认值为Integer.MAX_VALUE

整个处理过程在timer中进行,timer interval:spark.streaming.dynamicAllocation.scalingInterval:60S

相关文章

网友评论

      本文标题:Spark Streaming dynamic executor

      本文链接:https://www.haomeiwen.com/subject/veztbctx.html