Title
Create new category
Edit page index title
Edit category
Edit link
Erasure Coding Examples
You can use the HDFS EX command with its various options to set the erasure coding policies on directories.
Viewing the list of erasure coding policies
The following example shows how you can view the list of available erasure coding policies:
Enabling an erasure coding policy
In the previous example, the list of erasure coding policies indicate that RS-6-3-1024k is already enabled. If required, you can enable additional policies as mentioned in the following example:
Setting an erasure coding policy
The following example shows how you can set the erasure coding policy RS-6-3-1024kon a particular directory:
To confirm whether the specified directory has the erasure coding policy applied, run the hdfs ec -getPolicy command:
Checking the block status on an erasure-coded directory
After enabling erasure coding on a directory, you can check the block status by running the hdfs fsck command. The following example output shows the status of the erasure-coded blocks:
Changing the erasure coding policy
You can use the hdfs ec setPolicy command to change the erasure coding policy applied on a particular directory.
You can check the block status after applying the new policy. The following example output shows the status of the erasure-coded blocks for a directory that has the RS-3-2-1024k policy:
You can apply the default 3x replication policy and check the block status as specified in the following examples: