Class ReplicationTask
java.lang.Object
org.apache.hadoop.ozone.container.replication.AbstractReplicationTask
org.apache.hadoop.ozone.container.replication.ReplicationTask
The task to download a container from the sources.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.ozone.container.replication.AbstractReplicationTask
AbstractReplicationTask.Status -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReplicationTask(long containerId, List<org.apache.hadoop.hdds.protocol.DatanodeDetails> sources, ContainerReplicator replicator) Intended to only be used in tests.ReplicationTask(ReplicateContainerCommand cmd, ContainerReplicator replicator) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected ObjectHook for subclasses to provide info about the command.longList<org.apache.hadoop.hdds.protocol.DatanodeDetails> longinthashCode()voidrunTask()Abstract method which needs to be overridden by the sub classes to execute the task.voidsetTransferredBytes(long transferredBytes) toString()Methods inherited from class org.apache.hadoop.ozone.container.replication.AbstractReplicationTask
getDeadline, getPriority, getQueued, getStatus, getTerm, setPriority, setShouldOnlyRunOnInServiceDatanodes, setStatus, shouldOnlyRunOnInServiceDatanodes
-
Constructor Details
-
ReplicationTask
-
ReplicationTask
protected ReplicationTask(long containerId, List<org.apache.hadoop.hdds.protocol.DatanodeDetails> sources, ContainerReplicator replicator) Intended to only be used in tests.
-
-
Method Details
-
getMetricName
- Specified by:
getMetricNamein classAbstractReplicationTask
-
getMetricDescriptionSegment
- Specified by:
getMetricDescriptionSegmentin classAbstractReplicationTask
-
equals
-
hashCode
public int hashCode() -
getContainerId
public long getContainerId()- Overrides:
getContainerIdin classAbstractReplicationTask
-
getSources
-
getCommandForDebug
Description copied from class:AbstractReplicationTaskHook for subclasses to provide info about the command.- Overrides:
getCommandForDebugin classAbstractReplicationTask- Returns:
- string representation of the command
-
toString
- Overrides:
toStringin classAbstractReplicationTask
-
getTransferredBytes
public long getTransferredBytes() -
setTransferredBytes
public void setTransferredBytes(long transferredBytes) -
runTask
public void runTask()Description copied from class:AbstractReplicationTaskAbstract method which needs to be overridden by the sub classes to execute the task.- Specified by:
runTaskin classAbstractReplicationTask
-