Hue provides the file browser function for users to use HDFS in GUI mode.
The Hue page is used to view and analyze data such as files and tables. Do not perform high-risk management operations such as deleting objects on the page. If an operation is required, you are advised to perform the operation on each component after confirming that the operation has no impact on services. For example, you can use the HDFS client to perform operations on HDFS files and use the Hive client to perform operations on Hive tables.
Access the Hue web UI. For details, see Accessing the Hue Web UI.
Click . The File Browser page is displayed. You can perform the following operations:
By default, the directory and files in the directory of the login user are displayed. You can view Name, Size, User, Group,Permission, and Date.
Click a file name to view the text information or binary data in the text file. The file content can be edited.
If there are a large number of files and directories, you can enter keywords in the search text box to search for specific files or directories.
Click New in the upper right corner. Choose File to create the file. Choose Directory to create a directory.
Select the check box of a file or director, and click Actions. In the displayed menu, choose Rename, Move, Copy, and Change permissions to rename, move, copy, or change the file or directory permissions.
Click Upload in the upper right corner and click Select files or drag the file to the window.
If the value of Hue parameter fs_defaultFS is set to viewfs://ClusterX, the big data storage policy cannot be enabled.
Storage policies on the Hue web UI are classified into the following two types:
According to the access frequency and importance of documents in HDFS, specify a storage policy for an HDFS directory, such as ONE_SSD or ALL_SSD. The files in this directory can be migrated to the storage media.
Set rules for an HDFS directory. The system can automatically change the storage policy, the number of file copies, migrate the file directory..
Before configuring a dynamic storage policy on the Hue WebUI, you must set the CRON expressions for cold and hot data migration and start automatic cold and hot data migration on Manager.
Operations:
Modify the following NameNode parameters of HDFS. For details, see Modifying Cluster Service Configuration Parameters.
Parameter |
Description |
Example Value |
---|---|---|
dfs.auto.data.mover.enable |
Whether to enable automatic hot and cold data migration. The default value is false. |
true |
dfs.auto.data.mover.cron.expression |
CRON expression for hot and cold data migration in HDFS, which is used to control the start time of data migration. This parameter is available only when dfs.auto.data.mover.enable is set to true. The default value is 0 * * * *, indicating that the task is executed on the hour. |
0 * * * * |
Table 1 describes the expression for modifying the dfs.auto.data.mover.cron.expression parameter. * indicates consecutive time segments.
To set storage policies on the web UI, perform the following operations:
Category |
Parameter |
Description |
---|---|---|
Rule |
Last Access to File |
Indicates the time when the file is last accessed. |
Last File Modification |
Indicates the time when the file is last modified. |
|
Operation |
Change Number of Copies |
Indicates the number of file copies. |
Modify Storage Policy |
Indicates that you can modify storage policies to the following: HOT, WARM, COLD, ONE_SSD, and ALL_SSD. |
|
Move to Directory |
Indicates that you can move the file to another directory. |
On the Hue page, view and edit HDFS files in text or binary mode as follows:
Viewing a File
Editing a file