use of org.apache.hadoop.hbase.client.TableState in project hbase by apache.
the class MetaTableAccessor method fullScanMetaAndPrint.
public static void fullScanMetaAndPrint(Connection connection) throws IOException {
Visitor v = new Visitor() {
@Override
public boolean visit(Result r) throws IOException {
if (r == null || r.isEmpty())
return true;
LOG.info("fullScanMetaAndPrint.Current Meta Row: " + r);
TableState state = getTableState(r);
if (state != null) {
LOG.info("Table State: " + state);
} else {
RegionLocations locations = getRegionLocations(r);
if (locations == null)
return true;
for (HRegionLocation loc : locations.getRegionLocations()) {
if (loc != null) {
LOG.info("fullScanMetaAndPrint.HRI Print= " + loc.getRegionInfo());
}
}
}
return true;
}
};
scanMeta(connection, null, null, QueryType.ALL, v);
}
Aggregations