Bigtop
  1. Bigtop
  2. BIGTOP-756

Provide the thrift API interface file in the HBase packages

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Component/s: General
    • Labels:
      None

      Description

      HBase tarballs have this file:

      ./src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift

      Which is essential to developers writing own libraries to talk with the thrift HBase server, and for other (dev-oriented) purposes.

      Currently, this isn't installed anywhere by RPMs; we could probably package it to aid developers. For non-Java HBase users, this is akin to looking for a jar.

        Activity

        Hide
        Roman Shaposhnik added a comment -

        +1 and commited!

        Show
        Roman Shaposhnik added a comment - +1 and commited!
        Hide
        Anatoli Fomenko added a comment -

        Thank you Roman. A new patch version attached.

        Show
        Anatoli Fomenko added a comment - Thank you Roman. A new patch version attached.
        Hide
        Roman Shaposhnik added a comment -

        Anatoli Fomenko you need to also create a containing subdirectory. take a look at install commands in that same file.

        Show
        Roman Shaposhnik added a comment - Anatoli Fomenko you need to also create a containing subdirectory. take a look at install commands in that same file.
        Hide
        Anatoli Fomenko added a comment -

        Submitted a patch per Roman's comment.

        Show
        Anatoli Fomenko added a comment - Submitted a patch per Roman's comment.
        Hide
        Roman Shaposhnik added a comment -

        Great stuff! One small suggestion can we put these files under the following names:

        /usr/lib/hbase/include/thrift/hbase1.thrift
        /usr/lib/hbase/include/thrift/hbase2.thrift
        
        Show
        Roman Shaposhnik added a comment - Great stuff! One small suggestion can we put these files under the following names: /usr/lib/hbase/include/thrift/hbase1.thrift /usr/lib/hbase/include/thrift/hbase2.thrift
        Hide
        Anatoli Fomenko added a comment -

        Some background:

        • Package org.apache.hadoop.hbase.thrift
          • Description: Provides an HBase Thrift service. This directory contains a Thrift interface definition file for an HBase RPC service and a Java server implementation.
          • The org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API is defined in the file Hbase.thrift. 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.
        • Package org.apache.hadoop.hbase.thrift2 Description
          • Provides an HBase Thrift service. This package contains a Thrift interface definition file for an HBase RPC service and a Java server implementation. There are currently 2 thrift server implementations in HBase, the packages:
            • org.apache.hadoop.hbase.thrift: This may one day be marked as depreceated.
            • 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).
          • 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 Thrift API files can be generated by running the commands under the hbase checkout dir (in this example, for Java):
            thrift -strict --gen java:hashcode ./hbase-server/src/main/resources/org/apache/hadoop/hbase/[thrift|thrift2]/Hbase.thrift
          
        • To install the generated API, move the generated files into place their expected location under hbase:
            mv gen-java/org/apache/hadoop/hbase/[thrift|thrift2]/generated/* hbase-server/src/main/java/org/apache/hadoop/hbase/[thrift|thrift2]/generated/
          
        • To clean up,remove the gen-java file made by thrift:
            rm -rf gen-java
          

        Suggestion:

        • From above notes, the suggested file
           ./src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift 

          along with its more modern counterpart

           ./src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift 

          is required to build multi-language Thrift clients to access HBase via Thrift server.
          I would suggest, dittoing Roman's proposal, to make these files available as follows:

          /usr/lib/hbase/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
          /usr/lib/hbase/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
          
        Show
        Anatoli Fomenko added a comment - Some background: Package org.apache.hadoop.hbase.thrift Description: Provides an HBase Thrift service. This directory contains a Thrift interface definition file for an HBase RPC service and a Java server implementation. The org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API is defined in the file Hbase.thrift. 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. Package org.apache.hadoop.hbase.thrift2 Description Provides an HBase Thrift service. This package contains a Thrift interface definition file for an HBase RPC service and a Java server implementation. There are currently 2 thrift server implementations in HBase, the packages: org.apache.hadoop.hbase.thrift: This may one day be marked as depreceated. 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). 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 Thrift API files can be generated by running the commands under the hbase checkout dir (in this example, for Java): thrift -strict --gen java:hashcode ./hbase-server/src/main/resources/org/apache/hadoop/hbase/[thrift|thrift2]/Hbase.thrift To install the generated API, move the generated files into place their expected location under hbase: mv gen-java/org/apache/hadoop/hbase/[thrift|thrift2]/generated/* hbase-server/src/main/java/org/apache/hadoop/hbase/[thrift|thrift2]/generated/ To clean up,remove the gen-java file made by thrift: rm -rf gen-java Suggestion: From above notes, the suggested file ./src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift along with its more modern counterpart ./src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift is required to build multi-language Thrift clients to access HBase via Thrift server. I would suggest, dittoing Roman's proposal, to make these files available as follows: /usr/lib/hbase/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift /usr/lib/hbase/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
        Hide
        Roman Shaposhnik added a comment -

        Would making this file available under /usr/lib/hbase make sense?

        Show
        Roman Shaposhnik added a comment - Would making this file available under /usr/lib/hbase make sense?

          People

          • Assignee:
            Anatoli Fomenko
            Reporter:
            Harsh J
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development