gpt4 book ai didi

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

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

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

WALProcedureStore.load介绍

暂无

代码示例

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

public void setUpProcedureStore() throws IOException {
 Path testDir = UTIL.getDataTestDir();
 FileSystem fs = testDir.getFileSystem(conf);
 Path logDir = new Path(testDir, "proc-logs");
 System.out.println("\n\nLogs directory : " + logDir.toString() + "\n\n");
 fs.delete(logDir, true);
 store = ProcedureTestingUtility.createWalStore(conf, logDir);
 store.start(1);
 store.recoverLease();
 store.load(new LoadCounter());
}

代码示例来源: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 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, logDir);
 } else {
  store = ProcedureTestingUtility.createWalStore(conf, logDir);
 }
 store.start(numThreads);
 store.recoverLease();
 store.load(new ProcedureTestingUtility.LoadCounter());
 System.out.println("Starting new log : "
   + store.getActiveLogs().get(store.getActiveLogs().size() - 1));
}

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

@Before
public void setUp() throws IOException {
 htu = new HBaseCommonTestingUtility();
 testDir = htu.getDataTestDir();
 fs = testDir.getFileSystem(htu.getConfiguration());
 assertTrue(testDir.depth() > 1);
 setupConfig(htu.getConfiguration());
 logDir = new Path(testDir, "proc-logs");
 procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
 procStore.start(PROCEDURE_STORE_SLOTS);
 procStore.recoverLease();
 procStore.load(new LoadCounter());
}

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

@Before
public void setUp() throws IOException {
 htu = new HBaseCommonTestingUtility();
 setupConfiguration(htu.getConfiguration());
 testDir = htu.getDataTestDir();
 fs = testDir.getFileSystem(htu.getConfiguration());
 assertTrue(testDir.depth() > 1);
 logDir = new Path(testDir, "proc-logs");
 procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
 procStore.start(PROCEDURE_STORE_SLOTS);
 procStore.recoverLease();
 LoadCounter loader = new LoadCounter();
 procStore.load(loader);
 assertEquals(0, loader.getMaxProcId());
 assertEquals(0, loader.getLoadedCount());
 assertEquals(0, loader.getCorruptedCount());
}

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

procStore.start(PROCEDURE_STORE_SLOTS);
procStore.recoverLease();
procStore.load(loader);
assertEquals(procs.length, loader.getMaxProcId());
assertEquals(1, loader.getRunnableCount());

代码示例来源:origin: org.apache.hbase/hbase-procedure

public void setUpProcedureStore() throws IOException {
 Path testDir = UTIL.getDataTestDir();
 FileSystem fs = testDir.getFileSystem(conf);
 Path logDir = new Path(testDir, "proc-logs");
 System.out.println("\n\nLogs directory : " + logDir.toString() + "\n\n");
 fs.delete(logDir, true);
 store = ProcedureTestingUtility.createWalStore(conf, logDir);
 store.start(1);
 store.recoverLease();
 store.load(new LoadCounter());
}

代码示例来源:origin: com.aliyun.hbase/alihbase-procedure

public void setUpProcedureStore() throws IOException {
 Path testDir = UTIL.getDataTestDir();
 FileSystem fs = testDir.getFileSystem(conf);
 Path logDir = new Path(testDir, "proc-logs");
 System.out.println("\n\nLogs directory : " + logDir.toString() + "\n\n");
 fs.delete(logDir, true);
 store = ProcedureTestingUtility.createWalStore(conf, logDir);
 store.start(1);
 store.recoverLease();
 store.load(new LoadCounter());
}

代码示例来源:origin: com.aliyun.hbase/alihbase-procedure

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, logDir);
 } else {
  store = ProcedureTestingUtility.createWalStore(conf, logDir);
 }
 store.start(numThreads);
 store.recoverLease();
 store.load(new ProcedureTestingUtility.LoadCounter());
 System.out.println("Starting new log : "
   + store.getActiveLogs().get(store.getActiveLogs().size() - 1));
}

代码示例来源:origin: com.aliyun.hbase/alihbase-procedure

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: org.apache.hbase/hbase-procedure

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, logDir);
 } else {
  store = ProcedureTestingUtility.createWalStore(conf, logDir);
 }
 store.start(numThreads);
 store.recoverLease();
 store.load(new ProcedureTestingUtility.LoadCounter());
 System.out.println("Starting new log : "
   + store.getActiveLogs().get(store.getActiveLogs().size() - 1));
}

代码示例来源:origin: org.apache.hbase/hbase-procedure

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: org.apache.hbase/hbase-procedure

@Before
public void setUp() throws IOException {
 htu = new HBaseCommonTestingUtility();
 testDir = htu.getDataTestDir();
 fs = testDir.getFileSystem(htu.getConfiguration());
 assertTrue(testDir.depth() > 1);
 setupConfig(htu.getConfiguration());
 logDir = new Path(testDir, "proc-logs");
 procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
 procStore.start(PROCEDURE_STORE_SLOTS);
 procStore.recoverLease();
 procStore.load(new LoadCounter());
}

代码示例来源:origin: com.aliyun.hbase/alihbase-procedure

@Before
public void setUp() throws IOException {
 htu = new HBaseCommonTestingUtility();
 testDir = htu.getDataTestDir();
 fs = testDir.getFileSystem(htu.getConfiguration());
 assertTrue(testDir.depth() > 1);
 setupConfig(htu.getConfiguration());
 logDir = new Path(testDir, "proc-logs");
 procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
 procStore.start(PROCEDURE_STORE_SLOTS);
 procStore.recoverLease();
 procStore.load(new LoadCounter());
}

代码示例来源:origin: com.aliyun.hbase/alihbase-procedure

@Before
public void setUp() throws IOException {
 htu = new HBaseCommonTestingUtility();
 setupConfiguration(htu.getConfiguration());
 testDir = htu.getDataTestDir();
 fs = testDir.getFileSystem(htu.getConfiguration());
 assertTrue(testDir.depth() > 1);
 logDir = new Path(testDir, "proc-logs");
 procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
 procStore.start(PROCEDURE_STORE_SLOTS);
 procStore.recoverLease();
 LoadCounter loader = new LoadCounter();
 procStore.load(loader);
 assertEquals(0, loader.getMaxProcId());
 assertEquals(0, loader.getLoadedCount());
 assertEquals(0, loader.getCorruptedCount());
}

代码示例来源:origin: org.apache.hbase/hbase-procedure

@Before
public void setUp() throws IOException {
 htu = new HBaseCommonTestingUtility();
 setupConfiguration(htu.getConfiguration());
 testDir = htu.getDataTestDir();
 fs = testDir.getFileSystem(htu.getConfiguration());
 assertTrue(testDir.depth() > 1);
 logDir = new Path(testDir, "proc-logs");
 procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
 procStore.start(PROCEDURE_STORE_SLOTS);
 procStore.recoverLease();
 LoadCounter loader = new LoadCounter();
 procStore.load(loader);
 assertEquals(0, loader.getMaxProcId());
 assertEquals(0, loader.getLoadedCount());
 assertEquals(0, loader.getCorruptedCount());
}

代码示例来源:origin: org.apache.hbase/hbase-procedure

procStore.start(PROCEDURE_STORE_SLOTS);
procStore.recoverLease();
procStore.load(loader);
assertEquals(procs.length, loader.getMaxProcId());
assertEquals(1, loader.getRunnableCount());

代码示例来源:origin: com.aliyun.hbase/alihbase-procedure

procStore.start(PROCEDURE_STORE_SLOTS);
procStore.recoverLease();
procStore.load(loader);
assertEquals(procs.length, loader.getMaxProcId());
assertEquals(1, loader.getRunnableCount());

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