HDFS數據塊所在存儲的目錄滿了的解決方法
1.增加磁盤空間
2.刪除回收站
hadoop dfs -du -h 查看各個HDFS空間占用情況
hadoop dfs -expunge 清空回收站
hadoop dfs -rm -skipTrash /user/path 刪除目錄跳過回收站
fs.trash.interval 和 fs.trash.checkpoint.interval

dfs.replication.interval復制延遲時間為3秒,默認值。
單機Hadoop修改/etc/hadoop/core-site.xml,增加如下配置:
<!-- 開啟hdfs文件刪除自動轉移到垃圾箱,值為垃圾箱文件清除時間,單位是分鍾。一般開啟該配置比較好,防止刪除重要文件。 -->
<property> <name>fs.trash.interval</name> <value>1440</value> <description>Number of minutes after which the checkpoint gets deleted. If zero, the trash feature is disabled.</description> </property> <property> <name>fs.trash.checkpoint.interval</name> <value>0</value> <description>Number of minutes between trash checkpoints. Should be smaller or equal to fs.trash.interval. If zero, the value is set to the value of fs.trash.interval.</description> </property>
屬性介紹:
fs.trash.interval:丟進回收站中的文件多久后(准確的說是多少分鍾后)會被系統永久刪除;這里1440是1天,默認是0.單位分鍾。這里我設置的是1天(60*24)
fs.trash.checkpoint.interval:前后兩次檢查點的創建時間間隔(單位也是分鍾);新的檢查點被創建后,隨之舊的檢查點就會被系統永久刪除;