- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.isRunning()
方法的一些代码示例,展示了WALProcedureStore.isRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WALProcedureStore.isRunning()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore
类名称:WALProcedureStore
方法名:isRunning
暂无
代码示例来源:origin: apache/hbase
private boolean rollWriterWithRetries() {
for (int i = 0; i < rollRetries && isRunning(); ++i) {
if (i > 0) Threads.sleepWithoutInterrupt(waitBeforeRoll * i);
try {
if (rollWriter()) {
return true;
}
} catch (IOException e) {
LOG.warn("Unable to roll the log, attempt=" + (i + 1), e);
}
}
LOG.error(HBaseMarkers.FATAL, "Unable to roll the log");
return false;
}
代码示例来源:origin: apache/hbase
private long syncSlots() throws Throwable {
int retry = 0;
int logRolled = 0;
long totalSynced = 0;
do {
try {
totalSynced = syncSlots(stream, slots, 0, slotIndex);
break;
} catch (Throwable e) {
LOG.warn("unable to sync slots, retry=" + retry);
if (++retry >= maxRetriesBeforeRoll) {
if (logRolled >= maxSyncFailureRoll && isRunning()) {
LOG.error("Sync slots after log roll failed, abort.", e);
throw e;
}
if (!rollWriterWithRetries()) {
throw e;
}
logRolled++;
retry = 0;
}
}
} while (isRunning());
return totalSynced;
}
代码示例来源:origin: apache/hbase
private long pushData(final PushType type, final ByteSlot slot,
final long procId, final long[] subProcIds) {
if (!isRunning()) {
throw new RuntimeException("the store must be running before inserting data");
if (!isRunning()) {
throw new RuntimeException("store no longer running");
} else if (isSyncAborted()) {
while (pushSyncId == syncId.get() && isRunning()) {
syncCond.await();
代码示例来源:origin: apache/hbase
/**
* Make sure that the file set are gotten by calling {@link #getLogFiles()}, where we will sort
* the file set by log id.
* @return Max-LogID of the specified log file set
*/
private long initOldLogs(FileStatus[] logFiles) throws IOException {
if (logFiles == null || logFiles.length == 0) {
return 0L;
}
long maxLogId = 0;
for (int i = 0; i < logFiles.length; ++i) {
final Path logPath = logFiles[i].getPath();
leaseRecovery.recoverFileLease(fs, logPath);
if (!isRunning()) {
throw new IOException("wal aborting");
}
maxLogId = Math.max(maxLogId, getLogIdFromName(logPath.getName()));
ProcedureWALFile log = initOldLog(logFiles[i], this.walArchiveDir);
if (log != null) {
this.logs.add(log);
}
}
initTrackerFromOldLogs();
return maxLogId;
}
代码示例来源:origin: apache/hbase
private boolean rollWriter() throws IOException {
if (!isRunning()) {
return false;
}
// Create new state-log
if (!rollWriter(flushLogId + 1)) {
LOG.warn("someone else has already created log {}", flushLogId);
return false;
}
// We have the lease on the log,
// but we should check if someone else has created new files
if (getMaxLogId(getLogFiles()) > flushLogId) {
LOG.warn("Someone else created new logs. Expected maxLogId < {}", flushLogId);
logs.getLast().removeFile(this.walArchiveDir);
return false;
}
// We have the lease on the log
return true;
}
代码示例来源:origin: apache/hbase
LOG.debug("Starting WAL Procedure Store lease recovery");
boolean afterFirstAttempt = false;
while (isRunning()) {
代码示例来源:origin: apache/hbase
/**
* If last log's tracker is not null, use it as {@link #storeTracker}. Otherwise, set storeTracker
* as partial, and let {@link ProcedureWALFormatReader} rebuild it using entries in the log.
*/
private void initTrackerFromOldLogs() {
if (logs.isEmpty() || !isRunning()) {
return;
}
ProcedureWALFile log = logs.getLast();
if (!log.getTracker().isPartial()) {
storeTracker.resetTo(log.getTracker());
} else {
storeTracker.reset();
storeTracker.setPartialFlag(true);
}
}
代码示例来源:origin: apache/hbase
lock.lock();
try {
while (isRunning()) {
try {
代码示例来源:origin: apache/hbase
@Test(expected=RuntimeException.class)
public void testWalAbortOnLowReplication() throws Exception {
setupDFS();
assertEquals(3, UTIL.getDFSCluster().getDataNodes().size());
LOG.info("Stop DataNode");
UTIL.getDFSCluster().stopDataNode(0);
assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
store.insert(new TestProcedure(1, -1), null);
for (long i = 2; store.isRunning(); ++i) {
assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
store.insert(new TestProcedure(i, -1), null);
Thread.sleep(100);
}
assertFalse(store.isRunning());
}
代码示例来源:origin: apache/hbase
assertFalse(store.isRunning());
assertTrue(reCount.toString(), reCount.get() >= store.getNumThreads() &&
reCount.get() < thread.length);
代码示例来源:origin: apache/hbase
@Test
public void testWalRollOnLowReplication() throws Exception {
UTIL.getConfiguration().setInt("dfs.namenode.replication.min", 1);
setupDFS();
int dnCount = 0;
store.insert(new TestProcedure(1, -1), null);
UTIL.getDFSCluster().restartDataNode(dnCount);
for (long i = 2; i < 100; ++i) {
store.insert(new TestProcedure(i, -1), null);
waitForNumReplicas(3);
Thread.sleep(100);
if ((i % 30) == 0) {
LOG.info("Restart Data Node");
UTIL.getDFSCluster().restartDataNode(++dnCount % 3);
}
}
assertTrue(store.isRunning());
}
代码示例来源:origin: org.apache.hbase/hbase-procedure
private boolean rollWriterWithRetries() {
for (int i = 0; i < rollRetries && isRunning(); ++i) {
if (i > 0) Threads.sleepWithoutInterrupt(waitBeforeRoll * i);
try {
if (rollWriter()) {
return true;
}
} catch (IOException e) {
LOG.warn("Unable to roll the log, attempt=" + (i + 1), e);
}
}
LOG.error(HBaseMarkers.FATAL, "Unable to roll the log");
return false;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-procedure
private boolean rollWriterWithRetries() {
for (int i = 0; i < rollRetries && isRunning(); ++i) {
if (i > 0) Threads.sleepWithoutInterrupt(waitBeforeRoll * i);
try {
if (rollWriter()) {
return true;
}
} catch (IOException e) {
LOG.warn("Unable to roll the log, attempt=" + (i + 1), e);
}
}
LOG.error(HBaseMarkers.FATAL, "Unable to roll the log");
return false;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-procedure
/**
* @return Max-LogID of the specified log file set
*/
private long initOldLogs(final FileStatus[] logFiles) throws IOException {
this.logs.clear();
long maxLogId = 0;
if (logFiles != null && logFiles.length > 0) {
for (int i = 0; i < logFiles.length; ++i) {
final Path logPath = logFiles[i].getPath();
leaseRecovery.recoverFileLease(fs, logPath);
if (!isRunning()) {
throw new IOException("wal aborting");
}
maxLogId = Math.max(maxLogId, getLogIdFromName(logPath.getName()));
ProcedureWALFile log = initOldLog(logFiles[i], this.walArchiveDir);
if (log != null) {
this.logs.add(log);
}
}
Collections.sort(this.logs);
initTrackerFromOldLogs();
}
return maxLogId;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-procedure
private boolean rollWriter() throws IOException {
if (!isRunning()) return false;
// Create new state-log
if (!rollWriter(flushLogId + 1)) {
LOG.warn("someone else has already created log " + flushLogId);
return false;
}
// We have the lease on the log,
// but we should check if someone else has created new files
if (getMaxLogId(getLogFiles()) > flushLogId) {
LOG.warn("Someone else created new logs. Expected maxLogId < " + flushLogId);
logs.getLast().removeFile(this.walArchiveDir);
return false;
}
// We have the lease on the log
return true;
}
代码示例来源:origin: org.apache.hbase/hbase-procedure
private boolean rollWriter() throws IOException {
if (!isRunning()) {
return false;
}
// Create new state-log
if (!rollWriter(flushLogId + 1)) {
LOG.warn("someone else has already created log {}", flushLogId);
return false;
}
// We have the lease on the log,
// but we should check if someone else has created new files
if (getMaxLogId(getLogFiles()) > flushLogId) {
LOG.warn("Someone else created new logs. Expected maxLogId < {}", flushLogId);
logs.getLast().removeFile(this.walArchiveDir);
return false;
}
// We have the lease on the log
return true;
}
代码示例来源:origin: org.apache.hbase/hbase-procedure
/**
* If last log's tracker is not null, use it as {@link #storeTracker}. Otherwise, set storeTracker
* as partial, and let {@link ProcedureWALFormatReader} rebuild it using entries in the log.
*/
private void initTrackerFromOldLogs() {
if (logs.isEmpty() || !isRunning()) {
return;
}
ProcedureWALFile log = logs.getLast();
if (!log.getTracker().isPartial()) {
storeTracker.resetTo(log.getTracker());
} else {
storeTracker.reset();
storeTracker.setPartialFlag(true);
}
}
代码示例来源:origin: com.aliyun.hbase/alihbase-procedure
/**
* If last log's tracker is not null, use it as {@link #storeTracker}.
* Otherwise, set storeTracker as partial, and let {@link ProcedureWALFormatReader} rebuild
* it using entries in the log.
*/
private void initTrackerFromOldLogs() {
if (logs.isEmpty() || !isRunning()) return;
ProcedureWALFile log = logs.getLast();
if (!log.getTracker().isPartial()) {
storeTracker.resetTo(log.getTracker());
} else {
storeTracker.reset();
storeTracker.setPartialFlag(true);
}
}
代码示例来源:origin: org.apache.hbase/hbase-server
@Test(expected=RuntimeException.class)
public void testWalAbortOnLowReplication() throws Exception {
setupDFS();
assertEquals(3, UTIL.getDFSCluster().getDataNodes().size());
LOG.info("Stop DataNode");
UTIL.getDFSCluster().stopDataNode(0);
assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
store.insert(new TestProcedure(1, -1), null);
for (long i = 2; store.isRunning(); ++i) {
assertEquals(2, UTIL.getDFSCluster().getDataNodes().size());
store.insert(new TestProcedure(i, -1), null);
Thread.sleep(100);
}
assertFalse(store.isRunning());
}
代码示例来源:origin: org.apache.hbase/hbase-server
@Test
public void testWalRollOnLowReplication() throws Exception {
UTIL.getConfiguration().setInt("dfs.namenode.replication.min", 1);
setupDFS();
int dnCount = 0;
store.insert(new TestProcedure(1, -1), null);
UTIL.getDFSCluster().restartDataNode(dnCount);
for (long i = 2; i < 100; ++i) {
store.insert(new TestProcedure(i, -1), null);
waitForNumReplicas(3);
Thread.sleep(100);
if ((i % 30) == 0) {
LOG.info("Restart Data Node");
UTIL.getDFSCluster().restartDataNode(++dnCount % 3);
}
}
assertTrue(store.isRunning());
}
我正在尝试为游戏制作背景音乐。由于某种原因,歌曲第一次播放后就不会再播放了。我做错了什么以及如何解决它?我知道我可以使用 .loop() 但我希望它永远重复,并且 .loop() 最终会停止。 pu
我正在创建一个正在创建门(AND、OR 等)的程序,但是当我想创建一个 SR 锁存器时,我需要使用一个计时器。 因此,当调用此方法 (inputChanged) 时,它应该检查计时器是否正在运行。如果
这是我第一次来这个论坛。我的 java 计时器有问题。我的程序在不同时间显示图像。这是我的代码 //TIMER //creo timer per il tempo di visualizzaz
OSStatus err = AudioQueueNewOutput(&audioDescription, AudioPlayerAQOutputCallback, ( void* )self, ni
我遇到了一个奇怪的行为。如果我使用 start() 启动 AnimationDrawable,那么在动画完成后,方法 isRunning() 仍将返回 true。它是“一次性”动画,不循环播放。 这是
我使用以下代码启动嵌入式 Jetty: Server server = new Server(8080); MBeanContainer mbContainer = new MBeanContaine
我正在使用 AVCaptureSession 捕捉视频,在 iOS 6.1 上一切正常。但是,我一直在尝试从另一个线程检查我的捕获 session 是否正在通过 isRunning 方法运行。但是,无
本文整理了Java中org.apache.zookeeper.server.ZooKeeperServer.isRunning()方法的一些代码示例,展示了ZooKeeperServer.isRunn
本文整理了Java中org.apache.twill.zookeeper.ZKClientService.isRunning()方法的一些代码示例,展示了ZKClientService.isRunni
在Java中,我需要检查音频剪辑是否正在运行,但是当我尝试类似的操作时: if(clip1.isRunning()){ } Eclipse给了我以下错误: “类型AudioClip的isRunning
DataLine 中的 isRunning() 和 isActibe() 有什么区别?当线路实际处理数据时,这两个标志似乎都已设置。 更新 那里有两对方法: 1) 打开/关闭 2) 启动/停止 还有三
我正在我的 PI 上测试一个程序。在主机 pc 上运行它时没有显示错误,相反,在 pi (CM3) 上运行它会卡住。 我正在尝试使用多线程。 从主线程开始,在构造函数中启动了一个 QThread,然后
本文整理了Java中org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore.isRunning()方法的一些代码示例,展示了WAL
我有一个简单的 SKAudioNode: 让 backgroundSound = SKAudioNode(fileNamed: "backgroundSound.mp3") 我用播放 backgrou
下面是我的 qthread 实现的代码。我正在尝试从卫星获取 gps 数据。即使程序退出 gpsSearch() 槽函数,QThread 也不会产生 finished() 信号。每当单击按钮时,都会调
我是一名优秀的程序员,十分优秀!