Class PushStatusCollector


  • public class PushStatusCollector
    extends java.lang.Object
    This class serves as a collector of offline push status for both Venice Server and Da Vinci clients. It will try to aggregate push status from Server and Da Vinci and produce the final aggregated result. If push status store is not enabled for the store, it will report directly upon receiving terminal server status, otherwise it will record the server status and keep polling Da Vinci status to determine the aggregate status and will only report if the aggregate status is terminal status.
    • Constructor Summary

      Constructors 
      Constructor Description
      PushStatusCollector​(ReadWriteStoreRepository storeRepository, PushStatusStoreReader pushStatusStoreReader, java.util.function.Consumer<java.lang.String> pushCompletedHandler, java.util.function.BiConsumer<java.lang.String,​ExecutionStatusWithDetails> pushErrorHandler, boolean daVinciPushStatusScanEnabled, int daVinciPushStatusScanIntervalInSeconds, int daVinciPushStatusScanThreadNumber, int daVinciPushStatusNoReportRetryMaxAttempts, int daVinciPushStatusScanMaxOfflineInstanceCount, double daVinciPushStatusScanMaxOfflineInstanceRatio, boolean useDaVinciSpecificExecutionStatusForError)  
    • Constructor Detail

      • PushStatusCollector

        public PushStatusCollector​(ReadWriteStoreRepository storeRepository,
                                   PushStatusStoreReader pushStatusStoreReader,
                                   java.util.function.Consumer<java.lang.String> pushCompletedHandler,
                                   java.util.function.BiConsumer<java.lang.String,​ExecutionStatusWithDetails> pushErrorHandler,
                                   boolean daVinciPushStatusScanEnabled,
                                   int daVinciPushStatusScanIntervalInSeconds,
                                   int daVinciPushStatusScanThreadNumber,
                                   int daVinciPushStatusNoReportRetryMaxAttempts,
                                   int daVinciPushStatusScanMaxOfflineInstanceCount,
                                   double daVinciPushStatusScanMaxOfflineInstanceRatio,
                                   boolean useDaVinciSpecificExecutionStatusForError)
    • Method Detail

      • start

        public void start()
      • subscribeTopic

        public void subscribeTopic​(java.lang.String topicName,
                                   int partitionCount)
      • unsubscribeTopic

        public void unsubscribeTopic​(java.lang.String topicName)
      • handleServerPushStatusUpdate

        public void handleServerPushStatusUpdate​(java.lang.String topicName,
                                                 ExecutionStatus executionStatus,
                                                 java.lang.String detailsString)
      • clear

        public void clear()