- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了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
暂无
代码示例来源: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() {}
在审查这篇文章Android: I want to shake it ,评分最高的答案说您应该取消注册并重新注册加速度计 onStop 和 onResume 的监听器以节省电池生命周期。 我的问题是我
我有一个为 Cordova 应用程序编写的 Android 后台服务,我想通过 sensorManager 与加速度计进行交互。 我觉得我已经很接近了,但我认为还不够。 出于某种原因,sensorMa
@Override protected void onResume(){ //super.onResume(); sensorManager.registerListener
我正在尝试从 Android 手机传感器读取值。我按如下方式初始化传感器: private void sensorInit() { sensorManager = (SensorManager
我不明白怎么用这个方法, sensorManager.registerListener(SensorEventListener listener, Sensor sensor, int rate, H
本文整理了Java中org.apache.pulsar.zookeeper.ZooKeeperDataCache.registerListener()方法的一些代码示例,展示了ZooKeeperDat
本文整理了Java中org.apache.pulsar.zookeeper.ZooKeeperChildrenCache.registerListener()方法的一些代码示例,展示了ZooKeepe
本文整理了Java中com.yahoo.pulsar.zookeeper.ZooKeeperChildrenCache.registerListener()方法的一些代码示例,展示了ZooKeeper
本文整理了Java中com.twitter.distributedlog.impl.ZKNamespaceWatcher.registerListener()方法的一些代码示例,展示了ZKNamesp
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.registerListener()方法的一些代码示例,展示了ZooKeeperWatche
本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKWatcher.registerListener()方法的一些代码示例,展示了ZKWatcher.regis
本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.registerListener()方法的一些代码示例,展示了ZooKeepe
本文整理了Java中org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.registerListener()方法的一些代码示例
更新: 我能够通过引入类范围静态计数器并忽略 x 数量的事件来解决我遇到的特定问题。但我仍然想知道我做错了什么:以微秒为单位用提示注册监听器,而不是使用四个给定常量之一。 我的应用程序中的一个 Act
我是一名优秀的程序员,十分优秀!