【问题标题】:Error writing ORC file from spark to hadoop将 ORC 文件从 spark 写入 hadoop 时出错
【发布时间】:2018-10-31 02:40:24
【问题描述】:

我正在提供的小型集群(4 个节点,1 个是 namenode 和 spark master)上为学校做一个项目。我正在进行计算,然后将 spark DataFrame 作为 ORC 文件写入 hadoop。然后我得到以下错误:

Caused by: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/myfile.orc/_temporary/0/_temporary/attempt_20180521123532_0005_m_000010_3/part-00010-1dd484de-2d33-4a51-8029-737aa957264e-c000.snappy.orc could only be replicated to 0 nodes instead of minReplication (=1). There are 3 datanode(s) running and no node(s) are excluded in this operation.

并且有些隐藏在堆栈跟踪中:

Suppressed: java.lang.IllegalArgumentException: Column has wrong number of index entries found: 0 expected: 36

总数据集为 5000 万行。如果我限制为 10,000 行,它可以正常工作。

那么是什么导致了这个问题?磁盘空间充足。

编辑:

代码:

df.write.format("orc").mode("overwrite").save("hdfs://namenode-server:9000/user/myfile.orc")

编辑 2:

还是说到底是磁盘空间?

Decommission Status : Normal
Configured Capacity: 20082696192 (18.70 GB)
DFS Used: 1665830730 (1.55 GB)
Non DFS Used: 12819447990 (11.94 GB)
DFS Remaining: 4719075328 (4.39 GB)
DFS Used%: 8.29%
DFS Remaining%: 23.50%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Mon May 21 14:31:52 CEST 2018

源文件为 1.5 Gb(txt 文件格式),其中添加了一些数据,然后保存为 ORC。也许这确实需要超过 4.39 GB 的空间。

【问题讨论】:

    标签: apache-spark hadoop orc


    【解决方案1】:

    这通常发生在来自不同池或来自不同提交的应用程序的在同一个地方进行并行记录。 例如,您提交了两次申请,或者您以公平的方式使用公平调度程序池。

    【讨论】:

      猜你喜欢
      • 2019-01-17
      • 2021-06-15
      • 1970-01-01
      • 2016-07-28
      • 2018-06-09
      • 2018-11-30
      • 2020-07-21
      • 1970-01-01
      • 2020-01-20
      相关资源
      最近更新 更多