use of org.apache.hadoop.hbase.procedure2.store.ProcedureStoreTracker in project hbase by apache.
the class TestWALProcedureStore method trackersLoadedForAllOldLogs.
/**
* Tests that tracker for all old logs are loaded back after procedure store is restarted.
*/
@Test
public void trackersLoadedForAllOldLogs() throws Exception {
for (int i = 0; i <= 20; ++i) {
procStore.insert(new TestProcedure(i), null);
if (i > 0 && (i % 5) == 0) {
LoadCounter loader = new LoadCounter();
storeRestart(loader);
}
}
assertEquals(5, procStore.getActiveLogs().size());
for (int i = 0; i < procStore.getActiveLogs().size() - 1; ++i) {
ProcedureStoreTracker tracker = procStore.getActiveLogs().get(i).getTracker();
assertTrue(tracker != null && !tracker.isEmpty());
}
}
Aggregations