Wednesday, January 1, 2014

Accessing HBase using Thrift/Python

Install Thrift (and it's Dependencies)

To access HBase via Python you must first download, compile, and install Apache Thrift.  As of the time of this writing, the Apache Thrift website does not offer pre-compiled binaries for OS X.  The process for downloading, compiling and installing Thrift is documented on the Thrift web site.  However, I have recorded my steps below incase someone is interested in following them.

Download and install libevent
  1. Download libevent (here is the link for 2.0.12, which is the version I used)
  2. Untar libevent
  3. Compile libevent by executing the following three commands
./configure --prefix=/usr/local 
make
sudo make install

Download and install Boost
  1. Download Boost (here is the link for 1.54, which is the version I used)
  2. Untar Boost
  3. Compile Boost by executing the following two commands
./bootstrap.sh
sudo ./b2 threading=multi address-model=64 variant=release stage install

Note:  I received numerous warnings and errors but ignored them.

Download and install Thrift
  1. Download Thrift (here is the link for 0.9.1, which is the version I used)
  2. Untar Thrift
  3. Compile Thrift by exeucting the following command
./configure --prefix=/usr/local/ --with-boost=/usr/local --with-libevent=/usr/local


No comments:

Post a Comment