org.apache.hadoop.hdfs.server.blockmanagement

## Class BlockStoragePolicySuite

- java.lang.Object
- - org.apache.hadoop.hdfs.server.blockmanagement.BlockStoragePolicySuite

-     public class BlockStoragePolicySuite
      extends Object

  A collection of block storage policies.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ID_BIT_LENGTH`
    `static String` | `STORAGE_POLICY_XATTR_NAME`
    `static org.apache.hadoop.fs.XAttr.NameSpace` | `XAttrNS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockStoragePolicySuite(byte defaultPolicyID, org.apache.hadoop.hdfs.protocol.BlockStoragePolicy[] policies)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.apache.hadoop.fs.XAttr` | `buildXAttr(byte policyId)`
    `static String` | `buildXAttrName()`
    `static BlockStoragePolicySuite` | `createDefaultSuite()`
    `org.apache.hadoop.hdfs.protocol.BlockStoragePolicy[]` | `getAllPolicies()`
    `org.apache.hadoop.hdfs.protocol.BlockStoragePolicy` | `getDefaultPolicy()`
    `org.apache.hadoop.hdfs.protocol.BlockStoragePolicy` | `getPolicy(byte id)`
    `org.apache.hadoop.hdfs.protocol.BlockStoragePolicy` | `getPolicy(String policyName)`
    `static String` | `getStoragePolicyXAttrPrefixedName()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### STORAGE_POLICY_XATTR_NAME

          public static final String STORAGE_POLICY_XATTR_NAME

      See Also:
        Constant Field Values

    - #### XAttrNS

          public static final org.apache.hadoop.fs.XAttr.NameSpace XAttrNS

    - #### ID_BIT_LENGTH

          public static final int ID_BIT_LENGTH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BlockStoragePolicySuite

          public BlockStoragePolicySuite(byte defaultPolicyID,
                                         org.apache.hadoop.hdfs.protocol.BlockStoragePolicy[] policies)

  - ### Method Detail

    - #### createDefaultSuite

          public static BlockStoragePolicySuite createDefaultSuite()

    - #### getPolicy

          public org.apache.hadoop.hdfs.protocol.BlockStoragePolicy getPolicy(byte id)

      Returns:
        the corresponding policy.

    - #### getDefaultPolicy

          public org.apache.hadoop.hdfs.protocol.BlockStoragePolicy getDefaultPolicy()

      Returns:
        the default policy.

    - #### getPolicy

          public org.apache.hadoop.hdfs.protocol.BlockStoragePolicy getPolicy(String policyName)

    - #### getAllPolicies

          public org.apache.hadoop.hdfs.protocol.BlockStoragePolicy[] getAllPolicies()

    - #### buildXAttrName

          public static String buildXAttrName()

    - #### buildXAttr

          public static org.apache.hadoop.fs.XAttr buildXAttr(byte policyId)

    - #### getStoragePolicyXAttrPrefixedName

          public static String getStoragePolicyXAttrPrefixedName()

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