protected void executeTimedoutProcedure(Procedure<TEnvironment> proc) { // The procedure received a timeout. if the procedure itself does not handle it, // call abort() and add the procedure back in the queue for rollback. if (proc.setTimeoutFailure(executor.getEnvironment())) { long rootProcId = executor.getRootProcedureId(proc); RootProcedureState<TEnvironment> procStack = executor.getProcStack(rootProcId); procStack.abort(); executor.getStore().update(proc); executor.getScheduler().addFront(proc); } } }
Callable<Void> actionBeforeStartWorker, Callable<Void> startAction, boolean abort, boolean startWorkers) throws Exception { final ProcedureStore procStore = procExecutor.getStore(); final int storeThreads = procExecutor.getCorePoolSize(); final int execThreads = procExecutor.getCorePoolSize();
public void testWALfencing(boolean walRolls) throws IOException { final ProcedureStore procStore = getMasterProcedureExecutor().getStore(); assertTrue("expected WALStore for this test", procStore instanceof WALProcedureStore);
@Test public void testWalRecoverLease() throws Exception { final ProcedureStore masterStore = getMasterProcedureExecutor().getStore(); assertTrue("expected WALStore for this test", masterStore instanceof WALProcedureStore);
private void executeTimedoutProcedure(Procedure proc) { // The procedure received a timeout. if the procedure itself does not handle it, // call abort() and add the procedure back in the queue for rollback. if (proc.setTimeoutFailure(executor.getEnvironment())) { long rootProcId = executor.getRootProcedureId(proc); RootProcedureState procStack = executor.getProcStack(rootProcId); procStack.abort(); executor.getStore().update(proc); executor.getScheduler().addFront(proc); } } }
protected void executeTimedoutProcedure(Procedure<TEnvironment> proc) { // The procedure received a timeout. if the procedure itself does not handle it, // call abort() and add the procedure back in the queue for rollback. if (proc.setTimeoutFailure(executor.getEnvironment())) { long rootProcId = executor.getRootProcedureId(proc); RootProcedureState<TEnvironment> procStack = executor.getProcStack(rootProcId); procStack.abort(); executor.getStore().update(proc); executor.getScheduler().addFront(proc); } } }
final Callable<Void> stopAction, final Callable<Void> startAction) throws Exception { final ProcedureStore procStore = procExecutor.getStore(); final int storeThreads = procExecutor.getCorePoolSize(); final int execThreads = procExecutor.getCorePoolSize();
public void testWALfencing(boolean walRolls) throws IOException { final ProcedureStore procStore = getMasterProcedureExecutor().getStore(); assertTrue("expected WALStore for this test", procStore instanceof WALProcedureStore);
boolean abort, boolean startWorkers) throws Exception { final ProcedureStore procStore = procExecutor.getStore(); final int storeThreads = procExecutor.getCorePoolSize(); final int execThreads = procExecutor.getCorePoolSize();
@Test public void testWalRecoverLease() throws Exception { final ProcedureStore masterStore = getMasterProcedureExecutor().getStore(); assertTrue("expected WALStore for this test", masterStore instanceof WALProcedureStore);
@Test public void testScheduler() throws Exception { // Add a region procedure, but stuck there long regionProc = procExecutor.submitProcedure(new DummyRegionProcedure( UTIL.getMiniHBaseCluster().getMaster().getMasterProcedureExecutor() .getEnvironment(), regionInfo)); WALProcedureStore walProcedureStore = (WALProcedureStore) procExecutor.getStore(); // Roll the wal walProcedureStore.rollWriterForTesting(); Thread.sleep(500); // Submit a table procedure procExecutor.submitProcedure(new DummyTableProcedure( UTIL.getMiniHBaseCluster().getMaster().getMasterProcedureExecutor() .getEnvironment(), tablename)); // Restart the procExecutor ProcedureTestingUtility.restart(procExecutor); while (procExecutor.getProcedure(regionProc) == null) { Thread.sleep(500); } DummyRegionProcedure dummyRegionProcedure = (DummyRegionProcedure) procExecutor .getProcedure(regionProc); // Resume the region procedure dummyRegionProcedure.resume(); // The region procedure should finish normally UTIL.waitFor(5000, () -> dummyRegionProcedure.isFinished()); }