本文整理了Java中org.apache.zookeeper.server.ZKDatabase.getCommittedLog()
方法的一些代码示例,展示了ZKDatabase.getCommittedLog()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKDatabase.getCommittedLog()
方法的具体详情如下:
包路径:org.apache.zookeeper.server.ZKDatabase
类名称:ZKDatabase
方法名:getCommittedLog
暂无
代码示例来源:origin: apache/zookeeper
Long.toHexString(peerLastZxid));
if (db.getCommittedLog().isEmpty()) {
Iterator<Proposal> itr = db.getCommittedLog().iterator();
currentZxid = queueCommittedProposals(itr, peerLastZxid,
null, maxCommittedLog);
Iterator<Proposal> committedLogItr = db.getCommittedLog().iterator();
currentZxid = queueCommittedProposals(committedLogItr, currentZxid,
null, maxCommittedLog);
代码示例来源:origin: apache/zookeeper
/**
* Walk through the target peer commmittedLog.
* @param sessionId
* @param peerId
*/
private void validateRequestLog(long sessionId, int peerId) {
String session = Long.toHexString(sessionId);
LOG.info("Searching for txn of session 0x " + session +
" on peer " + peerId);
String peerType = peerId == qb.getLeaderIndex() ? "leader" : "follower";
QuorumPeer peer = qb.getPeerList().get(peerId);
ZKDatabase db = peer.getActiveServer().getZKDatabase();
for (Proposal p : db.getCommittedLog()) {
Assert.assertFalse("Should not see " +
TraceFormatter.op2String(p.request.type) +
" request from local session 0x" + session +
" on the " + peerType,
p.request.sessionId == sessionId);
}
}
代码示例来源:origin: org.apache.zookeeper/zookeeper
+" peerLastZxid=0x"+Long.toHexString(peerLastZxid));
LinkedList<Proposal> proposals = leader.zk.getZKDatabase().getCommittedLog();
代码示例来源:origin: apache/zookeeper
List<Proposal> committedLog = zks.getZKDatabase().getCommittedLog();
int logsize = committedLog.size();
LOG.info("committedLog size = {}", logsize);
代码示例来源:origin: org.apache.hadoop/zookeeper
LinkedList<Proposal> proposals = leader.zk.getZKDatabase().getCommittedLog();
synchronized(proposals) {
if (proposals.size() != 0) {
内容来源于网络,如有侵权,请联系作者删除!