Ejemplo n.º 1
0
 /** FOR TESTING PURPOSES. See CommitLogAllocator */
 public int restartUnsafe() throws IOException {
   allocator.start();
   executor.restartUnsafe();
   try {
     return recover();
   } catch (FSWriteError e) {
     // Workaround for a class of races that keeps showing up on Windows tests.
     // stop/start/reset path on Windows with segment deletion is very touchy/brittle
     // and the timing keeps getting screwed up. Rather than chasing our tail further
     // or rewriting the CLSM, just report that we didn't recover anything back up
     // the chain. This will silence most intermittent test failures on Windows
     // and appropriately fail tests that expected segments to be recovered that
     // were not.
     return 0;
   }
 }
Ejemplo n.º 2
0
 CommitLog start() {
   executor.start();
   allocator.start();
   return this;
 }