BlockStoragePolicySuite (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.blockmanagement, class: BlockStoragePolicySuite

Package 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
  Description
  `static final int`
  `ID_BIT_LENGTH`
  `static final String`
  `STORAGE_POLICY_XATTR_NAME`
  `static final org.apache.hadoop.fs.XAttr.NameSpace`
  `XAttrNS`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static org.apache.hadoop.fs.XAttr`
  `buildXAttr(byte policyId)`
  `static String`
  `buildXAttrName()`
  `static BlockStoragePolicySuite`
  `createDefaultSuite()`
  `static BlockStoragePolicySuite`
  `createDefaultSuite(org.apache.hadoop.conf.Configuration conf)`
  `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()`
  `static boolean`
  `isStoragePolicyXAttr(org.apache.hadoop.fs.XAttr xattr)`

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

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

- ## Field Details

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

  - ### BlockStoragePolicySuite

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

- ## Method Details

  - ### createDefaultSuite

    @VisibleForTesting public static BlockStoragePolicySuite createDefaultSuite()

  - ### createDefaultSuite

    @VisibleForTesting public static BlockStoragePolicySuite createDefaultSuite(org.apache.hadoop.conf.Configuration conf)

  - ### 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()

  - ### isStoragePolicyXAttr

    public static boolean isStoragePolicyXAttr(org.apache.hadoop.fs.XAttr xattr)