use of org.apache.accumulo.core.manager.thrift.ManagerGoalState in project accumulo by apache.
the class MiniAccumuloClusterImplTest method saneMonitorInfo.
@Test(timeout = 60000)
public void saneMonitorInfo() throws Exception {
ManagerMonitorInfo stats;
while (true) {
stats = accumulo.getManagerMonitorInfo();
if (stats.tableMap.size() <= 2) {
continue;
}
if (null != stats.tServerInfo && stats.tServerInfo.size() == NUM_TSERVERS) {
break;
}
}
List<ManagerState> validStates = Arrays.asList(ManagerState.values());
List<ManagerGoalState> validGoals = Arrays.asList(ManagerGoalState.values());
assertTrue("manager state should be valid.", validStates.contains(stats.state));
assertTrue("manager goal state should be in " + validGoals + ". is " + stats.goalState, validGoals.contains(stats.goalState));
assertNotNull("should have a table map.", stats.tableMap);
assertTrue("root table should exist in " + stats.tableMap.keySet(), stats.tableMap.containsKey(RootTable.ID.canonical()));
assertTrue("meta table should exist in " + stats.tableMap.keySet(), stats.tableMap.containsKey(MetadataTable.ID.canonical()));
assertTrue("our test table should exist in " + stats.tableMap.keySet(), stats.tableMap.containsKey(testTableID));
assertNotNull("there should be tservers.", stats.tServerInfo);
assertEquals(NUM_TSERVERS, stats.tServerInfo.size());
}
Aggregations