Class PushMonitorUtils


  • public class PushMonitorUtils
    extends java.lang.Object
    This class contains some common util methods for push monitoring purpose.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ExecutionStatusWithDetails getDaVinciPartitionLevelPushStatusAndDetails​(PushStatusStoreReader reader, java.lang.String topicName, int partitionCount, java.util.Optional<java.lang.String> incrementalPushVersion, int maxOfflineInstanceCount, double maxOfflineInstanceRatio, boolean useDaVinciSpecificExecutionStatusForError, java.util.Set<java.lang.CharSequence> instancesToIgnore)  
      static ExecutionStatusWithDetails getDaVinciPushStatusAndDetails​(PushStatusStoreReader reader, java.lang.String topicName, int partitionCount, java.util.Optional<java.lang.String> incrementalPushVersion, int maxOfflineInstanceCount, double maxOfflineInstanceRatio, boolean useDaVinciSpecificExecutionStatusForError)
      This method checks Da Vinci client push status for the target version from push status store and compute a final status.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PushMonitorUtils

        public PushMonitorUtils()
    • Method Detail

      • getDaVinciPushStatusAndDetails

        public static ExecutionStatusWithDetails getDaVinciPushStatusAndDetails​(PushStatusStoreReader reader,
                                                                                java.lang.String topicName,
                                                                                int partitionCount,
                                                                                java.util.Optional<java.lang.String> incrementalPushVersion,
                                                                                int maxOfflineInstanceCount,
                                                                                double maxOfflineInstanceRatio,
                                                                                boolean useDaVinciSpecificExecutionStatusForError)
        This method checks Da Vinci client push status for the target version from push status store and compute a final status. It will try to get an aggregated status from version level status key first; if there is value, it will still try to query the partition level keys, and combine the result with the old keys, in case DaVinci instances are partially upgraded and some of them are still populating statuses with old keys. If no value is found for the new key, it will fall back to partition level status key. A Da Vinci instance sent heartbeat to controllers recently is considered active. Only consider the push status from active Da Vinci instances unless there are too many offline instances which triggers the fail fast mechanism.
      • getDaVinciPartitionLevelPushStatusAndDetails

        public static ExecutionStatusWithDetails getDaVinciPartitionLevelPushStatusAndDetails​(PushStatusStoreReader reader,
                                                                                              java.lang.String topicName,
                                                                                              int partitionCount,
                                                                                              java.util.Optional<java.lang.String> incrementalPushVersion,
                                                                                              int maxOfflineInstanceCount,
                                                                                              double maxOfflineInstanceRatio,
                                                                                              boolean useDaVinciSpecificExecutionStatusForError,
                                                                                              java.util.Set<java.lang.CharSequence> instancesToIgnore)