Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1990

Add methods accepting strings for family/qualifier in client

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 0.20.0
    • None
    • Client
    • None

    Description

      Consider the following client code...

      byte b[] = result.getValue( Bytes.toBytes("family"), Bytes.toBytes("qualifier") );
      put.add( Bytes.toBytes("family"), Bytes.toBytes("qualifer"), Bytes.toBytes( "value") );

      ... the requirement to supply family and qualifiers as bytes causes code to get cluttered and verbose. At worst, it scares peoples un-necessarily about HBase development, and at best, developers inevitably will get tired of doing all this casting and then add their own wrapper classes around the HBase client to make their code more readable.

      I would like to see something like this in the API...

      byte b[] = result.getValue( "family"), "qualifier" );
      put.add( "family", "qualifer", Bytes.toBytes( "value") );

      ... where the Hbase client can perform the required Bytes.toBytes() conversion behind the scenes.

      Attachments

        1. TestHTableGenerics.java
          5 kB
          Lars George

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dmeil Doug Meil
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: