Searching Files and Managing Directories
The Search Files and Manage Directories page provides a file browser function that lets you browse the HDFS namespace, as well as letting you manage your files and directories.
Setting File and Disk Space Quotas
- From the Reports page, click Search Files and Manage Directories for the namespace you want to manage.
- 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 appears, 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.
Searching within the File System
The Search Files and Manage Directories page lets you search the file system using predefined search criteria. The default is Search by Name but you can also search for large files, directories with quotas, watched directories, or custom search criteria which you can construct using criteria such as filename, owner, file size and so on. The file and directory listings comes from the fsimage kept on the NameNode, so the listings will be only as current as when the last checkpoint was performed. 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:
- From the Reports page, click Search Files and Manage Directories for the namespace you want to search.
- In the Search menu, select the type of query you want to use. 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 Search by Name will show a field where you can enter the name. Selecting Large Files will provide fields where you provide size to be used as the search criteria. If you select Custom... and enter multiple criteria, all of them must be met for a file to be considered a match.
- 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.
Designating Watched Directories
- To add or remove directories from the directory-based usage reports,
do one of the following:
- From the Reports tab, click the Search Files and Manage Directories button at the upper right of the page.
- From either of the directory-based reports, 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.