Quota configuration
In a multitenancy cluster, it is important to control the utilization both in terms of HDFS space, memory, and CPU utilization. In this recipe, we will be looking at how we can restrict a user or a project from using more than the allotted HDFS space.
Getting ready
Make sure that there is a running cluster, and that the user is already well versed in the recipes that we have looked at so far.
How to do it...
Connect to Namenode and change the user to
hadoop
.Create a directory named
projects
on HDFS, as shown in the following screenshot:By default, there is no quota configured on any directory.
To see what options can be set on the
projects
directory, use the following command:$ hadoop fs -count -q /projects
The two leftmost fields show the namespace and disk space quota, which currently is not set, as shown in the following screenshot:
To set the namespace quota, which will define how many inodes can be allocated for this
projects
directory, enter the following code. Inodes...