【问题标题】:Large data with Spark and CouchDBSpark 和 CouchDB 的大数据
【发布时间】:2021-02-24 19:31:33
【问题描述】:

我将 spark 2.4.0 与“org.apache.bahir - spark-sql-cloudant - 2.4.0”一起使用 我必须将所有 json 文件从 couchDB 下载到 hdfs。

 val df = spark
  .read
  .format("org.apache.bahir.cloudant")
  .load("demo")
df.persist(StorageLevel.MEMORY_AND_DISK)

 df
  .write
  .partitionBy("year", "month", "day")
  .mode("append")
  .parquet("...")

总文件大小为 160GB(> 1300 万个文件) 运行 5 分钟后的 Spark 作业出错

原因:com.cloudant.client.org.lightcouch.CouchDbException:检索服务器响应时出错

增加超时没有帮助,下降但稍后 摆脱困境的方法是什么?

【问题讨论】:

    标签: apache-spark apache-spark-sql couchdb cloudant apache-bahir


    【解决方案1】:

    使用另一个端点进行查询,使用 _changes 针对 _all_docs 帮助我

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-27
      • 2011-10-04
      • 2017-11-08
      • 1970-01-01
      • 1970-01-01
      • 2021-07-29
      • 1970-01-01
      相关资源
      最近更新 更多