Package org.apache.hadoop.hbase.thrift


package org.apache.hadoop.hbase.thrift
Provides an HBase Thrift service. This directory contains a Thrift interface definition file for an HBase RPC service and a Java server implementation.

What is Thrift?

"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, Smalltalk, and OCaml."

Important note

We tried to deprecate this Thrift interface and replace it with the Interface defined over in the thrift2 package only this package will not die. Folks keep adding to it and fixing it up so its around for another while until someone takes command and drives this package out of existence replacing it w/ an Interface that better matches the hbase API (this package was modelled on old HBase API long since dropped).

Description

The org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API is defined in the file Hbase.thrift (Click the former to see the thrift generated documentation of thrift interface). A server-side implementation of the API is in ThriftServer. The generated interfaces, types, and RPC utility files reside in the org.apache.hadoop.hbase.thrift.generated package.

To start ThriftServer, use:

  ./bin/hbase-daemon.sh start thrift

To stop, use:

  ./bin/hbase-daemon.sh stop thrift
These are the command line arguments the Thrift server understands in addition to start and stop:
-b, --bind
Address to bind the Thrift server to. Not supported by the Nonblocking and HsHa server [default: 0.0.0.0]
-p, --port
Port to bind to [default: 9090]
-f, --framed
Use framed transport (implied when using one of the non-blocking servers)
-c, --compact
Use the compact protocol [default: binary protocol]
-h, --help
Displays usage information for the Thrift server
-threadpool
Use the TThreadPoolServer. This is the default.
-hsha
Use the THsHaServer. This implies the framed transport.
-nonblocking
Use the TNonblockingServer. This implies the framed transport.

Details

HBase currently uses version 0.9.0 of Apache Thrift.

The files were generated by running the commands under the hbase checkout dir:

  mvn compile -Pcompile-thrift

The 'thrift' binary is the Thrift compiler, and it is distributed as a part of the Thrift package. Additionally, specific language runtime libraries are a part of the Thrift package. A version of the Java runtime is included in HBase via Maven.

  • Class
    Description
    org.apache.hadoop.hbase.thrift.CallQueue
    A BlockingQueue reports waiting time in queue and queue length to ThriftMetrics.
    org.apache.hadoop.hbase.thrift.CallQueue.Call
     
    org.apache.hadoop.hbase.thrift.Constants
    Thrift related constants
    org.apache.hadoop.hbase.thrift.DemoClient
    See the instructions under hbase-examples/README.txt
    org.apache.hadoop.hbase.thrift.HbaseHandlerMetricsProxy
    Converts a Hbase.Iface using InvocationHandler so that it reports process time of each call to ThriftMetrics.
    org.apache.hadoop.hbase.thrift.HBaseServiceHandler
    abstract class for HBase handler providing a Connection cache and get table/admin method
    org.apache.hadoop.hbase.thrift.HThreadedSelectorServerArgs
    A TThreadedSelectorServer.Args that reads hadoop configuration
    org.apache.hadoop.hbase.thrift.HttpAuthenticationException
     
    org.apache.hadoop.hbase.thrift.HttpDoAsClient
    See the instructions under hbase-examples/README.txt
    org.apache.hadoop.hbase.thrift.ImplType
    An enum of server implementation selections
    org.apache.hadoop.hbase.thrift.IncrementCoalescer
    This class will coalesce increments from a thift server if hbase.regionserver.thrift.coalesceIncrement is set to true.
    org.apache.hadoop.hbase.thrift.IncrementCoalescerMBean
     
    org.apache.hadoop.hbase.thrift.MetricsThriftServerSource
    Interface of a class that will export metrics about Thrift to hadoop's metrics2.
    org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactory
    Factory that will be used to create metrics sources for the two diffent types of thrift servers.
    org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactoryImpl
    Class used to create metrics sources for Thrift and Thrift2 servers.
    org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceImpl
    Hadoop 2 version of MetricsThriftServerSource Implements BaseSource through BaseSourceImpl, following the pattern
    org.apache.hadoop.hbase.thrift.TBoundedThreadPoolServer
    A bounded thread pool server customized for HBase.
    org.apache.hadoop.hbase.thrift.TBoundedThreadPoolServer.Args
     
    org.apache.hadoop.hbase.thrift.THBaseThreadPoolExecutor
    A ThreadPoolExecutor customized for working with HBase thrift to update metrics before and after the execution of a task.
    org.apache.hadoop.hbase.thrift.ThriftHBaseServiceHandler
    The HBaseServiceHandler is a glue object that connects Thrift RPC calls to the HBase client API primarily defined in the Admin and Table objects.
    org.apache.hadoop.hbase.thrift.ThriftHBaseServiceHandler.IOErrorWithCause
     
    org.apache.hadoop.hbase.thrift.ThriftHBaseServiceHandler.ResultScannerWrapper
     
    org.apache.hadoop.hbase.thrift.ThriftHttpServlet
    Thrift Http Servlet is used for performing Kerberos authentication if security is enabled and also used for setting the user specified in "doAs" parameter.
    org.apache.hadoop.hbase.thrift.ThriftMetrics
    This class is for maintaining the various statistics of thrift server and publishing them through the metrics interfaces.
    org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType
     
    org.apache.hadoop.hbase.thrift.ThriftServer
    ThriftServer- this class starts up a Thrift server which implements the Hbase API specified in the Hbase.thrift IDL file.
    org.apache.hadoop.hbase.thrift.ThriftUtilities