HBase 有没有类似的命令SQL LIMIT
query?
我可以这样做setStart
and setEnd
,但我不想迭代所有行。
在 HBase shell 中,您可以使用 LIMIT:
hbase> scan 'test-table', {'LIMIT' => 5}
从 Java API 中您可以使用Scan.setMaxResultSize(N)
or scan.setMaxResultsPerColumnFamily(N)
.
- HBase API 文档 - Scan.setMaxResultSize http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html#setMaxResultSize%28long%29
- HBase API 文档 - Scan.setMaxResultsPerColumnFamily http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html#setMaxResultsPerColumnFamily%28int%29
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)