Searching Files and Managing Directories
The Search Files and Manage Directories page provides a file browser function that lets you browse and search the HDFS namespace and manage your files and directories.
Searching Within the File System
The Search Files and Manage Directories page lets you search the file system using various search criteria. The default is File or Directory Name but you can also search for large files, directories with quotas, watched directories, or by custom search criteria such as filename, owner, file size, and so on. The file and directory listings are taken from the fsimage stored on the NameNode, so the listings will be only as current as the last checkpoint. Typically the checkpoint interval is (by default) once per hour, but if checkpoints are not being performed as frequently, the listings may not be up to date.
To search the file system:
- Select .
- Click the to the
right of Search and do one of the
following:
- Select a predefined query. Depending on what you select, you may be presented with different fields to fill in or different views of the file system. For example, selecting Large Files will provide fields where you provide size to be used as the search criteria.
- Select Custom. A
Choose... drop-down is added.
- Select a property in the Choose... drop-down.
- Select an operator.
- Specify a value.
- Click to add another criteria (all of which must be satisfied for a file to be considered a match) and repeat the preceding steps.
- Click the Search button to execute the search.
If you search within a directory, only files within that directory will be found. For example, if you browse /user and do a search, you might find /user/foo/file, but you will not find /bar/baz.
Setting File and Disk Space Quotas
- Select .
- Browse the file system to find the directory for which you want to set quotas.
- Click the Manage Quota button at the right of the row for the directory you want. A Manage Quota pop-up displays, where you can set file count or disk space limits for the directory you have selected.
- When you have set the limits you want, click OK.
About file count limits
- The file count quota is a limit on the number of file and directory names in the directory configured.
- A directory counts against its own quota, so a quota of 1 forces the directory to remain empty.
- File counts are based on the intended replication factor for the files; changing the replication factor for a file will credit or debit quotas.
About disk space limits
- The space quota is a hard limit on the number of bytes used by files in the tree rooted at the directory being configured.
- Each replica of a block counts against the quota.
- The disk space quota calculation takes replication into account, so it uses the replicated size of each file, not the user-facing size.
- The disk space quota calculation includes open files (files presently being written), as well as files already written.
- Block allocations for files being written will fail if the quota would not allow a full block to be written.
Designating Watched Directories
- To add or remove directories from the directory-based usage reports,
do one of the following:
- Select .
- Click Reports, click the Current Disk Usage By Directory or Historical Disk Usage By Directory link, and click the Search Files and Manage Directories button.
- Navigate through the file system to see the directory you want to add - you can include a directory at any level without needing to include its parent.
- Toggle the Star icon () at the left of the directories to watch. When the icon is in the activated form (), the directory appears in the usage reports. To stop watching a directory, deactivate the Star icon.
<< Activity, Application, and Query Reports | Downloading HDFS Directory Access Permission Reports >> | |