Class ReplicaStatus


  • public class ReplicaStatus
    extends java.lang.Object
    Class stores replica status and history.
    • Constructor Detail

      • ReplicaStatus

        public ReplicaStatus​(java.lang.String instanceId)
      • ReplicaStatus

        public ReplicaStatus​(java.lang.String instanceId,
                             boolean enableStatusHistory)
    • Method Detail

      • updateStatus

        public void updateStatus​(ExecutionStatus newStatus,
                                 java.lang.String incrementalPushVersion)
      • getInstanceId

        public java.lang.String getInstanceId()
      • setCurrentStatus

        public void setCurrentStatus​(ExecutionStatus currentStatus)
      • getCurrentProgress

        public long getCurrentProgress()
      • setCurrentProgress

        public void setCurrentProgress​(long currentProgress)
      • getIncrementalPushVersion

        public java.lang.String getIncrementalPushVersion()
      • setIncrementalPushVersion

        public void setIncrementalPushVersion​(java.lang.String incrementalPushVersion)
      • getStatusHistory

        public java.util.List<StatusSnapshot> getStatusHistory()
      • setStatusHistory

        public void setStatusHistory​(java.util.List<StatusSnapshot> statusHistory)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getReplicaId

        public static java.lang.String getReplicaId​(java.lang.String kafkaTopic,
                                                    int partition,
                                                    java.lang.String instanceId)
      • getInstanceIdFromReplicaId

        public static java.lang.String getInstanceIdFromReplicaId​(java.lang.String replicaId)
      • findStartedAndCompletedStatus

        public Pair<StatusSnapshot,​StatusSnapshot> findStartedAndCompletedStatus()
        Returns:
        the started and completed status snapshot from the status history.