Interface WithErasureCoding


public interface WithErasureCoding
Filesystems that support EC can implement this interface.
  • Method Details

    • getErasureCodingPolicyName

      String getErasureCodingPolicyName(FileStatus fileStatus)
      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

      void setErasureCodingPolicy(Path path, String ecPolicyName) throws IOException
      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.