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
Constructors Modifier Constructor Description protected
AggPartitionHealthStats(java.lang.String clusterName, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor)
Only for test usage.AggPartitionHealthStats(java.lang.String clusterName, io.tehuti.metrics.MetricsRepository metricsRepository, RoutingDataRepository routingDataRepository, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onCustomizedViewAdded(PartitionAssignment partitionAssignment)
void
onCustomizedViewChange(PartitionAssignment partitionAssignment)
void
onExternalViewChange(PartitionAssignment partitionAssignment)
Handle routing data changed event.void
onPartitionStatusChange(java.lang.String topic, ReadOnlyPartitionStatus partitionStatus)
void
onRoutingDataDeleted(java.lang.String kafkaTopic)
protected void
reportUnderReplicatedPartition(java.lang.String version, int underReplicatedPartitions)
-
Methods inherited from class com.linkedin.venice.stats.AbstractVeniceAggStats
getNullableStoreStats, getStoreStats, getTotalStats, setStatsSupplier
-
-
-
-
Constructor Detail
-
AggPartitionHealthStats
protected AggPartitionHealthStats(java.lang.String clusterName, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor)
Only for test usage.
-
AggPartitionHealthStats
public AggPartitionHealthStats(java.lang.String clusterName, io.tehuti.metrics.MetricsRepository metricsRepository, RoutingDataRepository routingDataRepository, ReadOnlyStoreRepository storeRepository, PushMonitor pushMonitor)
-
-
Method Detail
-
onExternalViewChange
public void onExternalViewChange(PartitionAssignment partitionAssignment)
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
public void onCustomizedViewChange(PartitionAssignment partitionAssignment)
- Specified by:
onCustomizedViewChange
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
onCustomizedViewAdded
public void onCustomizedViewAdded(PartitionAssignment partitionAssignment)
- Specified by:
onCustomizedViewAdded
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
onPartitionStatusChange
public void onPartitionStatusChange(java.lang.String topic, ReadOnlyPartitionStatus partitionStatus)
- Specified by:
onPartitionStatusChange
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
onRoutingDataDeleted
public void onRoutingDataDeleted(java.lang.String kafkaTopic)
- Specified by:
onRoutingDataDeleted
in interfaceRoutingDataRepository.RoutingDataChangedListener
-
reportUnderReplicatedPartition
protected void reportUnderReplicatedPartition(java.lang.String version, int underReplicatedPartitions)
-
-