Interface ContainerDeletionChoosingPolicy

All Known Implementing Classes:
ContainerDeletionChoosingPolicyTemplate, RandomContainerDeletionChoosingPolicy, TopNOrderedContainerDeletionChoosingPolicy

public interface ContainerDeletionChoosingPolicy
This interface is used for choosing desired containers for block deletion.
  • Method Details

    • chooseContainerForBlockDeletion

      List<BlockDeletingService.ContainerBlockInfo> chooseContainerForBlockDeletion(int count, Map<Long,ContainerData> candidateContainers) throws org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
      Chooses desired containers for block deletion.
      Parameters:
      count - how many to return
      candidateContainers - 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.