From http://thrift.apache.org/
"Thrift is a software framework for scalable cross-language services development. It combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, and OCaml. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008"
The HBase API is defined in the
file hbase.thrift. A server-side implementation of the API is in
org.apache.hadoop.hbase.thrift2.ThriftHBaseServiceHandler
with the
server boiler plate in org.apache.hadoop.hbase.thrift2.ThriftServer
.
The generated interfaces, types, and RPC utility files are checked into SVN under the
org.apache.hadoop.hbase.thrift2.generated
directory.
The files were generated by running the commands:
thrift -strict --gen java src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift mv gen-java/org/apache/hadoop/hbase/thrift2/generated src/main/java/org/apache/hadoop/hbase/thrift2/generated rm -rf gen-java
The 'thrift' binary is the Thrift compiler, and it is distributed separately from HBase in a Thrift release. Additionally, specific language runtime libraries are a part of a Thrift release. A version of the Java runtime is included in HBase via maven.
To start ThriftServer, use:
./bin/hbase-daemon.sh start thrift2 [--port=PORT]The default port is 9090.
To stop, use:
./bin/hbase-daemon.sh stop thrift