Tabnine Logo
ConsumeQueueExt$CqExtUnit
Code IndexAdd Tabnine to your IDE (free)

How to use
ConsumeQueueExt$CqExtUnit
in
org.apache.rocketmq.store

Best Java code snippets using org.apache.rocketmq.store.ConsumeQueueExt$CqExtUnit (Showing top 20 results out of 315)

origin: apache/rocketmq

final int maxFilterMessageCount = Math.max(16000, maxMsgNums * ConsumeQueue.CQ_STORE_UNIT_SIZE);
final boolean diskFallRecorded = this.messageStoreConfig.isDiskFallRecorded();
ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
for (; i < bufferConsumeQueue.getSize() && i < maxFilterMessageCount; i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {
  long offsetPy = bufferConsumeQueue.getByteBuffer().getLong();
    extRet = consumeQueue.getExt(tagsCode, cqExtUnit);
    if (extRet) {
      tagsCode = cqExtUnit.getTagsCode();
    } else {
origin: apache/rocketmq

if (cqExtUnit != null) {
  one.setExtendDataJson(JSON.toJSONString(cqExtUnit));
  if (cqExtUnit.getFilterBitMap() != null) {
    one.setBitMap(BitsArray.create(cqExtUnit.getFilterBitMap()).toString());
    one.setEval(messageFilter.isMatchedByConsumeQueue(cqExtUnit.getTagsCode(), cqExtUnit));
origin: apache/rocketmq

if (cqExtUnit == null || !consumerFilterData.isMsgInLive(cqExtUnit.getMsgStoreTime())) {
  log.debug("Pull matched because not in live: {}, {}", consumerFilterData, cqExtUnit);
  return true;
byte[] filterBitMap = cqExtUnit.getFilterBitMap();
BloomFilter bloomFilter = this.consumerFilterManager.getBloomFilter();
if (filterBitMap == null || !this.bloomDataValid
origin: org.apache.rocketmq/rocketmq-store

final int maxFilterMessageCount = Math.max(16000, maxMsgNums * ConsumeQueue.CQ_STORE_UNIT_SIZE);
final boolean diskFallRecorded = this.messageStoreConfig.isDiskFallRecorded();
ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
for (; i < bufferConsumeQueue.getSize() && i < maxFilterMessageCount; i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {
  long offsetPy = bufferConsumeQueue.getByteBuffer().getLong();
    extRet = consumeQueue.getExt(tagsCode, cqExtUnit);
    if (extRet) {
      tagsCode = cqExtUnit.getTagsCode();
    } else {
origin: org.apache.rocketmq/rocketmq-store

long nextOffset = offset;
int i = 0;
ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
for (; i < bufferCQ.getSize(); i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {
  long offsetPy = bufferCQ.getByteBuffer().getLong();
      tagsCode = cqExtUnit.getTagsCode();
    } else {
origin: org.apache.rocketmq/rocketmq-broker

if (cqExtUnit != null) {
  one.setExtendDataJson(JSON.toJSONString(cqExtUnit));
  if (cqExtUnit.getFilterBitMap() != null) {
    one.setBitMap(BitsArray.create(cqExtUnit.getFilterBitMap()).toString());
    one.setEval(messageFilter.isMatchedByConsumeQueue(cqExtUnit.getTagsCode(), cqExtUnit));
origin: org.apache.rocketmq/rocketmq-broker

if (cqExtUnit == null || !consumerFilterData.isMsgInLive(cqExtUnit.getMsgStoreTime())) {
  log.debug("Pull matched because not in live: {}, {}", consumerFilterData, cqExtUnit);
  return true;
byte[] filterBitMap = cqExtUnit.getFilterBitMap();
BloomFilter bloomFilter = this.consumerFilterManager.getBloomFilter();
if (filterBitMap == null || !this.bloomDataValid
origin: org.apache.rocketmq/rocketmq-broker

new ConsumeQueueExt.CqExtUnit(tagsCode, msgStoreTime, filterBitMap));
origin: org.apache.rocketmq/rocketmq-store

long processOffset = mappedFile.getFileFromOffset();
long mappedFileOffset = 0;
CqExtUnit extUnit = new CqExtUnit();
while (true) {
  extUnit.readBySkip(byteBuffer);
  if (extUnit.getSize() > 0) {
    mappedFileOffset += extUnit.getSize();
    continue;
origin: org.apache.rocketmq/rocketmq-store

long tagsCode = request.getTagsCode();
if (isExtWriteEnable()) {
  ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
  cqExtUnit.setFilterBitMap(request.getBitMap());
  cqExtUnit.setMsgStoreTime(request.getStoreTimestamp());
  cqExtUnit.setTagsCode(request.getTagsCode());
origin: org.apache.rocketmq/rocketmq-store

/**
 * Delete files after {@code maxAddress}, and reset wrote/commit/flush position to last file.
 *
 * @param maxAddress less than 0
 */
public void truncateByMaxAddress(final long maxAddress) {
  if (!isExtAddr(maxAddress)) {
    return;
  }
  log.info("Truncate consume queue ext by max {}.", maxAddress);
  CqExtUnit cqExtUnit = get(maxAddress);
  if (cqExtUnit == null) {
    log.error("[BUG] address {} of consume queue extend not found!", maxAddress);
    return;
  }
  final long realOffset = unDecorate(maxAddress);
  this.mappedFileQueue.truncateDirtyFiles(realOffset + cqExtUnit.getSize());
}
origin: org.apache.rocketmq/rocketmq-store

/**
 * Get data from buffer.
 *
 * @param address less than 0
 */
public CqExtUnit get(final long address) {
  CqExtUnit cqExtUnit = new CqExtUnit();
  if (get(address, cqExtUnit)) {
    return cqExtUnit;
  }
  return null;
}
origin: didi/DDMQ

final int maxFilterMessageCount = Math.max(16000, maxMsgNums * ConsumeQueue.CQ_STORE_UNIT_SIZE);
final boolean diskFallRecorded = this.messageStoreConfig.isDiskFallRecorded();
ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
for (; i < bufferConsumeQueue.getSize() && i < maxFilterMessageCount; i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {
  long offsetPy = bufferConsumeQueue.getByteBuffer().getLong();
    extRet = consumeQueue.getExt(tagsCode, cqExtUnit);
    if (extRet) {
      tagsCode = cqExtUnit.getTagsCode();
    } else {
origin: didi/DDMQ

long nextOffset = offset;
int i = 0;
ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
for (; i < bufferCQ.getSize(); i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {
  long offsetPy = bufferCQ.getByteBuffer().getLong();
      tagsCode = cqExtUnit.getTagsCode();
    } else {
origin: didi/DDMQ

if (cqExtUnit != null) {
  one.setExtendDataJson(JSON.toJSONString(cqExtUnit));
  if (cqExtUnit.getFilterBitMap() != null) {
    one.setBitMap(BitsArray.create(cqExtUnit.getFilterBitMap()).toString());
    one.setEval(messageFilter.isMatchedByConsumeQueue(cqExtUnit.getTagsCode(), cqExtUnit));
origin: didi/DDMQ

if (cqExtUnit == null || !consumerFilterData.isMsgInLive(cqExtUnit.getMsgStoreTime())) {
  log.debug("Pull matched because not in live: {}, {}", consumerFilterData, cqExtUnit);
  return true;
byte[] filterBitMap = cqExtUnit.getFilterBitMap();
BloomFilter bloomFilter = this.consumerFilterManager.getBloomFilter();
if (filterBitMap == null || !this.bloomDataValid
origin: didi/DDMQ

new ConsumeQueueExt.CqExtUnit(tagsCode, msgStoreTime, filterBitMap));
origin: didi/DDMQ

long processOffset = mappedFile.getFileFromOffset();
long mappedFileOffset = 0;
CqExtUnit extUnit = new CqExtUnit();
while (true) {
  extUnit.readBySkip(byteBuffer);
  if (extUnit.getSize() > 0) {
    mappedFileOffset += extUnit.getSize();
    continue;
origin: didi/DDMQ

long tagsCode = request.getTagsCode();
if (isExtWriteEnable()) {
  ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
  cqExtUnit.setFilterBitMap(request.getBitMap());
  cqExtUnit.setMsgStoreTime(request.getStoreTimestamp());
  cqExtUnit.setTagsCode(request.getTagsCode());
origin: didi/DDMQ

/**
 * Delete files after {@code maxAddress}, and reset wrote/commit/flush position to last file.
 *
 * @param maxAddress less than 0
 */
public void truncateByMaxAddress(final long maxAddress) {
  if (!isExtAddr(maxAddress)) {
    return;
  }
  log.info("Truncate consume queue ext by max {}.", maxAddress);
  CqExtUnit cqExtUnit = get(maxAddress);
  if (cqExtUnit == null) {
    log.error("[BUG] address {} of consume queue extend not found!", maxAddress);
    return;
  }
  final long realOffset = unDecorate(maxAddress);
  this.mappedFileQueue.truncateDirtyFiles(realOffset + cqExtUnit.getSize());
}
org.apache.rocketmq.storeConsumeQueueExt$CqExtUnit

Javadoc

Store unit.

Most used methods

  • <init>
  • getTagsCode
  • getFilterBitMap
  • getMsgStoreTime
  • getSize
  • setFilterBitMap
  • setMsgStoreTime
  • setTagsCode

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • 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