hadoop错误du:java.util.concurrentmodificationexception

yi0zb3m4  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(343)

在处理hdfs集群时,我遇到了这个错误

du: java.util.ConcurrentModificationException

每当我跑的时候

hdfs dfs -du -h -s /some/path/

在互联网上快速查看,我发现这是hadoop2.7.0中的bug。

njthzxwz

njthzxwz1#

为了解决这个问题,我不得不删除一些hadoop快照文件。我相信某个/某些快照已损坏,因为几天前我的一个数据节点不干净地从集群中退役。

hdfs lsSnapshottableDir
drwxr-xr-x 0 hdfs supergroup 0 2018-01-30 17:04 0 65536 /data

[hdfs@hmastera ~]$ hdfs dfs -ls /data/.snapshot
Found 5 items
drwxr-xr-x   - hdfs supergroup          0 2017-08-19 01:06 /data/.snapshot/insight-dl-cluster_snapshot_20170819T010503
drwxr-xr-x   - hdfs supergroup          0 2017-08-19 01:08 /data/.snapshot/insight-dl-cluster_snapshot_20170819T010746
drwxr-xr-x   - hdfs supergroup          0 2017-08-19 01:12 /data/.snapshot/insight-dl-cluster_snapshot_20170819T011013
drwxr-xr-x   - hdfs supergroup          0 2017-08-19 01:14 /data/.snapshot/insight-dl-cluster_snapshot_20170819T011219
drwxr-xr-x   - hdfs supergroup          0 2018-01-13 16:24 /data/.snapshot/insight-dl-cluster_snapshot_20180113T162234

`
然后我开始删除快照直到我找回我的魔咒。

hdfs@ hmastera ~]
        hdfs dfs -deleteSnapshot /data  insight-dl-cluster_snapshot_20170819T010503
        hdfs dfs -deleteSnapshot /data  insight-dl-cluster_snapshot_20170819T010746
        hdfs dfs -deleteSnapshot /data  insight-dl-cluster_snapshot_20170819T011013
        hdfs dfs -deleteSnapshot /data  insight-dl-cluster_snapshot_20170819T011219
        hdfs dfs -deleteSnapshot /data insight-dl-cluster_snapshot_20180113T162234

[hdfs@ hmastera ~]$ hdfs dfs -du -h -s /data
        510.1 G  /data

相关问题