@Before public void setup() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false); testMethodName = testName.getMethodName(); }
@After public void tearDown() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); }
@Before public void setup() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); }
@After public void teardown() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate( master.getMasterProcedureExecutor(), false); TEST_UTIL.shutdownMiniCluster(); }
private void resetProcExecutorTestingKillFlag() { final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor(); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false); assertTrue("expected executor to be running", procExec.isRunning()); }
private void resetProcExecutorTestingKillFlag() { final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor(); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false); assertTrue("expected executor to be running", procExec.isRunning()); }
@After public void tearDown() throws IOException { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExecutor, false); assertTrue("expected executor to be running", procExecutor.isRunning()); procExecutor.stop(); procStore.stop(false); fs.delete(logDir, true); }
@Before public void setup() throws Exception { final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor(); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false); assertTrue("expected executor to be running", procExec.isRunning()); }
@After public void tearDown() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); for (TableDescriptor htd: UTIL.getAdmin().listTableDescriptors()) { LOG.info("Tear down, remove table=" + htd.getTableName()); UTIL.deleteTable(htd.getTableName()); } }
@After public void tearDown() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); for (TableDescriptor htd: UTIL.getAdmin().listTableDescriptors()) { LOG.info("Tear down, remove table=" + htd.getTableName()); UTIL.deleteTable(htd.getTableName()); } }
private void resetProcExecutorTestingKillFlag() { ProcedureExecutor<MasterProcedureEnv> procExec = UTIL.getHBaseCluster().getMaster().getMasterProcedureExecutor(); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false); assertTrue("expected executor to be running", procExec.isRunning()); }
@Test public void testChildOnLastStepDoubleExecution() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExecutor, true); long procId = procExecutor.submitProcedure(new TestSMProcedure()); ProcedureTestingUtility.testRecoveryAndDoubleExecution(procExecutor, procId); assertEquals(6, procExecutor.getEnvironment().execCount.get()); assertEquals(0, procExecutor.getEnvironment().rollbackCount.get()); ProcedureTestingUtility.assertProcNotFailed(procExecutor, procId); }
@Test public void testChildOnLastStepWithRollbackDoubleExecution() throws Exception { procExecutor.getEnvironment().triggerChildRollback = true; ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExecutor, true); long procId = procExecutor.submitProcedure(new TestSMProcedure()); ProcedureTestingUtility.testRecoveryAndDoubleExecution(procExecutor, procId, true); assertEquals(6, procExecutor.getEnvironment().execCount.get()); assertEquals(6, procExecutor.getEnvironment().rollbackCount.get()); Throwable cause = ProcedureTestingUtility.assertProcFailed(procExecutor, procId); assertEquals(TEST_FAILURE_EXCEPTION, cause); }
@After public void tearDown() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); for (TableDescriptor htd : UTIL.getAdmin().listTableDescriptors()) { UTIL.deleteTable(htd.getTableName()); } }
private void testTimeoutEventProcedureDoubleExecution(final boolean killIfSuspended) throws Exception { TestTimeoutEventProcedure proc = new TestTimeoutEventProcedure(1000, 3); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExecutor, true); ProcedureTestingUtility.setKillIfSuspended(procExecutor, killIfSuspended); long procId = procExecutor.submitProcedure(proc); ProcedureTestingUtility.testRecoveryAndDoubleExecution(procExecutor, procId, true); ProcedureTestingUtility.assertIsAbortException(procExecutor.getResult(proc.getProcId())); }
@After public void tearDown() throws Exception { assertTrue("expected executor to be running", getMasterProcedureExecutor().isRunning()); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); for (HTableDescriptor htd: UTIL.getAdmin().listTables()) { LOG.info("Tear down, remove table=" + htd.getTableName()); UTIL.deleteTable(htd.getTableName()); } }
@Test public void testRecoveryAndDoubleExecution() throws Exception { final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor(); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, true); // Start the Restore snapshot procedure && kill the executor long procId = procExec.submitProcedure( new RestoreSnapshotProcedure(procExec.getEnvironment(), snapshotHTD, snapshot)); // Restart the executor and execute the step twice MasterProcedureTestingUtility.testRecoveryAndDoubleExecution(procExec, procId); resetProcExecutorTestingKillFlag(); validateSnapshotRestore(); }
@After public void tearDown() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false); // Kill all running procedures. for (Procedure<?> proc : procExec.getProcedures()) { procExec.abort(proc.getProcId()); ProcedureTestingUtility.waitProcedure(procExec, proc); } assertEquals(0, procExec.getEnvironment().getProcedureScheduler().size()); }
@Before public void setup() throws Exception { this.util = new HBaseTestingUtility(); setupConf(this.util.getConfiguration()); startMiniCluster(); ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate( this.util.getHBaseCluster().getMaster().getMasterProcedureExecutor(), false); serverCrashProcMetrics = this.util.getHBaseCluster().getMaster().getMasterMetrics() .getServerCrashProcMetrics(); }
@Before public void setup() throws Exception { ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(getMasterProcedureExecutor(), false); // Turn off balancer so it doesn't cut in and mess up our placements. UTIL.getAdmin().balancerSwitch(false, true); // Turn off the meta scanner so it don't remove parent on us. UTIL.getHBaseCluster().getMaster().setCatalogJanitorEnabled(false); am = UTIL.getHBaseCluster().getMaster().getAssignmentManager(); splitProcMetrics = am.getAssignmentManagerMetrics().getSplitProcMetrics(); assignProcMetrics = am.getAssignmentManagerMetrics().getAssignProcMetrics(); unassignProcMetrics = am.getAssignmentManagerMetrics().getUnassignProcMetrics(); }