Class TopicStatsImpl
java.lang.Object
org.apache.pulsar.common.policies.data.stats.TopicStatsImpl
- All Implemented Interfaces:
org.apache.pulsar.common.policies.data.TopicStats
- Direct Known Subclasses:
NonPersistentTopicStatsImpl,PartitionedTopicStatsImpl
public class TopicStatsImpl
extends Object
implements org.apache.pulsar.common.policies.data.TopicStats
Statistics for a Pulsar topic.
This class is not thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionlongdoubleAverage size of published messages (bytes).longGet estimated total unconsumed or backlog size in bytes.longTotal bytes published to the topic (bytes).longTotal bytes delivered to consumer (bytes).longThe compaction stats.intThe size of InMemoryDelayedDeliveryTracer memory usage.longGet the publish time of the earliest message over all the backlogs.longrecord last failed offloaded timestamp.longrecord last successful offloaded ledgerId.longrecord last successful offloaded timestamp.booleanTopic has chunked message published on it.longTotal messages published to the topic (msg).longTotal messages delivered to consumer (msg).doubleTotal rate of messages published on the topic (msg/s).doubleTotal rate of messages dispatched for the topic (msg/s).doubleTotal throughput of messages published on the topic (byte/s).doubleTotal throughput of messages dispatched for the topic (byte/s).intThe number of non-contiguous deleted messages ranges.intThe serialized size of non-contiguous deleted messages ranges.longSpace used to store the offloaded messages for the topic/.longlongThe number of times the publishing rate limit was triggered.Map of replication statistics by remote cluster context.longSpace used to store the messages for the topic (bytes).Map of subscriptions with their individual statistics.The topic epoch or empty if not set.int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(org.apache.pulsar.common.policies.data.TopicStats ts) voidaddPublisher(PublisherStatsImpl stats) List<? extends org.apache.pulsar.common.policies.data.PublisherStats>voidreset()voidsetPublishers(List<? extends org.apache.pulsar.common.policies.data.PublisherStats> statsList) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.common.policies.data.TopicStats
getAverageMsgSize, getBacklogSize, getBytesInCounter, getBytesOutCounter, getCompaction, getDeduplicationStatus, getEarliestMsgPublishTimeInBacklogs, getMsgInCounter, getMsgOutCounter, getMsgRateIn, getMsgRateOut, getMsgThroughputIn, getMsgThroughputOut, getNonContiguousDeletedMessagesRanges, getNonContiguousDeletedMessagesRangesSerializedSize, getOffloadedStorageSize, getStorageSize, getTopicEpoch, getWaitingPublishers, isMsgChunkPublished
-
Field Details
-
msgRateIn
public double msgRateInTotal rate of messages published on the topic (msg/s). -
msgThroughputIn
public double msgThroughputInTotal throughput of messages published on the topic (byte/s). -
msgRateOut
public double msgRateOutTotal rate of messages dispatched for the topic (msg/s). -
msgThroughputOut
public double msgThroughputOutTotal throughput of messages dispatched for the topic (byte/s). -
bytesInCounter
public long bytesInCounterTotal bytes published to the topic (bytes). -
msgInCounter
public long msgInCounterTotal messages published to the topic (msg). -
bytesOutCounter
public long bytesOutCounterTotal bytes delivered to consumer (bytes). -
msgOutCounter
public long msgOutCounterTotal messages delivered to consumer (msg). -
averageMsgSize
public double averageMsgSizeAverage size of published messages (bytes). -
msgChunkPublished
public boolean msgChunkPublishedTopic has chunked message published on it. -
storageSize
public long storageSizeSpace used to store the messages for the topic (bytes). -
backlogSize
public long backlogSizeGet estimated total unconsumed or backlog size in bytes. -
publishRateLimitedTimes
public long publishRateLimitedTimesThe number of times the publishing rate limit was triggered. -
earliestMsgPublishTimeInBacklogs
public long earliestMsgPublishTimeInBacklogsGet the publish time of the earliest message over all the backlogs. -
offloadedStorageSize
public long offloadedStorageSizeSpace used to store the offloaded messages for the topic/. -
lastOffloadLedgerId
public long lastOffloadLedgerIdrecord last successful offloaded ledgerId. If no offload ledger, the value should be 0 -
lastOffloadSuccessTimeStamp
public long lastOffloadSuccessTimeStamprecord last successful offloaded timestamp. If no successful offload, the value should be 0 -
lastOffloadFailureTimeStamp
public long lastOffloadFailureTimeStamprecord last failed offloaded timestamp. If no failed offload, the value should be 0 -
ongoingTxnCount
public long ongoingTxnCount -
abortedTxnCount
public long abortedTxnCount -
committedTxnCount
public long committedTxnCount -
waitingPublishers
public int waitingPublishers -
subscriptions
Map of subscriptions with their individual statistics. -
replication
Map of replication statistics by remote cluster context. -
deduplicationStatus
-
topicEpoch
The topic epoch or empty if not set. -
nonContiguousDeletedMessagesRanges
public int nonContiguousDeletedMessagesRangesThe number of non-contiguous deleted messages ranges. -
nonContiguousDeletedMessagesRangesSerializedSize
public int nonContiguousDeletedMessagesRangesSerializedSizeThe serialized size of non-contiguous deleted messages ranges. -
delayedMessageIndexSizeInBytes
public int delayedMessageIndexSizeInBytesThe size of InMemoryDelayedDeliveryTracer memory usage. -
compaction
The compaction stats.
-
-
Constructor Details
-
TopicStatsImpl
public TopicStatsImpl()
-
-
Method Details
-
getPublishers
- Specified by:
getPublishersin interfaceorg.apache.pulsar.common.policies.data.TopicStats
-
setPublishers
public void setPublishers(List<? extends org.apache.pulsar.common.policies.data.PublisherStats> statsList) -
addPublisher
-
getSubscriptions
public Map<String,? extends org.apache.pulsar.common.policies.data.SubscriptionStats> getSubscriptions()- Specified by:
getSubscriptionsin interfaceorg.apache.pulsar.common.policies.data.TopicStats
-
getReplication
public Map<String,? extends org.apache.pulsar.common.policies.data.ReplicatorStats> getReplication()- Specified by:
getReplicationin interfaceorg.apache.pulsar.common.policies.data.TopicStats
-
reset
public void reset() -
add
-