Class AggPartitionHealthStats
java.lang.Object
com.linkedin.venice.stats.AbstractVeniceAggStats<PartitionHealthStats>
com.linkedin.venice.controller.stats.AggPartitionHealthStats
- All Implemented Interfaces:
RoutingDataRepository.RoutingDataChangedListener
public class AggPartitionHealthStats
extends AbstractVeniceAggStats<PartitionHealthStats>
implements RoutingDataRepository.RoutingDataChangedListener
Monitor the change of Helix's external view and warn in case that any partition is unhealthy. E.g. if the number of
replicas in a partition is smaller than the required replication factor, we would log a warn message and record to
our metrics.
-
Field Summary
Fields inherited from class com.linkedin.venice.stats.AbstractVeniceAggStats
STORE_NAME_FOR_TOTAL_STAT, storeStats, totalStats
-
Constructor Summary
ModifierConstructorDescriptionprotected
AggPartitionHealthStats
(String clusterName, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor) Only for test usage.AggPartitionHealthStats
(String clusterName, io.tehuti.metrics.MetricsRepository metricsRepository, RoutingDataRepository routingDataRepository, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onCustomizedViewAdded
(PartitionAssignment partitionAssignment) void
onCustomizedViewChange
(PartitionAssignment partitionAssignment) void
onExternalViewChange
(PartitionAssignment partitionAssignment) Handle routing data changed event.void
onPartitionStatusChange
(String topic, ReadOnlyPartitionStatus partitionStatus) void
onRoutingDataDeleted
(String kafkaTopic) protected void
reportUnderReplicatedPartition
(String version, int underReplicatedPartitions) Methods inherited from class com.linkedin.venice.stats.AbstractVeniceAggStats
getNullableStoreStats, getStoreStats, getTotalStats, setStatsSupplier
-
Constructor Details
-
AggPartitionHealthStats
protected AggPartitionHealthStats(String clusterName, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor) Only for test usage. -
AggPartitionHealthStats
public AggPartitionHealthStats(String clusterName, io.tehuti.metrics.MetricsRepository metricsRepository, RoutingDataRepository routingDataRepository, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor)
-
-
Method Details
-
onExternalViewChange
Description copied from interface:RoutingDataRepository.RoutingDataChangedListener
Handle routing data changed event.- Specified by:
onExternalViewChange
in interfaceRoutingDataRepository.RoutingDataChangedListener
- Parameters:
partitionAssignment
- Newest partitions assignments information including resource name and all of instances assigned to this resource. If the number of partition is 0, it means the kafka topic is deleted.
-
onCustomizedViewChange
- Specified by:
onCustomizedViewChange
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
onCustomizedViewAdded
- Specified by:
onCustomizedViewAdded
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
onPartitionStatusChange
- Specified by:
onPartitionStatusChange
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
onRoutingDataDeleted
- Specified by:
onRoutingDataDeleted
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
reportUnderReplicatedPartition
-