/** * Returns a new instance of the HdfsErasureCoding shim. * * @param fs a FileSystem object * @param conf a Configuration object * @return a new instance of the HdfsErasureCoding shim. * @throws IOException If an error occurred while creating the instance. */ @Override public HadoopShims.HdfsErasureCodingShim createHdfsErasureCodingShim(FileSystem fs, Configuration conf) throws IOException { if (isHdfsErasureCodingSupported()) { URI uri = fs.getUri(); if ("hdfs".equals(uri.getScheme())) { return new HdfsErasureCodingShim(uri, conf); } } return new HadoopShims.NoopHdfsErasureCodingShim(); }