Package org.apache.hadoop.fs
Interface WithErasureCoding
public interface WithErasureCoding
Filesystems that support EC can implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetErasureCodingPolicyName(FileStatus fileStatus) Get the EC Policy name of the given file's fileStatus.voidsetErasureCodingPolicy(Path path, String ecPolicyName) Set the given ecPolicy on the path.
-
Method Details
-
getErasureCodingPolicyName
Get the EC Policy name of the given file's fileStatus. If the file is not erasure coded, this shall return null. Callers will make sure to check if fileStatus isInstance of an FS that implements this interface. If the call fails due to some error, this shall return null.- Parameters:
fileStatus- object of the file whose ecPolicy needs to be obtained.- Returns:
- the ec Policy name
-
setErasureCodingPolicy
Set the given ecPolicy on the path. The path and ecPolicyName should be valid (not null/empty, the implementing FS shall support the supplied ecPolicy). implementations can throw IOException if these conditions are not met.- Parameters:
path- on which the EC policy needs to be set.ecPolicyName- the EC policy.- Throws:
IOException- if there is an error during the set op.
-