HBASE-13377 Canary may generate false alarm on the first region when there are many delete markers (He Liangliang)
Amending-Author: Andrew Purtell <apurtell@apache.org> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
This commit is contained in:
parent
d4f6928b05
commit
ac190e8077
|
@ -56,6 +56,7 @@ import org.apache.hadoop.hbase.client.RegionLocator;
|
|||
import org.apache.hadoop.hbase.client.ResultScanner;
|
||||
import org.apache.hadoop.hbase.client.Scan;
|
||||
import org.apache.hadoop.hbase.client.Table;
|
||||
import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
|
||||
import org.apache.hadoop.util.Tool;
|
||||
import org.apache.hadoop.util.ToolRunner;
|
||||
|
||||
|
@ -551,10 +552,15 @@ public final class Canary implements Tool {
|
|||
// Can't do a get on empty start row so do a Scan of first element if any instead.
|
||||
if (startKey.length > 0) {
|
||||
get = new Get(startKey);
|
||||
get.setCacheBlocks(false);
|
||||
get.setFilter(new FirstKeyOnlyFilter());
|
||||
get.addFamily(column.getName());
|
||||
} else {
|
||||
scan = new Scan();
|
||||
scan.setRaw(true);
|
||||
scan.setCaching(1);
|
||||
scan.setCacheBlocks(false);
|
||||
scan.setFilter(new FirstKeyOnlyFilter());
|
||||
scan.addFamily(column.getName());
|
||||
scan.setMaxResultSize(1L);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue