Search code examples
hbaseapache-pig

Can't load data from hbase using Pig


I try to load all data from hbase table. There are 10093 records in it. Here is my pig script

register 'zookeeper.jar'
register 'hbase-server-0.98.6-cdh5.3.2.jar'

result = LOAD 'hbase://clf_transaction_train'
   USING org.apache.pig.backend.hadoop.hbase.HBaseStorage(
   'cf:features cf:content', '-loadKey true')
   AS (  content:bytearray, features:bytearray);


rmf $output;
STORE result INTO '$output';

Script works correctly -- without any error messages. But load only 100 records.

How can I fix it? Thanks.


Solution

  • You are able to try modify hbase scanner timeout:

    <property>
      <name>hbase.rpc.timeout</name>
      <value>60000</value>
    </property>
    <property>
      <name>hbase.client.scanner.timeout.period</name>
      <value>60000</value>
    </property>
    <property>
      <name>hbase.cells.scanned.per.heartbeat.check</name>
      <value>10000</value>
    </property>
    

    More details here http://www.cloudera.com/documentation/enterprise/5-6-x/topics/admin_hbase_scanner_heartbeat.html