Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Implemented
-
None
-
None
Description
In DatanodeAdminMonitorImpl.checkContainersReplicatedOnNode(), there is a call to get the ContainerReplicaCount for each container on the node:
ContainerReplicaCount replicaSet = replicationManager.getContainerReplicaCount(cid); if (replicaSet.isSufficientlyReplicated()) { sufficientlyReplicated++; } else { if (LOG.isDebugEnabled()) {
From here, it calls isSufficientlyReplicated to decide if the replica has enough copies elsewhere to let this node continue decommissioning.
With the introduction of EC, we also have the ECContainerReplicaCounts object, but the class is not related to ContainerReplicaCount.
We need the ReplicationManager to create a ContainerReplicaCount or ECContainerReplica count object depending on the container type.
We probably also need to have an interface that replicationManager.getContainerReplicaCount returns providing the isSufficientlyReplicated and getReplicas() methods.
Note that right now, ECContainerReplicaCount.isSufficientlyReplicated takes a boolean flag, while ContainerReplicaCount.isSufficientlyReplicated does not. Rather than attempting to change the latter, perhaps we need to overload isSufficientlyReplicated in ECContainerReplicaCount to have no parameter and always pass false into the other method, which is what the decommission calls need.
Attachments
Issue Links
- links to