Class ReplicationSupervisor
java.lang.Object
org.apache.hadoop.ozone.container.replication.ReplicationSupervisor
Single point to schedule the downloading tasks based on priorities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forReplicationSupervisor.final classAn executable form of a replication task with status handling. -
Method Summary
Modifier and TypeMethodDescriptionvoidQueue an asynchronous download of the given container.intgetInFlightReplications(Class<? extends AbstractReplicationTask> taskClass) Given the Class of a AbstractReplicationTask, return the count of tasks currently inflight (queued or running) for that type of task.intlonglonglonglonggetReplicationFailureCount(String metricsName) longlonggetReplicationQueuedCount(String metricsName) longgetReplicationRequestAvgTime(String metricsName) longlonggetReplicationRequestCount(String metricsName) longgetReplicationRequestTotalTime(String metricsName) longlonggetReplicationSkippedCount(String metricsName) longlonggetReplicationSuccessCount(String metricsName) longlonggetReplicationTimeoutCount(String metricsName) intReturns a count of all inflight replication tasks across all task types.voidvoidnodeStateUpdated(org.apache.hadoop.hdds.protocol.proto.HddsProtos.NodeOperationalState newState) voidvoidstop()
-
Method Details
-
newBuilder
-
getMetricsMap
-
addTask
Queue an asynchronous download of the given container. -
initCounters
-
shutdownAfterFinish
- Throws:
InterruptedException
-
stop
public void stop() -
getInFlightReplications
Given the Class of a AbstractReplicationTask, return the count of tasks currently inflight (queued or running) for that type of task.- Parameters:
taskClass- The Class of the tasks to get a count for.- Returns:
- Count of in-flight replications for the type of task.
-
getInFlightReplicationSummary
-
getTotalInFlightReplications
public int getTotalInFlightReplications()Returns a count of all inflight replication tasks across all task types. Note that `getInFlightReplications(Class taskClass) allows for the .count of replications for a given class to be retrieved.- Returns:
- Total replication tasks queued or running in the supervisor
-
getMaxQueueSize
public int getMaxQueueSize() -
nodeStateUpdated
public void nodeStateUpdated(org.apache.hadoop.hdds.protocol.proto.HddsProtos.NodeOperationalState newState) -
getReplicationRequestCount
public long getReplicationRequestCount() -
getReplicationRequestCount
-
getQueueSize
public long getQueueSize() -
getMaxReplicationStreams
public long getMaxReplicationStreams() -
getReplicationSuccessCount
public long getReplicationSuccessCount() -
getReplicationSuccessCount
-
getReplicationFailureCount
public long getReplicationFailureCount() -
getReplicationFailureCount
-
getReplicationTimeoutCount
public long getReplicationTimeoutCount() -
getReplicationTimeoutCount
-
getReplicationSkippedCount
public long getReplicationSkippedCount() -
getReplicationSkippedCount
-
getReplicationQueuedCount
public long getReplicationQueuedCount() -
getReplicationQueuedCount
-
getReplicationRequestAvgTime
-
getReplicationRequestTotalTime
-