Thursday, December 29, 2011

Starting the HBase Server from Eclipse

Why Start the HBASE server inside Eclipse!
  1. HBase custom filters are a powerful feature which helps to move processing near to data. However deployment of these custom filters require one to compile the dependent classes for the filter, package in a jar and make it available to the region server.  Any new changes to these custom filter code requires the complete cycle of stopping server, packaging new jar, copying to hbase lib folder and restarting it.
  2. How to debug the code writer inside these custom filters by putting a breakpoint.
  3. To see the code execution status, look to the Region Server Log file which is same as run Eclipse + CYGWIN + Notepad to view the log status
    Because of these above shortfalls, I decided to run HBase from Eclipse. Run as a Java Application or Debug as a Java application and setting breakpoints on my filter classes to see the execution path along with stacks.

    Steps to configure HBase for Eclipse
    What we need (All are included in the deployment package - Download HStartup.zip)
    1. chmod.exe program (32 bit is included)
    2. favicon.gif  
    3. HBaseLuncher.class
    4. Unzipping HBase release


    Setting things up
    1. Unzip the attached eclipse project folder.
    2. Add hbase/lib/ folder jars in the project build path libraies.
    3. Add hbase/conf folder to project build path libraies.
    4. Add hbase.jar to project build path libraies.
    5. Add your project to the Required projects in the Java build path.

    Starting the HBase in debug mode
    1. Run HBaseLuncher in debug/run mode.
    2. In the windows tray, you will see an HBase tray icon.
    3. Right click on the tray icon to start/stop the HBase server. 

        
    For any issues, please write to me:- abinash [at] bizosys [dot] com


    No comments:

    Post a Comment