Tuesday, October 13, 2015

Connecting To Hortonworks Sandbox from External Apps

Hortonworks sandbox is great platform to play with big data on a small box. 

The first thing I tried doing after downloading the sandbox is to connect Aginity Hadoop Workbench to hive metastore and it won't work. 


The sandbox is built with network configurations that helps for easy access to toolsets. The host name is sandbox.hortonworks.com. This approach although makes it easy to remember the resource locations, makes it difficult to use external tools to connect to the sandbox. Even if writing a java application to connect the sandbox may not work without changing network configurations.


The key is to have a host only network for the sandbox so that it can be treated as a server even though it may be running on your local system.


I used virtual box to use the sandbox. Following are the steps to get it working


1. Download virtual box and install

2. Go to preferences and add a host only network interface. (Click the + sign on right)



Click on the screwdriver icon to the right, you should see something like following




Looking from the configuration above, the IP address assigned to you box would be 192.168.56.101

We would confirm this later


3. Download hortonworks sandbox and import the appliance into virtual box

4. Click on the properties of the sandbox and make it use the host only network interface that was created. Following is a screenshot from my sandbox configuration


5. Start the sandbox. Once the box is ready, log in with root/hadoop
6. To confirm the IP address issue command ifconfig
Look at the inet address below, its 192.168.56.101


So the sandbox is up and running with IP address 192.168.56.101 to be connected by any client / application/ program


If the sandbox is already setup on the system, you can still go to virtual box preferences, add the host only network, then go to sandbox preferences and change the network to the new created hostly network and restart the sandbox to get the same results.





No comments:

Post a Comment