blob: f41a9ab477bef3af856e8f8ac3ca6707395d3230 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head />
<body bgcolor="white">
Provides an HBase <a href="http://incubator.apache.org/thrift/">Thrift</a>
service.
This directory contains a Thrift interface definition file for an Hbase RPC
service and a Java server implementation.
<h2><a name="whatisthrift">What is Thrift?</a></h2>
<p><blockquote>"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."</blockquote>
<h2><a name="description">Description</a></h2>
<p><i>Important note:</i> This Thrift interface is <i>deprecated</i> and scheduled for removal in HBase 0.22.
A new version that matches the client API that was introduced in HBase 0.21 can be found
in the <code>contrib</code> directory.
</p>
<p>The {@link org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API} is defined in the
file <a href="doc-files/index.html">Hbase.thrift</a> (Click the former to see the
thrift generated documentation of thrift interface). A server-side implementation of the API is in
{@link org.apache.hadoop.hbase.thrift.ThriftServer}. The generated interfaces,
types, and RPC utility files reside in the
{@link org.apache.hadoop.hbase.thrift.generated} package.
</p>
<p>To start ThriftServer, use:
<pre>
./bin/hbase-daemon.sh start thrift
</pre>
<p>To stop, use:
<pre>
./bin/hbase-daemon.sh stop thrift
</pre>
These are the command line arguments the Thrift server understands in addition to <code>start</code> and <code>stop</code>:
<dl>
<dt><code>-b, --bind</code></dt>
<dd>Address to bind the Thrift server to. Not supported by the Nonblocking and HsHa server [default: <code>0.0.0.0</code>]</dd>
<dt><code>-p, --port</code></dt>
<dd>Port to bind to [default: <code>9090</code>]</dd>
<dt><code>-f, --framed</code></dt>
<dd>Use framed transport (implied when using one of the non-blocking servers)</dd>
<dt><code>-c, --compact</code></dt>
<dd>Use the compact protocol [default: binary protocol]</dd>
<dt><code>-h, --help</code></dt>
<dd>Displays usage information for the Thrift server</dd>
<dt><code>-threadpool</code></dt>
<dd>Use the TThreadPoolServer. This is the default.</dd>
<dt><code>-hsha</code></dt>
<dd>Use the THsHaServer. This implies the framed transport.</dd>
<dt><code>-nonblocking</code></dt>
<dd>Use the TNonblockingServer. This implies the framed transport.</dd>
</dl>
<p></p><i>Important note:</i> The <code>bind</code> option only works with the default ThreadPoolServer.
This will be fixed in the next Thrift version. See <a href="https://issues.apache.org/jira/browse/HBASE-2155">HBASE-2155</a>
for more details on this issue.
<h3><a name="details">Details</a></h3>
<p>HBase currently uses version 0.2.0 of Apache Thrift.</p>
<p>The files were generated by running the commands:
<pre>
thrift -strict --gen java:hashcode Hbase.thrift
mv gen-java/org/apache/hadoop/hbase/thrift/generated .
rm -rf gen-java
</pre>
<p>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 checked into SVN
under the <code>hbase/lib</code> directory.</p>
</body>
</html>