title: Using Pig to Access HBASE with HBaseStorage
body: <p>I have been experimenting with Pig to access HBase with the HBaseStorage class. I am finding strange behavior with the means HBaseStorage employs to match columns. Consider the following example:</p>
  
  <pre><code>test = load 'hbase://resultstable' using org.apache.pig.backend.hadoop.hbase.HBaseStorage('foo:fail','-loadKey false') as (testresults:map[]);
  </code></pre>
  
  <p>It is certain that the column family 'foo' and the column name 'fail' exist and that records exist in this column.  The query returns no records. However the following query returns records:</p>
  
  <pre><code>test = load 'hbase://resultstable' using org.apache.pig.backend.hadoop.hbase.HBaseStorage('foo:fail*','-loadKey false') as (testresults:map[]);
  </code></pre>
  
  <p>Note the difference between the two examples in that the latter uses 'foo:fail*' as a parameter.
  My guess is that there is a null terminator being stored in the column name and the binary exact match comparison fails because in the first example the null terminator is not explicitly passed (it shouldn't be in my opinion). </p>
  
  <p>The column 'foo:fail' was created using standard HBase libraries via a java string containing the column name being passed to the appropriate HBase java API call.</p>
  
  <p>Is this expected behavior? All the documentation (including the O'Reilly book) do not allude that it is.</p>
  
  <p>Pig version is 0.13.0. HBase version is 0.94.10.</p>