Github user arjansh commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/182#discussion_r195045275
--- Diff:
hbase/src/main/java/org/apache/metamodel/hbase/HBaseDataContext.java ---
@@ -242,17 +240,18 @@ protected DataSet materializeMainSchemaTable(Table
table, List<Column> columns,
}
private void setMaxRows(Scan scan, int maxRows) {
- try {
- // in old versions of the HBase API, the 'setMaxResultSize'
method
- // is not available
- Method method = scan.getClass().getMethod("setMaxResultSize",
long.class);
- method.invoke(scan, (long) maxRows);
--- End diff --
The max result size is not related to the number of returned rows. It sets
the number of bytes which is returned by a single scan before it scans for
more. So if you set it to 1, a scan will only return 1 byte and if a row
contains of more then 1 byte it will just return the complete row and after
that do a new scan for the next row.
---