Spark流的动态分配 [英] Dynamic Allocation for Spark Streaming

查看:139
本文介绍了Spark流的动态分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Spark Streaming作业与其他作业(Spark核心作业)一起在我们的集群上运行。我想对包括Spark Streaming在内的这些作业使用动态资源分配。根据下面的JIRA问题,动态分配不支持Spark Streaming(在1.6.1版本中)。但是已在2.0.0中修复

I have a Spark Streaming job running on our cluster with other jobs(Spark core jobs). I want to use Dynamic Resource Allocation for these jobs including Spark Streaming. According to below JIRA Issue, Dynamic Allocation is not supported Spark Streaming(in 1.6.1 version). But is Fixed in 2.0.0

JIRA链接

PDF在本期中,它说应该有一个名为
spark.streaming.dynamicAllocation.enabled = true
的配置字段,但我没有看到此配置

According to the PDF in this issue, it says there should be a configuration field called spark.streaming.dynamicAllocation.enabled=true But I dont see this configuration in the documentation.

有人可以确认吗,


  1. 我不能吗?在1.6.1版本中启用Spark Streaming的动态资源分配。

  2. 在Spark 2.0.0中可用吗?如果是,应设置什么配置
    spark.streaming.dynamicAllocation.enabled = true spark.dynamicAllocation.enabled = true

  1. Can't I enable dynamic resource allocation for Spark Streaming in 1.6.1 version.
  2. Is it available in Spark 2.0.0 . If yes, what configuration should be set (spark.streaming.dynamicAllocation.enabled=true or spark.dynamicAllocation.enabled=true)


推荐答案


我可以启用吗是
1.6.1版本的Spark Streaming的动态资源分配?

Can I enable Dynamic Resource Allocation for Spark Streaming for 1.6.1 version?

是的,您可以启用通过使用 spark.dynamicAllocation.enabled = true
设置对任何spark应用程序的动态分配,但是流应用程序的问题很少(在 JIRA


  1. 您的执行器可能永远不会闲着,因为它们每隔N秒钟运行一次。

  2. 您应该至少有一个始终在运行的接收器

  3. 现有的启发式方法不要考虑批处理队列的长度

因此,它们被添加了新属性( spark.streaming .d ynamicAllocation.enabled )仅用于流式应用。

So, they are added new property(spark.streaming.dynamicAllocation.enabled) in Spark 2.0 for streaming apps alone.


在Spark 2.0.0中可用。如果是,则应配置为
设置spark.streaming.dynamicAllocation.enabled或
spark.dynamicAllocation.enabled吗?

Is it available in Spark 2.0.0 . If yes, what configuration should be set spark.streaming.dynamicAllocation.enabled or spark.dynamicAllocation.enabled ?

如果应用程序正在流式传输,则必须启用 spark.streaming.dynamicAllocation.enabled ,否则请继续使用 spark.dynamicAllocation.enabled

Must be spark.streaming.dynamicAllocation.enabled if the application is streaming one, otherwise go head with spark.dynamicAllocation.enabled

编辑:(根据2017年1月5日的评论)

(as per comment on 2017-JAN-05)

到目前为止,这还没有记录,但是我可以在Spark源代码中获得此属性和实现。 ExecutorAllocationManager.scala (单元测试 ExecutorAllocationManagerSuite.scala )类已包含在Spark 2.0中,而此实现在Spark 1.6及以下版本中不存在。

This is not documented as of today, But I get this property and implementation at Spark source code. ExecutorAllocationManager.scala (Unit tests ExecutorAllocationManagerSuite.scala) class has been included in Spark 2.0 and this implementation is not there in Spark 1.6 and below.

这篇关于Spark流的动态分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆