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 java.lang.Object implements org.apache.pulsar.common.policies.data.TopicStatsStatistics for a Pulsar topic. This class is not thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description doubleaverageMsgSizeAverage size of published messages (bytes).longbacklogSizeGet estimated total unconsumed or backlog size in bytes.longbytesInCounterTotal bytes published to the topic (bytes).longbytesOutCounterTotal bytes delivered to consumer (bytes).CompactionStatsImplcompactionThe compaction stats.java.lang.StringdeduplicationStatuslongearliestMsgPublishTimeInBacklogsGet the publish time of the earliest message over all the backlogs.longlastOffloadFailureTimeStamprecord last failed offloaded timestamp.longlastOffloadLedgerIdrecord last successful offloaded ledgerId.longlastOffloadSuccessTimeStamprecord last successful offloaded timestamp.booleanmsgChunkPublishedTopic has chunked message published on it.longmsgInCounterTotal messages published to the topic (msg).longmsgOutCounterTotal messages delivered to consumer (msg).doublemsgRateInTotal rate of messages published on the topic (msg/s).doublemsgRateOutTotal rate of messages dispatched for the topic (msg/s).doublemsgThroughputInTotal throughput of messages published on the topic (byte/s).doublemsgThroughputOutTotal throughput of messages dispatched for the topic (byte/s).intnonContiguousDeletedMessagesRangesThe number of non-contiguous deleted messages ranges.intnonContiguousDeletedMessagesRangesSerializedSizeThe serialized size of non-contiguous deleted messages ranges.longoffloadedStorageSizeSpace used to store the offloaded messages for the topic/.longpublishRateLimitedTimesThe number of times the publishing rate limit was triggered.java.util.Map<java.lang.String,ReplicatorStatsImpl>replicationMap of replication statistics by remote cluster context.longstorageSizeSpace used to store the messages for the topic (bytes).java.util.Map<java.lang.String,SubscriptionStatsImpl>subscriptionsMap of subscriptions with their individual statistics.java.lang.LongtopicEpochThe topic epoch or empty if not set.intwaitingPublishers
-
Constructor Summary
Constructors Constructor Description TopicStatsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TopicStatsImpladd(org.apache.pulsar.common.policies.data.TopicStats ts)voidaddPublisher(PublisherStatsImpl stats)java.util.List<? extends org.apache.pulsar.common.policies.data.PublisherStats>getPublishers()java.util.Map<java.lang.String,? extends org.apache.pulsar.common.policies.data.ReplicatorStats>getReplication()java.util.Map<java.lang.String,? extends org.apache.pulsar.common.policies.data.SubscriptionStats>getSubscriptions()voidreset()voidsetPublishers(java.util.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, wait
-
Methods 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 Detail
-
msgRateIn
public double msgRateIn
Total rate of messages published on the topic (msg/s).
-
msgThroughputIn
public double msgThroughputIn
Total throughput of messages published on the topic (byte/s).
-
msgRateOut
public double msgRateOut
Total rate of messages dispatched for the topic (msg/s).
-
msgThroughputOut
public double msgThroughputOut
Total throughput of messages dispatched for the topic (byte/s).
-
bytesInCounter
public long bytesInCounter
Total bytes published to the topic (bytes).
-
msgInCounter
public long msgInCounter
Total messages published to the topic (msg).
-
bytesOutCounter
public long bytesOutCounter
Total bytes delivered to consumer (bytes).
-
msgOutCounter
public long msgOutCounter
Total messages delivered to consumer (msg).
-
averageMsgSize
public double averageMsgSize
Average size of published messages (bytes).
-
msgChunkPublished
public boolean msgChunkPublished
Topic has chunked message published on it.
-
storageSize
public long storageSize
Space used to store the messages for the topic (bytes).
-
backlogSize
public long backlogSize
Get estimated total unconsumed or backlog size in bytes.
-
publishRateLimitedTimes
public long publishRateLimitedTimes
The number of times the publishing rate limit was triggered.
-
earliestMsgPublishTimeInBacklogs
public long earliestMsgPublishTimeInBacklogs
Get the publish time of the earliest message over all the backlogs.
-
offloadedStorageSize
public long offloadedStorageSize
Space used to store the offloaded messages for the topic/.
-
lastOffloadLedgerId
public long lastOffloadLedgerId
record last successful offloaded ledgerId. If no offload ledger, the value should be 0
-
lastOffloadSuccessTimeStamp
public long lastOffloadSuccessTimeStamp
record last successful offloaded timestamp. If no successful offload, the value should be 0
-
lastOffloadFailureTimeStamp
public long lastOffloadFailureTimeStamp
record last failed offloaded timestamp. If no failed offload, the value should be 0
-
waitingPublishers
public int waitingPublishers
-
subscriptions
public java.util.Map<java.lang.String,SubscriptionStatsImpl> subscriptions
Map of subscriptions with their individual statistics.
-
replication
public java.util.Map<java.lang.String,ReplicatorStatsImpl> replication
Map of replication statistics by remote cluster context.
-
deduplicationStatus
public java.lang.String deduplicationStatus
-
topicEpoch
public java.lang.Long topicEpoch
The topic epoch or empty if not set.
-
nonContiguousDeletedMessagesRanges
public int nonContiguousDeletedMessagesRanges
The number of non-contiguous deleted messages ranges.
-
nonContiguousDeletedMessagesRangesSerializedSize
public int nonContiguousDeletedMessagesRangesSerializedSize
The serialized size of non-contiguous deleted messages ranges.
-
compaction
public CompactionStatsImpl compaction
The compaction stats.
-
-
Method Detail
-
getPublishers
public java.util.List<? extends org.apache.pulsar.common.policies.data.PublisherStats> getPublishers()
- Specified by:
getPublishersin interfaceorg.apache.pulsar.common.policies.data.TopicStats
-
setPublishers
public void setPublishers(java.util.List<? extends org.apache.pulsar.common.policies.data.PublisherStats> statsList)
-
addPublisher
public void addPublisher(PublisherStatsImpl stats)
-
getSubscriptions
public java.util.Map<java.lang.String,? extends org.apache.pulsar.common.policies.data.SubscriptionStats> getSubscriptions()
- Specified by:
getSubscriptionsin interfaceorg.apache.pulsar.common.policies.data.TopicStats
-
getReplication
public java.util.Map<java.lang.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
public TopicStatsImpl add(org.apache.pulsar.common.policies.data.TopicStats ts)
-
-