public final class RaftServerMetricsImpl extends RatisMetrics implements RaftServerMetrics
RATIS_APPLICATION_NAME_METRICS| 构造器和说明 |
|---|
RaftServerMetricsImpl(RaftGroupMemberId serverId,
Supplier<Function<RaftPeerId,org.apache.ratis.proto.RaftProtos.CommitInfoProto>> commitInfoCache,
Supplier<RetryCache.Statistics> retryCacheStatistics) |
create, getHeartbeatSuffix, getRegistry, newCounterMaps, newHeartbeatCounter, newHeartbeatTimer, newTimerMap, unregisterpublic static final String FOLLOWER_LAST_HEARTBEAT_ELAPSED_TIME_METRIC
public static final String FOLLOWER_APPEND_ENTRIES_LATENCY
public static final String LEADER_METRIC_PEER_COMMIT_INDEX
public static final String RAFT_CLIENT_STALE_READ_REQUEST
public static final String REQUEST_QUEUE_LIMIT_HIT_COUNTER
public static final String REQUEST_BYTE_SIZE_LIMIT_HIT_COUNTER
public static final String RETRY_CACHE_ENTRY_COUNT_METRIC
public static final String RATIS_SERVER_FAILED_CLIENT_STALE_READ_COUNT
public static final String RATIS_SERVER_FAILED_CLIENT_READ_COUNT
public static final String RATIS_SERVER_FAILED_CLIENT_WRITE_COUNT
public static final String RATIS_SERVER_FAILED_CLIENT_WATCH_COUNT
public static final String RATIS_SERVER_FAILED_CLIENT_STREAM_COUNT
public RaftServerMetricsImpl(RaftGroupMemberId serverId, Supplier<Function<RaftPeerId,org.apache.ratis.proto.RaftProtos.CommitInfoProto>> commitInfoCache, Supplier<RetryCache.Statistics> retryCacheStatistics)
public static RaftServerMetricsImpl computeIfAbsentRaftServerMetrics(RaftGroupMemberId serverId, Supplier<Function<RaftPeerId,org.apache.ratis.proto.RaftProtos.CommitInfoProto>> commitInfoCache, Supplier<RetryCache.Statistics> retryCacheStatistics)
public static void removeRaftServerMetrics(RaftGroupMemberId serverId)
public LongCounter getNumRequestQueueLimitHits()
public LongCounter getNumRequestsByteSizeLimitHits()
public LongCounter getNumResourceLimitHits()
public LongCounter getNumFailedClientStaleRead()
public LongCounter getNumInstallSnapshot()
public void addFollower(RaftPeerId followerName)
public void recordFollowerHeartbeatElapsedTime(RaftPeerId followerId, long elapsedTimeNs)
followerId - the follower id.elapsedTimeNs - Elapsed time in Nanos.public Timekeeper getFollowerAppendEntryTimer(boolean isHeartbeat)
public Timekeeper getClientRequestTimer(RaftClientRequest.Type request)
public void onRequestQueueLimitHit()
public boolean removeNumPendingRequestsGauge()
public void addNumPendingRequestsMegaByteSize(Supplier<Integer> megabyteSize)
public boolean removeNumPendingRequestsByteSize()
public void onRequestByteSizeLimitHit()
public void onResourceLimitHit()
public void incFailedRequestCount(RaftClientRequest.Type type)
public void onSnapshotInstalled()
onSnapshotInstalled 在接口中 RaftServerMetricsCopyright © 2017–2023 The Apache Software Foundation. All rights reserved.