What is Hue?
HUE is an analytical workbench for lightweight Business Intelligence (BI). It provides an overlay to Hadoop to make finding and querying data quick and easy. HUE stands for Hadoop User Experience. Hadoop can be thought of as a set of open source programs and procedures (essentially, they are free for anyone to use or modify, with a few exceptions) which anyone can use as the "backbone" of their big data operations.
Hadoop is made up of four main "modules", each of which carries out a particular task essential for a computer system designed for big data analytics. They are:
A DFS or HDFS (Hadoop Distributed File-System) in this sense, is a Java-based file system that provides scalable and reliable data storage, designed to span large clusters of commodity servers. In simple terms, this is where data is stored in an easily and accessible format. The HDFS means the data can be accessed from any computer supported operating system - making it highly useful for businesses with many employees and computers.
MapReduce provides basic tools for poking around the data from within the distributed file-system. It puts the data in the database into a format suitable for analysis (the mapping part of the word) and allows mathematical operations to be carried out on this newly structured data (reduction).
Provides Java tools needed to extract data from whatever operating system the user is running on.
The management of resources required for the analysis being carried out on the data is run by a module called YARN.
While Hue focuses on SQL, it allows use from less technical users. Self-service analytics like this aims to make organisations more data driven in a decentralized way.
Features of Hue
- Allows easy finding of data. Users can browse and search for datasets within an organisation from within the Hue workbench/dashboard.
- Querying the data. Advanced users can leverage the smart query editor while less technical users have sets of discoverable queries and presentations available which can be modified for their individual use.
- Getting results from the data. Results from the queries can very easily be charted and pasted into whatever application or report required.
Deployment of Hue in Juju
Hue can be deployed quickly and easily in the cloud without the use of complicated command line, by using Anssr. The platform provides architecture for businesses to analyse, reveal patterns and gain insights into their company data. Deployment of Hue can be achieved in the following way:
For the time being, while a Hue Hadoop bundle is not available on the Juju charms website:
Go to https://jujucharms.com/ and click on ‘Login’ in the top right hand corner of the website. It’s location is shown in the diagram below.
Login using your Juju/Ubuntu login credentials.
Once logged in, find the anssr hadoop bundle and add it to the Juju GUI canvas using the green button with the + symbol on it that appears at the righthand side of the screen when you hover over the bundle.
Click on the blue ‘Deploy changes’ button in the bottom right hand corner of the GUI screen (button shown below).
A screen will open up requiring some input from you as the user. Give the model a name and choose which cloud to deploy the model to. There is also an option to pass SSH keys at this stage.
Click ‘Deploy’ at the bottom of this screen once you are happy and the model should begin spinning up.
Wait for the Hadoop bundle model to spin up, you can check the status of the deployment by going to the ‘status’ tab in the top left of the GUI. The location of the tab is shown below. To get back to your model just click back on the ‘applications’ tab, just to the left of the ‘status’ tab.
You will know when the model has correctly spun up when if you scroll down the ‘status’ page a little to find the listed deployed units, the ‘Workload’ column shows all units as ‘active’ and the ‘Agent’ column shows all units as ‘idle’. This is demonstrated in the picture below.
Upon the Anssr Hadoop completing its spin-up cycle, click in the ‘Search the store’ field in the top right hand of the screen. It’s location is shown in the image below.
Next, type ‘hue’ into this field and press enter.
Now, add the hue charm (by spiculecharms) to the model by pressing the same + green button at the end of the row. Before deploying the changes go to the left hand side of the screen and press on ‘Configure’, shown in the image below.
Once clicked on, the ‘Choose Series’ field should be ‘Xenial’, change it if it is not. Once this has been checked you can click on the blue ‘Commit changes’ button, which is found in the same bottom right of the canvas location as the blue button in step 4.
Review the changes before hitting the green ‘Commit’ button at the bottom of the screen, same location as the ‘Deploy’ button in step 5. The Hue charm will then start spinning up. You can check its status using the status tab like in step 6.
Leave it 15 minutes or so and it should be ready to go, the circle around the charm should turn a grey colour like in the following picture.
Connect the Hue charm to the Hadoop plugin charm in the GUI by clicking and holding on the relation button above the Hue charm and dragging and dropping the relation over the plugin charm (the Hadoop plugin charm should be the only Hadoop charm that is lit up when you have clicked and held the relation button, as it is the only charm you can connect to. The relation button which is to be clicked and dragged is found in the following location, shown below, above the Hue charm.
Following this, the blue ‘Commit changes’ button should be hit again in the bottom right of the screen followed by the big green ‘Commit’ button, like before. The Juju canvas should now have a line representing a relation between the hue charm and the hadoop plugin charm.
Next, a MySQL charm needs to be added. MySQL is a dependency on the MySQL backend relation, it won’t start without it. Click in the same ‘Search the store’ field in the top right hand of the screen as in step 8 and type in ‘mysql’ before hitting enter. The charm required is the mysql charm by mysql-charmers (it should be the first charm that appears in the list). Use the same green + button to add the charm to the model.
Ensure the configuration settings are set to ‘Xenial’ in the ‘Choose Series’ field like you did with the hue charm in step 9 before hitting the blue ‘Commit changes’ in the bottom right of the canvas. The series for MySQL is usually set to ‘Zesty’ so it is very important you change this to ‘Xenial’ using the drop-down menu provided.
Review the changes by scrolling the screen down and clicking the big ‘Commit’ button when you’re happy.
Next, connect the MySQL charm to the hue one using the relation click, hold and drag method as previous (step 12). IMPORTANT: When connecting the two charms the following drop-down menu should appear.
The relation type you want is the ‘hue-a:mysql-backend → mysql:db’ relation. Commit the changes using the blue button in the bottom right once more and then the green button after reviewing.
Check status, once MySQL has spun up and everything is running in ‘idle’. Go back to the canvas using the ‘applications’ tab. Once back on the GUI canvas page with your model showing, click on the hue charm and go to the menu which should have opened up on the left-hand side of the canvas and click on ‘expose’, see image below for location. Expose hue by flicking the switch from its default position ‘X’ to a green tick, as shown below.
Commit the exposure using the same blue ‘Commit changes’ button as previous, using the green ‘Commit’ button to confirm it.
An IP address link should have appeared under the ‘Expose application’ title. Click on this to open up the Hue login page as a new tab in your browser.
From here you can login with the default credentials: User: hdfs Password: 12345
IMPORTANT: You will need to update your password in a production deployment.
For some tip and tricks on how to begin using Hue, head to the following link. If you’ve used Hue before then there is no need to click here.