private void tearDownProcedureStore() { store.stop(false); try { store.getFileSystem().delete(store.getLogDir(), true); } catch (IOException e) { System.err.println( "Error: Couldn't delete log dir. You can delete it manually to free up " + "disk space. Location: " + store.getLogDir().toString()); e.printStackTrace(); } }
private void setupProcedureStore() throws IOException { Path testDir = UTIL.getDataTestDir(); FileSystem fs = testDir.getFileSystem(conf); Path logDir = new Path(testDir, "proc-logs"); System.out.println("Logs directory : " + logDir.toString()); fs.delete(logDir, true); if ("nosync".equals(syncType)) { store = new NoSyncWalProcedureStore(conf, fs, logDir); } else { store = ProcedureTestingUtility.createWalStore(conf, fs, logDir); } store.start(numThreads); store.recoverLease(); store.load(new ProcedureTestingUtility.LoadCounter()); System.out.println( "Starting new log : " + store.getActiveLogs().get(store.getActiveLogs().size() - 1)); }