gpt4 book ai didi

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

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

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

WALProcedureStore.registerListener介绍

暂无

代码示例

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

private void createProcedureExecutor() throws IOException {
 MasterProcedureEnv procEnv = new MasterProcedureEnv(this);
 procedureStore =
  new WALProcedureStore(conf, new MasterProcedureEnv.WALStoreLeaseRecovery(this));
 procedureStore.registerListener(new ProcedureStoreListener() {
  @Override
  public void abortProcess() {
   abort("The Procedure Store lost the lease", null);
  }
 });
 MasterProcedureScheduler procedureScheduler = procEnv.getProcedureScheduler();
 procedureExecutor = new ProcedureExecutor<>(conf, procEnv, procedureStore, procedureScheduler);
 configurationManager.registerObserver(procEnv);
 int cpus = Runtime.getRuntime().availableProcessors();
 final int numThreads = conf.getInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS, Math.max(
  (cpus > 0 ? cpus / 4 : 0), MasterProcedureConstants.DEFAULT_MIN_MASTER_PROCEDURE_THREADS));
 final boolean abortOnCorruption =
  conf.getBoolean(MasterProcedureConstants.EXECUTOR_ABORT_ON_CORRUPTION,
   MasterProcedureConstants.DEFAULT_EXECUTOR_ABORT_ON_CORRUPTION);
 procedureStore.start(numThreads);
 // Just initialize it but do not start the workers, we will start the workers later by calling
 // startProcedureExecutor. See the javadoc for finishActiveMasterInitialization for more
 // details.
 procedureExecutor.init(numThreads, abortOnCorruption);
 procEnv.getRemoteDispatcher().start();
}

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

private void setupDFS() throws Exception {
 Configuration conf = UTIL.getConfiguration();
 MiniDFSCluster dfs = UTIL.startMiniDFSCluster(3);
 CommonFSUtils.setWALRootDir(conf, new Path(conf.get("fs.defaultFS"), "/tmp/wal"));
 Path logDir = new Path(new Path(dfs.getFileSystem().getUri()), "/test-logs");
 store = ProcedureTestingUtility.createWalStore(conf, logDir);
 store.registerListener(stopProcedureListener);
 store.start(8);
 store.recoverLease();
}

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

store.registerListener(new ProcedureStore.ProcedureStoreListener() {
 @Override
 public void postSync() { Threads.sleepWithoutInterrupt(2000); }

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

backupStore3.registerListener(new ProcedureStore.ProcedureStoreListener() {
 @Override
 public void postSync() {}

代码示例来源:origin: harbby/presto-connectors

private void startProcedureExecutor() throws IOException {
 final MasterProcedureEnv procEnv = new MasterProcedureEnv(this);
 final Path logDir = new Path(fileSystemManager.getRootDir(),
   MasterProcedureConstants.MASTER_PROCEDURE_LOGDIR);
 procedureStore = new WALProcedureStore(conf, fileSystemManager.getFileSystem(), logDir,
   new MasterProcedureEnv.WALStoreLeaseRecovery(this));
 procedureStore.registerListener(new MasterProcedureEnv.MasterProcedureStoreListener(this));
 procedureExecutor = new ProcedureExecutor(conf, procEnv, procedureStore,
   procEnv.getProcedureQueue());
 final int numThreads = conf.getInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS,
   Math.max(Runtime.getRuntime().availableProcessors(),
    MasterProcedureConstants.DEFAULT_MIN_MASTER_PROCEDURE_THREADS));
 final boolean abortOnCorruption = conf.getBoolean(
   MasterProcedureConstants.EXECUTOR_ABORT_ON_CORRUPTION,
   MasterProcedureConstants.DEFAULT_EXECUTOR_ABORT_ON_CORRUPTION);
 procedureStore.start(numThreads);
 procedureExecutor.start(numThreads, abortOnCorruption);
}

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

private void setupDFS() throws Exception {
 MiniDFSCluster dfs = UTIL.startMiniDFSCluster(3);
 Path logDir = new Path(new Path(dfs.getFileSystem().getUri()), "/test-logs");
 store = ProcedureTestingUtility.createWalStore(UTIL.getConfiguration(), logDir);
 store.registerListener(stopProcedureListener);
 store.start(8);
 store.recoverLease();
}

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

store.registerListener(new ProcedureStore.ProcedureStoreListener() {
 @Override
 public void postSync() { Threads.sleepWithoutInterrupt(2000); }

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

backupStore3.registerListener(new ProcedureStore.ProcedureStoreListener() {
 @Override
 public void postSync() {}

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