Using Erasure Coding for New Data

You must create a new directory and then set a supported EC policy for the directory.

  1. Create a new directory or choose an existing directory.
  2. View the supported EC policies.
Bash
Copy
  1. Enable the supported EC policy.
Bash
Copy
  1. Set the EC policy for the directory you want to use.
Bash
Copy
  • path: This is required. Specify the HDFS directory you want to apply the EC policy to.
  • policy: This is optional. The EC policy you want to use for the directory you specified. If you do not provide this parameter, the EC policy you specified in the fallback Erasure Coding Policy setting from Acceldata Manager is used.
  1. Set the destination for data to the directory you enabled EC for. No action beyond that is required. When the data is written to the directory, it will be erasure coded based on the policy you set.

The supported policies are RS-10-4-1024k , RS-3-2-1024k ,RS-6-3-1024k , RS-LEGACY-6-3-1024k , and XOR-2-1-1024.

You can use the below example for Enabling Erasure Coding:

  1. Check the supported EC policy “hdfs ec -listPolicies“.
Bash
Copy
  1. Select the appropriate policy for the use case “dfs ec -enablePolicy -policy XOR-2-1-1024k”.
Bash
Copy
  1. Set policy XOR-2-1-1024k on tmp directory “hdfs ec -setPolicy -path /tmp -policy XOR-2-1-1024k”.
Bash
Copy
  1. Validate the set policy on the path.
Bash
Copy
  1. Unset policy on the hdfs directory.
Bash
Copy
  1. Disable the set policy on HDFS.
Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated