Interface BlockStoragePolicySpi


@Public @Stable public interface BlockStoragePolicySpi
A storage policy specifies the placement of block replicas on specific storage types.
  • Method Details

    • getName

      String getName()
      Return the name of the storage policy. Policies are uniquely identified by name.
      Returns:
      the name of the storage policy.
    • getStorageTypes

      StorageType[] getStorageTypes()
      Return the preferred storage types associated with this policy. These storage types are used sequentially for successive block replicas.
      Returns:
      preferred storage types used for placing block replicas.
    • getCreationFallbacks

      StorageType[] getCreationFallbacks()
      Get the fallback storage types for creating new block replicas. Fallback storage types are used if the preferred storage types are not available.
      Returns:
      fallback storage types for new block replicas..
    • getReplicationFallbacks

      StorageType[] getReplicationFallbacks()
      Get the fallback storage types for replicating existing block replicas. Fallback storage types are used if the preferred storage types are not available.
      Returns:
      fallback storage types for replicating existing block replicas.
    • isCopyOnCreateFile

      boolean isCopyOnCreateFile()
      Returns true if the policy is inherit-only and cannot be changed for an existing file.
      Returns:
      true if the policy is inherit-only.