无法使用 Pig 从 hbase 加载数据

Can't load data from hbase using Pig

我尝试从 hbase table 加载所有数据。里面有10093条记录。 这是我的猪脚本

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';

脚本运行正常 -- 没有任何错误消息。但只加载 100 条记录。

我该如何解决? 谢谢

您可以尝试修改 hbase 扫描器超时:

<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>

此处有更多详细信息http://www.cloudera.com/documentation/enterprise/5-6-x/topics/admin_hbase_scanner_heartbeat.html