Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add partition status model definition #26

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.github.protocol.pulsar.admin.jdk;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class CompactionStats {
public long lastCompactionRemovedEventCount;

public long lastCompactionSucceedTimestamp;

public long lastCompactionFailedTimestamp;

public long lastCompactionDurationTimeInMills;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package io.github.protocol.pulsar.admin.jdk;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Map;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ConsumerStats {
public double msgRateOut;

public double msgThroughputOut;

public long bytesOutCounter;

public long msgOutCounter;

public double msgRateRedeLiver;

public double messageAckRate;

public int chunkedMessageRate;

public String consumerName;

public int availablePermits;

public long unackedMessages;

public int avgMessagesPerEntry;

public boolean blockedConsumerOnUnackedMsgs;

public String readPositionWhenJoining;

@JsonIgnore
private int addressOffset = -1;

@JsonIgnore
private int addressLength;

@JsonIgnore
private int connectedSinceOffset = -1;

@JsonIgnore
private int connectedSinceLength;

@JsonIgnore
private int clientVersionOffset = -1;

@JsonIgnore
private int clientVersionLength;

public long lastAckedTimestamp;

public long lastConsumedTimestamp;

public long lastConsumedFlowTimestamp;

public List<String> keyHashRanges;

public Map<String, String> metadata;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.github.protocol.pulsar.admin.jdk;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.util.Map;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class PartitionedTopicStats extends TopicStats{

public PartitionedTopicMetadata metadata;

public Map<String, TopicStats> partitions;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.github.protocol.pulsar.admin.jdk;

public enum ProducerAccessMode {
Shared,
Exclusive,
ExclusiveWithFencing,
WaitForExclusive;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package io.github.protocol.pulsar.admin.jdk;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.util.Map;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class PublisherStats {
@JsonIgnore
private int count;

public ProducerAccessMode accessMode;

public double msgRateIn;

public double msgThroughputIn;

public double averageMsgSize;

public double chunkedMessageRate;

public long producerId;

public boolean supportsPartialProducer;

@JsonIgnore
private int producerNameOffset = -1;

@JsonIgnore
private int producerNameLength;

@JsonIgnore
private int addressOffset = -1;

@JsonIgnore
private int addressLength;

@JsonIgnore
private int connectedSinceOffset = -1;

@JsonIgnore
private int connectedSinceLength;

@JsonIgnore
private int clientVersionOffset = -1;

@JsonIgnore
private int clientVersionLength;

@JsonIgnore
private StringBuilder stringBuilder = new StringBuilder();

public Map<String, String> metadata;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package io.github.protocol.pulsar.admin.jdk;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ReplicatorStats {
public double msgRateIn;

public double msgThroughputIn;

public double msgRateOut;

public double msgThroughputOut;

public double msgRateExpired;

public long replicationBacklog;

public boolean connected;

public long replicationDelayInSeconds;

public String inboundConnection;

public String inboundConnectedSince;

public String outboundConnection;

public String outboundConnectedSince;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package io.github.protocol.pulsar.admin.jdk;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class SubscriptionStats {
public double msgRateOut;

public double msgThroughputOut;

public long bytesOutCounter;

public long msgOutCounter;

public double msgRateRedeLiver;

public double messageAckRate;

public int chunkedMessageRate;

public int msgBacklog;

public long backlogSize;

public long earliestMsgPublishTimeInBacklog;

public long msgBacklogNoDelayed;

public boolean blockedSubscriptionOnUnackedMsgs;

public boolean msgDelayed;

public long unackedMessages;

public String type;

public String activeConsumerName;

public double msgRateExpired;

public long totalMsgExpired;

public long lastExpireTimestamp;

public long lastConsumedFlowTimestamp;

public long lastConsumedTimestamp;

public long lastAckedTimestamp;

public long lastMarkDeleteAdvancedTimestamp;

public List<ConsumerStats> consumers = new ArrayList();

public boolean isDurable;

public boolean isReplicated;

public boolean allowOutOfOrderDelivery;

public String keySharedMode;

public Map<String, String> consumesAfterMarkDeletePosition = new LinkedHashMap();

public int nonContiguousDeletedMessagesRanges;

public int nonContiguousDeletedMessagesRangesSerializedSize;

public long delayedTrackerMemoryUsage;

public Map<String, String> subsriptionProperties = new HashMap<>();

public long filterProcessedMsgCount;

public long filterAcceptedMsgCount;

public long filterRejectedMsgCount;

public long filterRescheduledMsgCount;
}
Loading
Loading