【问题标题】:Spark Cassandra connector control number of reads per secSpark Cassandra 连接器控制每秒读取次数
【发布时间】:2021-02-07 04:15:24
【问题描述】:

我正在运行在 Cassandra 表上执行直接连接的 spark 应用程序

我正在尝试控制每秒读取次数,以便长时间运行的作业不会影响整个数据库 这是我的配置参数

--conf spark.cassandra.concurrent.reads=2
--conf spark.cassandra.input.readsPerSec=2
--conf spark.executor.cores=1
--conf spark.executor.instances=1
--conf spark.cassandra.input.fetch.sizeInRows=1500

我知道我不会从每个分区读取超过 1500 行 然而,尽管每秒读取的所有阈值都超过了 200-300

是否还有其他需要开启的标志或配置

【问题讨论】:

  • 什么版本的连接器?
  • 3.0.0 版本。我尝试更改所有值,但似乎没有任何效果

标签: apache-spark cassandra datastax-java-driver spark-cassandra-connector


【解决方案1】:

它接缝CassandraJoinRDD 在与spark.cassandra.input.readsPerSec 进行节流时存在错误,请参阅https://datastax-oss.atlassian.net/browse/SPARKC-627 了解详细信息。 同时使用spark.cassandra.input.throughputMBPerSec 来限制您的加入。请注意,限制基于RateLimiter 类,因此限制不会立即启动(您需要至少读取throughputMBPerSec 的数据才能开始限制)。这一点在 SCC 中可能会有所改进。

【讨论】:

  • 非常感谢,我会试试这个
猜你喜欢
  • 2016-08-14
  • 2016-01-05
  • 2020-08-02
  • 1970-01-01
  • 2020-10-31
  • 2020-10-11
  • 1970-01-01
  • 2021-11-21
  • 2015-10-28
相关资源
最近更新 更多