"); //-->
本文分享自天翼云开发者社区《HDFS目录配额(quota)不足导致写文件失败》,作者:5****m
问题背景与现象
给某目录设置quota后,往目录中写文件失败,出现如下问题“The DiskSpace quota of /tmp/tquota2 is exceeded”。
[omm@189-39-150-115 client]$ hdfs dfs -put switchuser.py /tmp/tquota2 put: The DiskSpace quota of /tmp/tquota2 is exceeded: quota = 157286400 B = 150 MB but diskspace consumed = 402653184 B = 384 MB
可能原因
目录配置的剩余的空间小于写文件实际需要的空间。
原因分析
hadoop dfsadmin -setSpaceQuota 150M /tmp/tquota2
hdfs dfs -count -q -h -v /tmp/tquota2
[omm@189-39-150-115 client]$ hdfs dfs -put switchuser.py /tmp/tquota2 put: The DiskSpace quota of /tmp/tquota2 is exceeded: quota = 157286400 B = 150 MB but diskspace consumed = 402653184 B = 384 MB
解决办法
hadoop dfsadmin -setSpaceQuota 150G /目录名
清空配额。hdfs dfsadmin -clrSpaceQuota /目录名
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。