gpt4 book ai didi

org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.stop()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 04:53:05 29 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.stop()方法的一些代码示例,展示了WALProcedureStore.stop()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WALProcedureStore.stop()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore
类名称:WALProcedureStore
方法名:stop

WALProcedureStore.stop介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

@Override
 public void abortProcess() {
  LOG.error(HBaseMarkers.FATAL, "Abort the Procedure Store");
  store.stop(true);
 }
};

代码示例来源:origin: apache/hbase

@Override
 public void abortProcess() {
  LOG.debug("Abort store of backupMaster3");
  backupStore3Abort.countDown();
  backupStore3.stop(true);
 }
});

代码示例来源:origin: apache/hbase

/**
  * Parses a directory of WALs building up ProcedureState.
  * For testing parse and profiling.
  * @param args Include pointer to directory of WAL files for a store instance to parse & load.
  */
 public static void main(String [] args) throws IOException {
  Configuration conf = HBaseConfiguration.create();
  if (args == null || args.length != 1) {
   System.out.println("ERROR: Empty arguments list; pass path to MASTERPROCWALS_DIR.");
   System.out.println("Usage: WALProcedureStore MASTERPROCWALS_DIR");
   System.exit(-1);
  }
  WALProcedureStore store = new WALProcedureStore(conf, new Path(args[0]), null,
   new WALProcedureStore.LeaseRecovery() {
    @Override
    public void recoverFileLease(FileSystem fs, Path path) throws IOException {
     // no-op
    }
   });
  try {
   store.start(16);
   ProcedureExecutor<?> pe = new ProcedureExecutor<>(conf, new Object()/*Pass anything*/, store);
   pe.init(1, true);
  } finally {
   store.stop(true);
  }
 }
}

代码示例来源:origin: apache/hbase

private void stopStoreAndExecutor() {
 EXEC.stop();
 STORE.stop(false);
 EXEC = null;
 STORE = null;
}

代码示例来源:origin: apache/hbase

@After
public void tearDown() throws IOException {
 procStore.stop(false);
 fs.delete(logDir, true);
}

代码示例来源:origin: apache/hbase

@After
public void tearDown() throws IOException {
 procStore.stop(false);
 fs.delete(logDir, true);
}

代码示例来源:origin: apache/hbase

public void tearDownProcedureStore() {
 store.stop(false);
 try {
  store.getFileSystem().delete(store.getWALDir(), 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.getWALDir().toString());
  System.err.println(e.toString());
 }
}

代码示例来源:origin: apache/hbase

private void tearDownProcedureStore() {
 store.stop(false);
 try {
  store.getFileSystem().delete(store.getWALDir(), 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.getWALDir().toString());
  e.printStackTrace();
 }
}

代码示例来源:origin: apache/hbase

@After
public void tearDown() {
 procExec.stop();
 procStore.stop(false);
}

代码示例来源:origin: apache/hbase

@After
public void tearDown() {
 procExec.stop();
 procStore.stop(false);
}

代码示例来源:origin: apache/hbase

private void storeRestart(ProcedureStore.ProcedureLoader loader) throws IOException {
 System.out.println("Restarting procedure store to read back the WALs");
 store.stop(false);
 store.start(1);
 store.recoverLease();
 long startTime = currentTimeMillis();
 store.load(loader);
 long timeTaken = System.currentTimeMillis() - startTime;
 System.out.println("******************************************");
 System.out.println("Load time : " + (timeTaken / 1000.0f) + "sec");
 System.out.println("******************************************");
 System.out.println("Raw format for scripts");
   System.out.println(String.format("RESULT [%s=%s, %s=%s, %s=%s, %s=%s, %s=%s, "
       + "total_time_ms=%s]",
   NUM_PROCS_OPTION.getOpt(), numProcs, STATE_SIZE_OPTION.getOpt(), serializedState.length,
   UPDATES_PER_PROC_OPTION.getOpt(), updatesPerProc, DELETE_PROCS_FRACTION_OPTION.getOpt(),
   deleteProcsFraction, NUM_WALS_OPTION.getOpt(), numWals, timeTaken));
}

代码示例来源:origin: apache/hbase

private void stopProcedureExecutor() {
 if (procedureExecutor != null) {
  configurationManager.deregisterObserver(procedureExecutor.getEnvironment());
  procedureExecutor.getEnvironment().getRemoteDispatcher().stop();
  procedureExecutor.stop();
  procedureExecutor.join();
  procedureExecutor = null;
 }
 if (procedureStore != null) {
  procedureStore.stop(isAborted());
  procedureStore = null;
 }
}

代码示例来源:origin: apache/hbase

@SuppressWarnings("JUnit4TearDownNotRun")
public void tearDown() throws Exception {
 store.stop(false);
 UTIL.getDFSCluster().getFileSystem().delete(store.getWALDir(), true);
 try {
  UTIL.shutdownMiniCluster();
 } catch (Exception e) {
  LOG.warn("failure shutting down cluster", e);
 }
}

代码示例来源:origin: apache/hbase

procStore.stop(false);
FileStatus[] logs = fs.listStatus(logDir);
assertEquals(3, logs.length);

代码示例来源:origin: apache/hbase

@Test
public void testCorruptedTrailer() throws Exception {
 // Insert something
 for (int i = 0; i < 100; ++i) {
  procStore.insert(new TestSequentialProcedure(), null);
 }
 // Stop the store
 procStore.stop(false);
 // Remove 4 byte from the trailer
 FileStatus[] logs = fs.listStatus(logDir);
 assertEquals(1, logs.length);
 corruptLog(logs[0], 4);
 LoadCounter loader = new LoadCounter();
 storeRestart(loader);
 assertEquals(100, loader.getLoadedCount());
 assertEquals(0, loader.getCorruptedCount());
}

代码示例来源:origin: apache/hbase

@Test
public void testCorruptedEntries() throws Exception {
 // Insert something
 for (int i = 0; i < 100; ++i) {
  procStore.insert(new TestSequentialProcedure(), null);
 }
 // Stop the store
 procStore.stop(false);
 // Remove some byte from the log
 // (enough to cut the trailer and corrupt some entries)
 FileStatus[] logs = fs.listStatus(logDir);
 assertEquals(1, logs.length);
 corruptLog(logs[0], 1823);
 LoadCounter loader = new LoadCounter();
 storeRestart(loader);
 assertTrue(procStore.getCorruptedLogs() != null);
 assertEquals(1, procStore.getCorruptedLogs().size());
 assertEquals(87, loader.getLoadedCount());
 assertEquals(0, loader.getCorruptedCount());
}

代码示例来源:origin: apache/hbase

procStore.stop(false);

代码示例来源:origin: apache/hbase

procStore.stop(false);
FileStatus[] logs = fs.listStatus(logDir);
assertEquals(4, logs.length);

代码示例来源:origin: apache/hbase

procStore.rollWriterForTesting();
procStore.stop(false);

代码示例来源:origin: apache/hbase

FAIL_LOAD = true;
UTIL.getMiniHBaseCluster().getMaster().getWalProcedureStore().stop(true);
UTIL.getMiniHBaseCluster().getMaster().abort("for testing");
waitNoMaster();

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com