【问题标题】:How to avoid multiple mongo db connections in spark scala如何避免 spark scala 中的多个 mongo db 连接
【发布时间】:2020-07-14 20:15:23
【问题描述】:

MapPartitions 导致连接过多,而 foreachPartitions 没有返回任何内容。有没有其他办法?

【问题讨论】:

    标签: database mongodb scala apache-spark connection


    【解决方案1】:

    当我进行 coalesce (20) 时,它在地图分区上运行良好,它创建了 20 个连接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-11-18
      • 2019-09-13
      • 1970-01-01
      • 1970-01-01
      • 2020-05-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多