As Hue is setup successfully, let us see an overview of Hue. We will setup an admin account, then add user and then run Hive query using Hue Web Interface.
Setup admin account
- Once Hue installation is completed you can open the Hue UI from <installed-host-public-ip>:8888
- Since we have not opened the firewall for 8888 port initially, you can go to Firewall rules by clicking on more options and click on “View Network Details” and add Hue port to web ports rule that we have created previously.
- Once you have opened the first time, you will see the following message.
- Since this is your first time logging in, pick any username and password. Be sure to remember these, as they will become your Hue superuser credentials.
- Enter the username and password which will be an administrator account for the Hue.
Setup user account
- Add hue user
- Login into Hue with the admin account
- Click on the username on the right top and click on “Manage Users”
- We can Manage both Users as well as Groups from this Page
- First, let us create Group and assign few permissions related to Hive
- Click on add user
- Enter Username and password,
- Select “Create Home Directory” (This will home directory for the user in HDFS)
- Other details like first name, last name etc are optional.
- Typically we assign Users to Groups. By default, it will try to add users to default. If we want to add a user to the new group, then you need to choose an appropriate group. All the permissions mapped to the Group will be assigned to User.
- Select “Super User” (This is to give the admin permissions for the current new user). Make sure to not to give Super User access to non-admin accounts.
- And click on create.
Run Hive Query using Hue
Let us also see how we can run Hive queries using Hue.
- Hive is already set up in our cluster
- We have created a retail database and then orders as well as order_items tables as part of setting up of Hive and Impala.
- As we already have tables we can run sample queries in Hive to validate that non-admin staff will be able to use Hue and interact with Big Data tools with out struggling with command line interface.
- Sample Query: SELECT order_status, count(1) FROM orders GROUP BY order_status;