public static void verifySupport(Configuration conf, String policy) throws HBaseIOException {
    DistributedFileSystem dfs = getDfs(conf);
    checkAvailable(dfs, policy);

    // Enable the policy on a test directory. Try writing ot it to ensure that HDFS allows it
    // This acts as a safeguard against topology issues (not enough nodes for policy, etc) and
    // anything else. This is otherwise hard to validate more directly.
    Path globalTempDir = new Path(conf.get(HConstants.HBASE_DIR), HConstants.HBASE_TEMP_DIRECTORY);
    Path currentTempDir = createTempDir(dfs, globalTempDir);
    try {
      setPolicy(dfs, currentTempDir, policy);
      try (FSDataOutputStream out = dfs.create(new Path(currentTempDir, "test.out"))) {
        out.writeUTF("Testing " + policy);
      }
    } catch (IOException e) {
      throw new DoNotRetryIOException("Failed write test for EC policy. Check cause or logs", e);
    } finally {
      try {
        dfs.delete(currentTempDir, true);
      } catch (IOException e) {
        LOG.warn("Failed to delete temp path for ec test", e);
      }
    }
  }
Runs checks against the FileSystem, verifying that HDFS is supported and the policy is
available, enabled, and works with a simple write.
hbase-server/src/main/java/org/apache/hadoop/hbase/fs/ErasureCodingUtils.java