首页 > 大数据 > Hadoop > HDFS目录配额(quota)不足导致写文件失败
本文分享自天翼云开发者社区《 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 /目录名
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70014251/viewspace-3089100/ ,如需转载,请注明出处,否则将追究法律责任。