Introducing File Browser

The File Browser application lets you browse and manipulate files and directories in the Hadoop Distributed File System (HDFS) while using Hue. With File Browser, you can:

Contents


File Browser Installation and Configuration

File Browser is one of the applications that can be installed as part of Hue. For more information about installing Hue, see Hue Installation.

Starting File Browser

To start the File Browser application, click the File Browser icon ( ) in the navigation bar at the top of the Hue browser page.

Working with Files and Directories

You can use File Browser to view the input and output files of your MapReduce jobs. Typically, you can save your output files in /tmp or in your home directory if your system administrator set one up for you. You must have the proper permissions to manipulate other user's files.

Changing Directories

To change to a different directory, double-click the directory name or parent directory dots in the File Browser window.

To change to your home directory, click Home in the path field at the top of the File Browser window.

Note: The Home button is disabled if you do not have a home directory. Ask your system administrator to create a home directory for you.


Creating Directories

To create a directory:

  1. In the File Browser window, click New Directory.

  2. In the Create Directory dialog box, enter a directory name and then click Submit.

Uploading Files

You can upload text or binary files to the HDFS.

To upload files:

  1. In the File Browser window, browse to the directory where you want to upload the file.

  2. Click Upload Files.

  3. In the box that opens, click Upload a File to browse to and select the file(s) you want to upload, and then click Open.

    The file(s) are uploaded to the directory you selected.

Downloading Files using the File Browser

To download files using the File Browser:

  1. In the File Browser window, select the file you want to download.

  2. Choose Download File from From the Options menu.

  3. Save or open the file on your local system.

Renaming, Moving, and Deleting Files and Directories

To rename a file or directory:

  1. In the File Browser window, select the file or directory you want to rename.

  2. Choose Rename from the Options menu.

  3. Enter the new name and then click Submit.

To move a file or directory:

  1. In the File Browser window, select the file or directory you want to move.

  2. Choose Move from the Options menu.

  3. In the Move dialog box, enter the new path and file or directory name, and then click Submit.


To delete a file or directory:

  1. In the File Browser window, select the file or directory you want to delete. If you select a directory, all of the files and subdirectories contained within that directory are also deleted.

  2. Choose Delete from the Options menu.
    You can delete recursively by choosing Delete Recursively from the Options menu.

  3. Click Ok to confirm the deletion.

Changing a File's or Directory's Owner, Group, or Permissions


Note
Only the Hadoop superuser can change a file's or directory's owner, group, or permissions. The user who starts Hadoop is the Hadoop superuser. The Hadoop superuser account is not necessarily the same as a Hue superuser account. If you create a Hue user (in User Admin) with the same user name and password as the Hadoop superuser, then that Hue user can change a file's or directory's owner, group, or permissions.


To change a file's or directory's owner or group:

  1. In the File Browser window, select the file or directory whose owner or group you want to change.

  2. Choose Change Owner/Group from the Options menu.

  3. In the Change Owner/Group dialog box, choose the new user from the User drop-down menu.

  4. Choose the new group from the Group drop-down menu.

  5. Click Submit to make the changes.

To change a file's or directory's permissions:

  1. In the File Browser window, select the file or directory whose permissions you want to change.

  2. Choose Change Permissions from the Options menu.

  3. In the Change Permissions dialog box, select the permissions you want to assign and then click Submit.

Searching for Files and Directories

You can search for files or directories by name using the Filter query search box:

To search for files and directories by name:

  1. Enter the name of the file or directory in the query search box.

    File Browser lists the files or directories matching the search criteria.

Viewing, Editing, and Downloading Files

You can view and edit files as text or binary. You can also download files from the HDFS.

Viewing and Editing Files

To view and edit files:

  1. In the File Browser window, double-click the file you want to view, or choose View File from the Options menu.
    File Browser displays the first 4,096 bytes of the file in the File Viewer window.

  2. If the file is larger than 4,096 bytes, you can use the Block navigation buttons (First Block, Previous Block, Next Block, Last Block) to scroll through the file block by block. The Viewing Bytes: fields show the range of bytes you are currently viewing.

  3. To switch the view from text to binary, click View as Binary to view a hexdump. To switch the view from binary to text, click View as Text.

  4. To view the file's location in the HDFS, click View File Location. File Browser displays the file's location in the File Browser window.

  5. If you are viewing a text file, you can edit the contents by clicking Edit File in the left navigation panel.

    File Browser displays the contents of the file in the File Editor window.

  6. Edit the file and then click Save or Save As to save the file.

Downloading Files using the File Viewer

To download files using the File Viewer:

  1. In the File Browser window, double-click the file you want to download, or right-click and choose View File from context menu.

  2. Click Download.

  3. Save or open the file on your local system.