Package com.linkedin.venice.pushmonitor
Class ReplicaStatus
- java.lang.Object
-
- com.linkedin.venice.pushmonitor.ReplicaStatus
-
public class ReplicaStatus extends java.lang.Object
Class stores replica status and history.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_HISTORY_LENGTH
static long
NO_PROGRESS
-
Constructor Summary
Constructors Constructor Description ReplicaStatus(java.lang.String instanceId)
ReplicaStatus(java.lang.String instanceId, boolean enableStatusHistory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Pair<StatusSnapshot,StatusSnapshot>
findStartedAndCompletedStatus()
long
getCurrentProgress()
ExecutionStatus
getCurrentStatus()
java.lang.String
getIncrementalPushVersion()
java.lang.String
getInstanceId()
static java.lang.String
getInstanceIdFromReplicaId(java.lang.String replicaId)
static java.lang.String
getReplicaId(java.lang.String kafkaTopic, int partition, java.lang.String instanceId)
java.util.List<StatusSnapshot>
getStatusHistory()
int
hashCode()
void
setCurrentProgress(long currentProgress)
void
setCurrentStatus(ExecutionStatus currentStatus)
void
setIncrementalPushVersion(java.lang.String incrementalPushVersion)
void
setStatusHistory(java.util.List<StatusSnapshot> statusHistory)
void
updateStatus(ExecutionStatus newStatus, java.lang.String incrementalPushVersion)
-
-
-
Field Detail
-
MAX_HISTORY_LENGTH
public static final int MAX_HISTORY_LENGTH
- See Also:
- Constant Field Values
-
NO_PROGRESS
public static final long NO_PROGRESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateStatus
public void updateStatus(ExecutionStatus newStatus, java.lang.String incrementalPushVersion)
-
getInstanceId
public java.lang.String getInstanceId()
-
getCurrentStatus
public ExecutionStatus getCurrentStatus()
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.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.
-
-