If you want to use a graphical interface to manage files in HDFS, you can use Hue. This topic describes how to view and manage files and directories in HDFS on the Hue web UI. In this topic, an E-MapReduce (EMR) V4.9.0 cluster is used.
Prerequisites
A security group rule is configured.
ImportantWhen you configure the authorization object in the security group rule, enter only the CIDR blocks or IP addresses that need to access Hue. Do not enter the CIDR block 0.0.0.0/0.
Port 8888 is enabled.
Considerations
For a Hadoop cluster of EMR V3.35.0 or a later minor version, or EMR V4.9.0 or a later minor version, you must delete filebrowser from the value of the app_blacklist parameter on the Configure tab of the Hue service page.
Go to the File Browser page
Go to the Cluster Overview page of your cluster.
Log on to the Alibaba Cloud EMR console.
In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
Click the Cluster Management tab.
On the Cluster Management page, find your cluster and click Details in the Actions column.
Modify the app_blacklist parameter.
In the left-side navigation pane, choose .
In the Configuration Filter section, search for the app_blacklist parameter.
Delete filebrowser from the value of the app_blacklist parameter.
In the upper-right corner of the Service Configuration section, click Save.
In the Confirm Changes dialog box, specify Description and click OK.
Restart Hue.
In the upper-right corner of the Hue service page, choose .
In the Cluster Activities dialog box, specify Description and click OK.
In the Confirm message, click OK.
Start the HttpFS component of the HDFS service.
In the left-side navigation pane, choose .
Click the Component Deployment tab.
Find the HttpFS component and click Start in the Actions column.
In the Cluster Activities dialog box, specify Description and click OK.
In the Confirm message, click OK.
You can click History in the upper-right corner to view the status of the Start HDFS HttpFS task. After the task enters the Successful state, the HttpFS component is started.
In the left-side navigation pane, click Connect Strings.
On the Public Connect Strings page, click the URL of Hue.
On the page that appears, enter your Hue username and password to access the Hue web UI.
NoteThe first time you log on to the Hue web UI, you must obtain the initial password of the admin account, which is the default administrator. For more information about how to obtain the initial password, see View the initial password.
In the left-side navigation pane, click the icon.
The File Browser page appears. You can view information about the directories and files that belong to the current account.
Parameter
Description
Name
The name of the directory or file.
Size
The size of the file.
User
The owner of the directory or file.
Group
The group to which the directory or file belongs.
Permissions
The permissions on the directory or file.
Date
The time when the directory or file was created.
Manage directories or files
On the File Browser page, select one or more directories or files.
Select an option from the Actions drop-down list on the top of the page.
Action
Description
Rename
Rename a directory or file.
Move
Move files. In the Move to dialog box, select a new directory and click Move to move the selected files to the new directory.
Copy
Copy directories or files.
Download
Download files to your computer.
Change permissions
Modify the access permissions on directories or files.
Read, Write, and Execute: You can grant the owner, the group, or other users the Read, Write, and Execute permissions.
Sticky: indicates that only HDFS administrators, directory owners, and file owners can move files in the selected directories.
Recursive: indicates that permissions are granted to subdirectories recursively.
Summary
View the HDFS storage information about directories or files.
Set replication
Set a replication factor for files.
Compress
Compress directories or files.
ImportantBefore you perform this operation, you must add the Oozie service to your EMR cluster. For more information about how to add a service, see Add a service.
Upload files
On the File Browser page, click Upload in the upper-right corner.
In the dialog box that appears, click Select files.
Select the files that you want to upload and click Open.
Create a file and a directory
Create a file
On the File Browser page, choose
in the upper-right corner.In the Create File dialog box, specify File Name.
Click Create.
Create a directory
On the File Browser page, choose
.In the Create Directory dialog box, specify Directory Name.
Click Create.