In a multiuser environment, quota can enforce the fair share of computing resources. HDFS supports quota for users and directories. In this recipe, we will list steps to configure the HDFS quota.
We assume that the Hadoop cluster has been configured properly and all the daemons are running without any issues.
Perform the following steps to manage an HDFS quota:
hadoop dfsadmin -setQuota 20 /usr/hduser
This command will set name quota on the home directory to 20, which means at most 20 files, including directories, can be created under the home directory.
If we reach the quota, an error message similar to the following will be ...