Tabnine Logo
MLDataFormats$ManagedCursorInfo.getMarkDeleteEntryId
Code IndexAdd Tabnine to your IDE (free)

How to use
getMarkDeleteEntryId
method
in
org.apache.bookkeeper.mledger.proto.MLDataFormats$ManagedCursorInfo

Best Java code snippets using org.apache.bookkeeper.mledger.proto.MLDataFormats$ManagedCursorInfo.getMarkDeleteEntryId (Showing top 16 results out of 315)

origin: apache/pulsar

hash = (37 * hash) + MARKDELETEENTRYID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
  getMarkDeleteEntryId());
origin: apache/pulsar

setMarkDeleteEntryId(other.getMarkDeleteEntryId());
origin: apache/pulsar

  Stat stat, final MetaStoreCallback<Void> callback) {
log.info("[{}] [{}] Updating cursor info ledgerId={} mark-delete={}:{}", ledgerName, cursorName,
    info.getCursorsLedgerId(), info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
origin: org.apache.pulsar/managed-ledger-original

setMarkDeleteEntryId(other.getMarkDeleteEntryId());
origin: org.apache.pulsar/managed-ledger-original

  Stat stat, final MetaStoreCallback<Void> callback) {
log.info("[{}] [{}] Updating cursor info ledgerId={} mark-delete={}:{}", ledgerName, cursorName,
    info.getCursorsLedgerId(), info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
origin: org.apache.pulsar/managed-ledger-original

hash = (37 * hash) + MARKDELETEENTRYID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
  getMarkDeleteEntryId());
origin: com.yahoo.pulsar/managed-ledger

setMarkDeleteEntryId(other.getMarkDeleteEntryId());
origin: org.apache.pulsar/managed-ledger-original

result = result && (getMarkDeleteEntryId()
  == other.getMarkDeleteEntryId());
origin: com.yahoo.pulsar/managed-ledger

  Stat stat, final MetaStoreCallback<Void> callback) {
log.info("[{}] [{}] Updating cursor info ledgerId={} mark-delete={}:{}", ledgerName, cursorName,
    info.getCursorsLedgerId(), info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
origin: org.apache.pulsar/managed-ledger-original

@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);
  }
}
origin: com.yahoo.pulsar/managed-ledger

@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);
  }
}
origin: com.yahoo.pulsar/managed-ledger

/**
 * If we fail to recover the cursor ledger, we want to still open the ML and rollback
 *
 * @param info
 */
private PositionImpl getRollbackPosition(ManagedCursorInfo info) {
  PositionImpl firstPosition = ledger.getFirstPosition();
  PositionImpl snapshottedPosition = new PositionImpl(info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
  if (firstPosition == null) {
    // There are no ledgers in the ML, any position is good
    return snapshottedPosition;
  } else if (snapshottedPosition.compareTo(firstPosition) < 0) {
    // The snapshotted position might be pointing to a ledger that was already deleted
    return firstPosition;
  } else {
    return snapshottedPosition;
  }
}
origin: org.apache.pulsar/managed-ledger-original

/**
 * If we fail to recover the cursor ledger, we want to still open the ML and rollback.
 *
 * @param info
 */
private PositionImpl getRollbackPosition(ManagedCursorInfo info) {
  PositionImpl firstPosition = ledger.getFirstPosition();
  PositionImpl snapshottedPosition = new PositionImpl(info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
  if (firstPosition == null) {
    // There are no ledgers in the ML, any position is good
    return snapshottedPosition;
  } else if (snapshottedPosition.compareTo(firstPosition) < 0) {
    // The snapshotted position might be pointing to a ledger that was already deleted
    return firstPosition;
  } else {
    return snapshottedPosition;
  }
}
origin: apache/pulsar

result = result && (getMarkDeleteEntryId()
  == other.getMarkDeleteEntryId());
origin: apache/pulsar

@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);
  }
}
origin: apache/pulsar

/**
 * If we fail to recover the cursor ledger, we want to still open the ML and rollback.
 *
 * @param info
 */
private PositionImpl getRollbackPosition(ManagedCursorInfo info) {
  PositionImpl firstPosition = ledger.getFirstPosition();
  PositionImpl snapshottedPosition = new PositionImpl(info.getMarkDeleteLedgerId(), info.getMarkDeleteEntryId());
  if (firstPosition == null) {
    // There are no ledgers in the ML, any position is good
    return snapshottedPosition;
  } else if (snapshottedPosition.compareTo(firstPosition) < 0) {
    // The snapshotted position might be pointing to a ledger that was already deleted
    return firstPosition;
  } else {
    return snapshottedPosition;
  }
}
org.apache.bookkeeper.mledger.protoMLDataFormats$ManagedCursorInfogetMarkDeleteEntryId

Javadoc

optional int64 markDeleteEntryId = 3;

Popular methods of MLDataFormats$ManagedCursorInfo

  • getCursorsLedgerId
    If the ledger id is -1, then the mark-delete position is the one from the (ledgerId, entryId) sna
  • getIndividualDeletedMessagesCount
    repeated .MessageRange individualDeletedMessages = 4;
  • newBuilder
  • <init>
  • getDefaultInstance
  • getDescriptor
  • getIndividualDeletedMessages
    repeated .MessageRange individualDeletedMessages = 4;
  • getIndividualDeletedMessagesList
    repeated .MessageRange individualDeletedMessages = 4;
  • getMarkDeleteLedgerId
    Last snapshot of the mark-delete position optional int64 markDeleteLedgerId = 2;
  • hasCursorsLedgerId
    If the ledger id is -1, then the mark-delete position is the one from the (ledgerId, entryId) sna
  • hasMarkDeleteEntryId
    optional int64 markDeleteEntryId = 3;
  • hasMarkDeleteLedgerId
    Last snapshot of the mark-delete position optional int64 markDeleteLedgerId = 2;
  • hasMarkDeleteEntryId,
  • hasMarkDeleteLedgerId,
  • isInitialized,
  • toByteArray,
  • getLastActive,
  • getProperties,
  • getPropertiesCount,
  • getPropertiesList,
  • getSerializedSize

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JTable (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Table (org.hibernate.mapping)
    A relational table
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now