public void visitMeta(final RegionStateVisitor visitor) throws IOException { MetaTableAccessor.fullScanRegions(master.getConnection(), new MetaTableAccessor.Visitor() { final boolean isDebugEnabled = LOG.isDebugEnabled(); @Override public boolean visit(final Result r) throws IOException { if (r != null && !r.isEmpty()) { long st = 0; if (LOG.isTraceEnabled()) { st = System.currentTimeMillis(); } visitMetaEntry(visitor, r); if (LOG.isTraceEnabled()) { long et = System.currentTimeMillis(); LOG.trace("[T] LOAD META PERF " + StringUtils.humanTimeDiff(et - st)); } } else if (isDebugEnabled) { LOG.debug("NULL result from meta - ignoring but this is strange."); } return true; } }); }
MetaTableAccessor.fullScanRegions(connection, v);
MetaTableAccessor.fullScanRegions(connection, visitor); pair = result.get();
private void validateNumberOfRowsInMeta(final TableName table, int numRegions, Connection connection) throws IOException { assert(ADMIN.tableExists(table)); final AtomicInteger count = new AtomicInteger(); Visitor visitor = new Visitor() { @Override public boolean visit(Result r) throws IOException { if (MetaTableAccessor.getRegionInfo(r).getTable().equals(table)) count.incrementAndGet(); return true; } }; MetaTableAccessor.fullScanRegions(connection, visitor); assert(count.get() == numRegions); }
@Test public void testDoNotRetryMetaTableAccessor() throws IOException { this.conf.set("hbase.client.connection.impl", RegionServerStoppedOnScannerOpenConnection.class.getName()); try (Connection connection = ConnectionFactory.createConnection(conf)) { MetaTableAccessor.fullScanRegions(connection); } }
/** * Dumps hbase:meta table info * * @return # of entries in meta. */ protected int scanMeta() throws IOException { LOG.info("Scanning META"); MetaTableAccessor.fullScanMetaAndPrint(TEST_UTIL.getConnection()); return MetaTableAccessor.fullScanRegions(TEST_UTIL.getConnection()).size(); }
MetaTableAccessor.fullScanRegions(CONNECTION, visitor); LOG.info("There are " + regionOnPrimaryNum.intValue() + " out of " + totalRegionNum.intValue() + " regions running on the primary" +
if (!checkMetaOnly) { MetaTableAccessor.fullScanRegions(connection, visitor);
List<Result> metaRows = MetaTableAccessor.fullScanRegions(ADMIN.getConnection()); int numRows = 0; for (Result result : metaRows) {
MetaTableAccessor.fullScanRegions(connection, visitor); pair = result.get();
@Test public void testDoNotRetryMetaTableAccessor() throws IOException { this.conf.set("hbase.client.connection.impl", RegionServerStoppedOnScannerOpenConnection.class.getName()); try (Connection connection = ConnectionFactory.createConnection(conf)) { MetaTableAccessor.fullScanRegions(connection); } }
MetaTableAccessor.fullScanRegions(connection, visitor); pair = result.get();
private void validateNumberOfRowsInMeta(final TableName table, int numRegions, Connection connection) throws IOException { assert(ADMIN.tableExists(table)); final AtomicInteger count = new AtomicInteger(); Visitor visitor = new Visitor() { @Override public boolean visit(Result r) throws IOException { if (MetaTableAccessor.getRegionInfo(r).getTable().equals(table)) count.incrementAndGet(); return true; } }; MetaTableAccessor.fullScanRegions(connection, visitor); assert(count.get() == numRegions); }
MetaTableAccessor.fullScanRegions(conn, visitor);
MetaTableAccessor.fullScanRegions(conn, visitor);
/** * Dumps hbase:meta table info * * @return # of entries in meta. */ protected int scanMeta() throws IOException { LOG.info("Scanning META"); MetaTableAccessor.fullScanMetaAndPrint(TEST_UTIL.getConnection()); return MetaTableAccessor.fullScanRegions(TEST_UTIL.getConnection()).size(); }
MetaTableAccessor.fullScanRegions(CONNECTION, visitor); LOG.info("There are " + regionOnPrimaryNum.intValue() + " out of " + totalRegionNum.intValue() + " regions running on the primary" +
List<Result> metaRows = MetaTableAccessor.fullScanRegions(ADMIN.getConnection()); int numRows = 0; for (Result result : metaRows) {