After Kerberos authentication is enabled for an MRS cluster, users can use the Hue WebUI to execute HiveQL statements in the cluster.
The MRS cluster administrator has assigned the permission for using Hive to the user. For details, see Creating a User.
Accessing Query Editors
- Access the Hue WebUI and choose Hive page is displayed.. The
Hive supports the following functions.
- Executes and manages HiveQL statements.
- Queries HiveQL statements saved by the current user in Saved Queries.
- Queries HiveQL statements executed by the current user in Query History.
- Click to display all databases in Hive.
Executing HiveQL Statements
- Access Query Editors.
- Select a Hive database in Databases. The default database is default.
The system displays all available tables. You can enter a keyword of the table name to search for the desired table.
- Click the desired table name. All columns in the table are displayed.
Move the cursor to the row of the table and click . Column details are displayed.
- Enter the query statements in the area for editing HiveQL statements.
Click and choose Explain. The editor checks the syntax and execution plan of the entered statements. If the statements have syntax errors, the editor reports Error while compiling statement.
- Select the engine for executing the HiveQL statements.
- mr: MapReduce computing framework
- spark: Spark computing framework
- Click to execute the HiveQL statements.
- If you want to use the entered HiveQL statements again, click to save them.
- To format the HiveQL statements, click and choose Format.
- To delete the entered HiveQL statements, click and choose Clear.
- To clear the entered statements and start a new query, click and choose New query.
Querying Execution Results
- View the execution results below the execution area on Hive. The Query History tab is displayed by default.
- Click a result to view the executed statements.
- Access Query Editors.
- Click Saved Queries.
Click a saved statement. The system automatically fills the statement in the editing area.
Modifying Query Editors Settings
- On the Hive page, click .
- Click on the right side of Files, and click to specify the save path of the file.
You can click to add a file resource.
- Click on the right side of Functions. Enter the name of the user-defined function and the function class.
You can click to add a function.
- Click on the right side of Settings. Enter the Hive parameter name in Key under Settings and the parameter value in Value. The session connects to Hive using the user-defined configuration.
You can click to add a parameter.