Index: hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html =================================================================== --- hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html (revision 1390851) +++ hbase-server/src/main/javadoc/org/apache/hadoop/hbase/thrift/package.html (working copy) @@ -23,9 +23,10 @@ Provides an HBase Thrift 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. +

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 @@ -34,9 +35,11 @@

Description

-

Important note: This Thrift interface is deprecated 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 contrib directory. +

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).

The {@link org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API} is defined in the @@ -84,25 +87,23 @@

Use the TNonblockingServer. This implies the framed transport.
-

Important note: The bind option only works with the default ThreadPoolServer. -This will be fixed in the next Thrift version. See HBASE-2155 -for more details on this issue. -

Details

-

HBase currently uses version 0.2.0 of Apache Thrift.

+

HBase currently uses version 0.8.0 of Apache Thrift.

-

The files were generated by running the commands: +

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

-  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
 

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 hbase/lib directory.

+part of the Thrift package. A version of the Java runtime is included in HBase +via Maven.

Index: hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/package.html =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/package.html (revision 1390851) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/thrift2/package.html (working copy) @@ -26,23 +26,24 @@ 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:

What is Thrift?

-

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"

+2007 and entered the Apache Incubator in May, 2008". +From http://thrift.apache.org/

Description

@@ -52,33 +53,55 @@ 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. -

+

To stop, use: +

+  ./bin/hbase-daemon.sh stop thrift
+
-

The files were generated by running the commands: +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.8.0 of Apache Thrift.

+

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

-  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
+  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
 
-

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
-
-