HBASE-6688 folder referred by thrift demo app instructions is outdated

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1391283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-09-28 02:21:55 +00:00
parent cb6286c719
commit 18b40d61c3
2 changed files with 61 additions and 37 deletions

View File

@ -26,23 +26,24 @@ service.
This package contains a Thrift interface definition file for an HBase RPC
service and a Java server implementation.
There is currently 2 thrift server implementations in HBase, the packages:
There are currently 2 thrift server implementations in HBase, the packages:
<ul>
<li>org.apache.hadoop.hbase.thrift - This may one day be marked as depreceated.</li>
<li>org.apache.hadoop.hbase.thrift2 - This is intended to closely match to the HTable interface.</li>
<li>org.apache.hadoop.hbase.thrift: This may one day be marked as depreceated.</li>
<li>org.apache.hadoop.hbase.thrift2: i.e. this package. This is intended to closely match to the HTable interface and
to one day supercede the older thrift (the old thrift mimics an API HBase no longer has).</li>
</ul>
<h2><a name="whatisthrift">What is Thrift?</a></h2>
<p>From http://thrift.apache.org/</p>
<p>"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"</p>
2007 and entered the Apache Incubator in May, 2008".
From http://thrift.apache.org/</p>
<h2><a name="description">Description</a></h2>
@ -52,33 +53,55 @@ file hbase.thrift. A server-side implementation of the API is in
server boiler plate in <code>org.apache.hadoop.hbase.thrift2.ThriftServer</code>.
The generated interfaces, types, and RPC utility files are checked into SVN under the
<code>org.apache.hadoop.hbase.thrift2.generated</code> directory.
</p>
<p>The files were generated by running the commands:
<p>To stop, use:
<pre>
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
./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>
<h3><a name="details">Details</a></h3>
<p>HBase currently uses version 0.8.0 of Apache Thrift.</p>
<p>The files were generated by running the commands under the hbase checkout dir:
<pre>
thrift -strict --gen java:hashcode ./hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
# Move the generated files into place their expected location under hbase
mv gen-java/org/apache/hadoop/hbase/thrift2/generated/* hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/generated/
# Remove the gen-java file made by thrift
rm -rf gen-java
</pre>
</p>
<p>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.
</p>
<p>To start ThriftServer, use:
<pre>
./bin/hbase-daemon.sh start thrift2 [--port=PORT]
</pre>
The default port is 9090.
</p>
<p>To stop, use:
<pre>
./bin/hbase-daemon.sh stop thrift
</pre>
</p>
</body>
</html>

View File

@ -23,9 +23,10 @@
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
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
@ -34,9 +35,11 @@ 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><i>Important note:</i> 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).
</p>
<p>The {@link org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API} is defined in the
@ -84,25 +87,23 @@ These are the command line arguments the Thrift server understands in addition t
<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>HBase currently uses version 0.8.0 of Apache Thrift.</p>
<p>The files were generated by running the commands:
<p>The files were generated by running the commands under the hbase checkout dir:
<pre>
thrift -strict --gen java:hashcode Hbase.thrift
mv gen-java/org/apache/hadoop/hbase/thrift/generated .
thrift -strict --gen java:hashcode ./hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
# Move the generated files into place their expected location under hbase
mv gen-java/org/apache/hadoop/hbase/thrift/generated/* hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/generated/
# Remove the gen-java file made by thrift
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>
part of the Thrift package. A version of the Java runtime is included in HBase
via Maven.</p>
</body>
</html>