@Override public void operationComplete(ManagedCursorInfo result, Stat stat) { cursorLedgerId.set(result.getCursorsLedgerId()); cursorLedgerLatch.countDown(); }
hash = (37 * hash) + CURSORSLEDGERID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCursorsLedgerId());
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedCursorInfo other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedCursorInfo.getDefaultInstance()) return this; if (other.hasCursorsLedgerId()) { setCursorsLedgerId(other.getCursorsLedgerId());
long ledgerId = info.getCursorsLedgerId(); bookkeeper.asyncOpenLedger(ledgerId, digestType, config.getPassword(), (rc, lh, ctx) -> { if (log.isDebugEnabled()) {
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedCursorInfo other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedCursorInfo.getDefaultInstance()) return this; if (other.hasCursorsLedgerId()) { setCursorsLedgerId(other.getCursorsLedgerId());
long ledgerId = info.getCursorsLedgerId(); bookkeeper.asyncOpenLedger(ledgerId, config.getDigestType(), config.getPassword(), (rc, lh, ctx) -> { if (log.isDebugEnabled()) {
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedCursorInfo other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedCursorInfo.getDefaultInstance()) return this; if (other.hasCursorsLedgerId()) { setCursorsLedgerId(other.getCursorsLedgerId());
hash = (37 * hash) + CURSORSLEDGERID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCursorsLedgerId());
result = result && (hasCursorsLedgerId() == other.hasCursorsLedgerId()); if (hasCursorsLedgerId()) { result = result && (getCursorsLedgerId() == other.getCursorsLedgerId());
Stat stat, final MetaStoreCallback<Void> callback) { log.info("[{}] [{}] Updating cursor info ledgerId={} mark-delete={}:{}", ledgerName, cursorName, info.getCursorsLedgerId(), info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
Stat stat, final MetaStoreCallback<Void> callback) { log.info("[{}] [{}] Updating cursor info ledgerId={} mark-delete={}:{}", ledgerName, cursorName, info.getCursorsLedgerId(), info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
@Override public void operationComplete(ManagedCursorInfo info, Stat stat) { cursorLedgerStat = stat; lastActive = info.getLastActive() != 0 ? info.getLastActive() : lastActive; if (info.getCursorsLedgerId() == -1L) { // There is no cursor ledger to read the last position from. It means the cursor has been properly // closed and the last mark-delete position is stored in the ManagedCursorInfo itself.s PositionImpl recoveredPosition = new PositionImpl(info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId()); if (info.getIndividualDeletedMessagesCount() > 0) { recoverIndividualDeletedMessages(info.getIndividualDeletedMessagesList()); } Map<String, Long> recoveredProperties = Collections.emptyMap(); if (info.getPropertiesCount() > 0) { // Recover properties map recoveredProperties = Maps.newHashMap(); for (int i = 0; i < info.getPropertiesCount(); i++) { LongProperty property = info.getProperties(i); recoveredProperties.put(property.getName(), property.getValue()); } } recoveredCursor(recoveredPosition, recoveredProperties, null); callback.operationComplete(); } else { // Need to proceed and read the last entry in the specified ledger to find out the last position log.info("[{}] Consumer {} meta-data recover from ledger {}", ledger.getName(), name, info.getCursorsLedgerId()); recoverFromLedger(info, callback); } }
@Override public void operationComplete(ManagedCursorInfo info, Stat stat) { cursorLedgerStat = stat; if (info.getCursorsLedgerId() == -1L) { // There is no cursor ledger to read the last position from. It means the cursor has been properly // closed and the last mark-delete position is stored in the ManagedCursorInfo itself.s PositionImpl recoveredPosition = new PositionImpl(info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId()); if (info.getIndividualDeletedMessagesCount() > 0) { recoverIndividualDeletedMessages(info.getIndividualDeletedMessagesList()); } recoveredCursor(recoveredPosition); callback.operationComplete(); } else { // Need to proceed and read the last entry in the specified ledger to find out the last position log.info("[{}] Consumer {} meta-data recover from ledger {}", ledger.getName(), name, info.getCursorsLedgerId()); recoverFromLedger(info, callback); } }
long ledgerId = info.getCursorsLedgerId(); bookkeeper.asyncOpenLedger(ledgerId, digestType, config.getPassword(), (rc, lh, ctx) -> { if (log.isDebugEnabled()) {
Stat stat, final MetaStoreCallback<Void> callback) { log.info("[{}] [{}] Updating cursor info ledgerId={} mark-delete={}:{}", ledgerName, cursorName, info.getCursorsLedgerId(), info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
result = result && (hasCursorsLedgerId() == other.hasCursorsLedgerId()); if (hasCursorsLedgerId()) { result = result && (getCursorsLedgerId() == other.getCursorsLedgerId());
@Override public void operationComplete(ManagedCursorInfo info, Stat stat) { cursorLedgerStat = stat; lastActive = info.getLastActive() != 0 ? info.getLastActive() : lastActive; if (info.getCursorsLedgerId() == -1L) { // There is no cursor ledger to read the last position from. It means the cursor has been properly // closed and the last mark-delete position is stored in the ManagedCursorInfo itself.s PositionImpl recoveredPosition = new PositionImpl(info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId()); if (info.getIndividualDeletedMessagesCount() > 0) { recoverIndividualDeletedMessages(info.getIndividualDeletedMessagesList()); } Map<String, Long> recoveredProperties = Collections.emptyMap(); if (info.getPropertiesCount() > 0) { // Recover properties map recoveredProperties = Maps.newHashMap(); for (int i = 0; i < info.getPropertiesCount(); i++) { LongProperty property = info.getProperties(i); recoveredProperties.put(property.getName(), property.getValue()); } } recoveredCursor(recoveredPosition, recoveredProperties, null); callback.operationComplete(); } else { // Need to proceed and read the last entry in the specified ledger to find out the last position log.info("[{}] Consumer {} meta-data recover from ledger {}", ledger.getName(), name, info.getCursorsLedgerId()); recoverFromLedger(info, callback); } }