org.apache.hadoop.fs

## Interface BlockStoragePolicySpi

-     @InterfaceAudience.Public
       @InterfaceStability.Stable
      public interface BlockStoragePolicySpi

  A storage policy specifies the placement of block replicas on specific storage types.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `StorageType[]` | `getCreationFallbacks()` Get the fallback storage types for creating new block replicas.
    `String` | `getName()` Return the name of the storage policy.
    `StorageType[]` | `getReplicationFallbacks()` Get the fallback storage types for replicating existing block replicas.
    `StorageType[]` | `getStorageTypes()` Return the preferred storage types associated with this policy.
    `boolean` | `isCopyOnCreateFile()` Returns true if the policy is inherit-only and cannot be changed for an existing file.

- - ### Method Detail

    - #### 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.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.