Using erasure coding for new data
The procedure described in this section explains how to use EC with new data.
- Create a new directory or choose an existing directory.
View the supported EC policies.
hdfs ec -listPolicies
Enable a supported EC policy.
hdfs ec -enablePolicy -policy <policy>
Set the EC policy for the directory you want to use.
hdfs ec -setPolicy -path <directory> [-policy <policyName>]
path. Required. Specify the HDFS directory you want to apply the EC policy to.
policy. 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 Cloudera Manager is used.
Set the destination for the data to the director you enabled EC for. No action beyond
that is required.
When data is written to the directory, it will be erasure coded based on the policy you set.