gpt4 book ai didi

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

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

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

WALProcedureStore.<init>介绍

暂无

代码示例

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

private WALProcedureStore createWALProcedureStore(Configuration conf) throws IOException {
 return new WALProcedureStore(conf, new WALProcedureStore.LeaseRecovery() {
  @Override
  public void recoverFileLease(FileSystem fs, Path path) throws IOException {
   // no-op
  }
 });
}

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

public static WALProcedureStore createWalStore(final Configuration conf, final Path dir)
  throws IOException {
 return new WALProcedureStore(conf, dir, null, new WALProcedureStore.LeaseRecovery() {
  @Override
  public void recoverFileLease(FileSystem fs, Path path) throws IOException {
   // no-op
  }
 });
}

代码示例来源: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 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

Mockito.doReturn(firstMaster.getConfiguration()).when(backupMaster3).getConfiguration();
Mockito.doReturn(true).when(backupMaster3).isActiveMaster();
final WALProcedureStore procStore2 = new WALProcedureStore(firstMaster.getConfiguration(),
  ((WALProcedureStore)procStore).getWALDir(),
  null,

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

Mockito.doReturn(firstMaster.getConfiguration()).when(backupMaster3).getConfiguration();
Mockito.doReturn(true).when(backupMaster3).isActiveMaster();
final WALProcedureStore backupStore3 = new WALProcedureStore(firstMaster.getConfiguration(),
  ((WALProcedureStore)masterStore).getWALDir(),
  null,

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

procStore = new WALProcedureStore(htu.getConfiguration(), logDir, null,
  new WALProcedureStore.LeaseRecovery() {
 private int count = 0;

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

public static WALProcedureStore createWalStore(final Configuration conf, final Path dir)
  throws IOException {
 return new WALProcedureStore(conf, dir, null, new WALProcedureStore.LeaseRecovery() {
  @Override
  public void recoverFileLease(FileSystem fs, Path path) throws IOException {
   // no-op
  }
 });
}

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

private WALProcedureStore createWALProcedureStore(Configuration conf) throws IOException {
 return new WALProcedureStore(conf, new WALProcedureStore.LeaseRecovery() {
  @Override
  public void recoverFileLease(FileSystem fs, Path path) throws IOException {
   // no-op
  }
 });
}

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

public static WALProcedureStore createWalStore(final Configuration conf, final Path dir)
  throws IOException {
 return new WALProcedureStore(conf, dir, null, new WALProcedureStore.LeaseRecovery() {
  @Override
  public void recoverFileLease(FileSystem fs, Path path) throws IOException {
   // no-op
  }
 });
}

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

/**
  * 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: 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

Mockito.doReturn(firstMaster.getConfiguration()).when(backupMaster3).getConfiguration();
Mockito.doReturn(true).when(backupMaster3).isActiveMaster();
final WALProcedureStore procStore2 = new WALProcedureStore(firstMaster.getConfiguration(),
  ((WALProcedureStore)procStore).getWALDir(),
  null,

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

Mockito.doReturn(firstMaster.getConfiguration()).when(backupMaster3).getConfiguration();
Mockito.doReturn(true).when(backupMaster3).isActiveMaster();
final WALProcedureStore backupStore3 = new WALProcedureStore(firstMaster.getConfiguration(),
  ((WALProcedureStore)masterStore).getWALDir(),
  null,

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

procStore = new WALProcedureStore(htu.getConfiguration(), logDir, null,
  new WALProcedureStore.LeaseRecovery() {
 private int count = 0;

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

procStore = new WALProcedureStore(htu.getConfiguration(), logDir, null,
  new WALProcedureStore.LeaseRecovery() {
 private int count = 0;

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