for (TabletGroupWatcher watcher : watchers) {
TableManager manager = TableManager.getInstance();
for (Entry<Text,TableCounts> entry : watcher.getStats().entrySet()) {
Text tableId = entry.getKey();
TableCounts counts = entry.getValue();
TableState tableState = manager.getTableState(tableId.toString());
if (tableState != null && tableState.equals(TableState.ONLINE)) {
result += counts.unassigned() + counts.assignedToDeadServers() + counts.assigned();
}
}
}
} else if (getMasterState().equals(MasterState.SAFE_MODE)) {