【发布时间】: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