public void run() {
while (stillMaster()) {
try {
for (String tableId : Tables.getIdToNameMap(instance).keySet()) {
TableState state = TableManager.getInstance().getTableState(tableId);
if (state == null || state.equals(TableState.DELETING)) {
waitForTabletsToBeOffline(new Text(tableId));
cleanUp(tableId);
}
}
} catch (Exception ex) {