无法使用 Pig 从 hbase 加载数据



我尝试从hbase表加载所有数据。里面有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

最新更新