[
https://issues.apache.org/jira/browse/HBASE-14508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lav Mudgal updated HBASE-14508:
-------------------------------
Description:
{code}
Scan s = new Scan();
s.addFamily(Bytes.toBytes("cf1"));
s.setCaching(cacheRows);
s.setCacheBlocks(false);
s.setStartRow("30.0.2.2\01441756800\0");
s.setStopRow("30.0.2.3\01441756800\0");
ResultScanner scanner = table.getScanner(s);
long rows = 0;
try {
for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
rows++;
}
} finally {
scanner.close();
}
System.out.println("Total no of rows = " + rows);
{code}
When I run above code with cacheRows = 100 or 10000 it prints Total no of rows
= 480000
When I run above code with cacheRows = 100000 it prints Total no of rows = 10090
cacheRows <= 10083 prints 480000
cacheRows = 10084 prints 191595
cacheRows = 10085 prints 20169
cacheRows = 10086 prints 20170
cacheRows = 10087 prints 20171
cacheRows = 10088 prints 20172
cacheRows = 10089 prints 20173
cacheRows = 10090 prints 20174
cacheRows >= 10091 prints 10090
was:
Scan s = new Scan();
s.addFamily(Bytes.toBytes("cf1"));
s.setCaching(cacheRows);
s.setCacheBlocks(false);
s.setStartRow("30.0.2.2\01441756800\0");
s.setStopRow("30.0.2.3\01441756800\0");
ResultScanner scanner = table.getScanner(s);
long rows = 0;
try {
for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
rows++;
}
} finally {
scanner.close();
}
System.out.println("Total no of rows = " + rows);
When I run above code with cacheRows = 100 or 10000 it prints Total no of rows
= 480000
When I run above code with cacheRows = 100000 it prints Total no of rows = 10090
cacheRows <= 10083 prints 480000
cacheRows = 10084 prints 191595
cacheRows = 10085 prints 20169
cacheRows = 10086 prints 20170
cacheRows = 10087 prints 20171
cacheRows = 10088 prints 20172
cacheRows = 10089 prints 20173
cacheRows = 10090 prints 20174
cacheRows >= 10091 prints 10090
> Hbase scan not returning all rows when setting heigher value in
> scan.setCaching(cacheRow)
> -----------------------------------------------------------------------------------------
>
> Key: HBASE-14508
> URL: https://issues.apache.org/jira/browse/HBASE-14508
> Project: HBase
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Lav Mudgal
>
> {code}
> Scan s = new Scan();
> s.addFamily(Bytes.toBytes("cf1"));
> s.setCaching(cacheRows);
> s.setCacheBlocks(false);
> s.setStartRow("30.0.2.2\01441756800\0");
> s.setStopRow("30.0.2.3\01441756800\0");
> ResultScanner scanner = table.getScanner(s);
> long rows = 0;
> try {
> for (Result rr = scanner.next(); rr != null; rr = scanner.next()) {
> rows++;
> }
> } finally {
> scanner.close();
> }
> System.out.println("Total no of rows = " + rows);
> {code}
> When I run above code with cacheRows = 100 or 10000 it prints Total no of
> rows = 480000
> When I run above code with cacheRows = 100000 it prints Total no of rows =
> 10090
> cacheRows <= 10083 prints 480000
> cacheRows = 10084 prints 191595
> cacheRows = 10085 prints 20169
> cacheRows = 10086 prints 20170
> cacheRows = 10087 prints 20171
> cacheRows = 10088 prints 20172
> cacheRows = 10089 prints 20173
> cacheRows = 10090 prints 20174
> cacheRows >= 10091 prints 10090
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)