Interface ContainerDeletionChoosingPolicy
- All Known Implementing Classes:
ContainerDeletionChoosingPolicyTemplate,RandomContainerDeletionChoosingPolicy,TopNOrderedContainerDeletionChoosingPolicy
public interface ContainerDeletionChoosingPolicy
This interface is used for choosing desired containers for
block deletion.
-
Method Summary
Modifier and TypeMethodDescriptionchooseContainerForBlockDeletion(int count, Map<Long, ContainerData> candidateContainers) Chooses desired containers for block deletion.default booleanisValidContainerType(org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.ContainerType type) Determine if the container has suitable type for this policy.
-
Method Details
-
chooseContainerForBlockDeletion
List<BlockDeletingService.ContainerBlockInfo> chooseContainerForBlockDeletion(int count, Map<Long, ContainerData> candidateContainers) throws org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerExceptionChooses desired containers for block deletion.- Parameters:
count- how many to returncandidateContainers- candidate containers collection- Returns:
- container data list
- Throws:
org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
-
isValidContainerType
default boolean isValidContainerType(org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.ContainerType type) Determine if the container has suitable type for this policy.- Parameters:
type- type of the container- Returns:
- whether the container type suitable for this policy.
-