O'Reilly logo

Hadoop Operations and Cluster Management Cookbook by Shumin Guo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring the HDFS quota

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.

Getting ready

We assume that the Hadoop cluster has been configured properly and all the daemons are running without any issues.

How to do it...

Perform the following steps to manage an HDFS quota:

  1. Set the name quota on the home directory with the following command:
    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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required