if (tableStateManager.isTablePresent(desc.getTableName()) && (includeSysTables || !desc.getTableName().isSystemTable())) { htds.add(desc); if (tableStateManager.isTablePresent(s)) { TableDescriptor desc = tableDescriptors.get(s); if (desc != null) {
private boolean waitForGroupTableOnline() { while (isMasterRunning(masterServices)) { try { TableStateManager tsm = masterServices.getTableStateManager(); if (!tsm.isTablePresent(RSGROUP_TABLE_NAME)) { createRSGroupTable(); } // try reading from the table try (Table table = conn.getTable(RSGROUP_TABLE_NAME)) { table.get(new Get(ROW_KEY)); } LOG.info( "RSGroup table=" + RSGROUP_TABLE_NAME + " is online, refreshing cached information"); RSGroupInfoManagerImpl.this.refresh(true); online = true; // flush any inconsistencies between ZK and HTable RSGroupInfoManagerImpl.this.flushConfig(); return true; } catch (Exception e) { LOG.warn("Failed to perform check", e); // 100ms is short so let's just ignore the interrupt Threads.sleepWithoutInterrupt(100); } } return false; }