Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3108

HBaseStorage returns empty maps when mixing wildcard- with other columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.11, 0.10.1, 0.12.0
    • 0.12.0
    • None
    • None

    Description

      Consider the following:
      A and B should be the same (with different order, of course).

      /*
      in hbase shell:
      
      create 'pigtest', 'pig'
      put 'pigtest' , '1', 'pig:name', 'A'
      put 'pigtest' , '1', 'pig:has_legs', 'true'
      put 'pigtest' , '1', 'pig:has_ribs', 'true'
      */
      A = LOAD 'hbase://pigtest' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('pig:name pig:has*') AS (name:chararray,parts);
      
      B = LOAD 'hbase://pigtest' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('pig:has* pig:name') AS (parts,name:chararray);
      
      dump A;
      dump B;
      

      This is due to a bug in setLocation and initScan.
      For A

      1. scan.addColumn(pig,name); // for 'pig:name'
      2. scan.addFamily(pig); // for the 'pig:has*'

      So that's silently right.

      But for B

      1. scan.addFamily(pig)
      2. scan.addColumn(pig,name)

      will override the first call to addFamily, because you cannot mix them on the same family.

      Attachments

        1. PIG-3108.patch
          7 kB
          Christoph Bauer
        2. PIG-3108.patch
          6 kB
          Christoph Bauer

        Activity

          People

            christoph.bauer Christoph Bauer
            christoph.bauer Christoph Bauer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: