static boolean hasEquivalentErasureCodingPolicy(HadoopShims.HdfsErasureCodingShim ecShim,
                                                  Path path1, Path path2) throws IOException {
    HadoopShims.HdfsFileErasureCodingPolicy policy1 = ecShim.getErasureCodingPolicy(path1);
    HadoopShims.HdfsFileErasureCodingPolicy policy2 = ecShim.getErasureCodingPolicy(path2);
    if (policy1 != null) {
      return policy1.equals(policy2);
    } else {
      if (policy2 == null) {
        return true;
      }
      return false;
    }
  }
Recursively check the file owner and permissions, setting them to the passed in values
if the owner/perms of the file do not match.
@param fs
@param fStatus
@param userName  Owner of the file to compare/set. Null to skip this check.
@param groupName Group of the file to compare/set. Null to skip this check.
@param dirPerms  Permissions to compare/set, if the file is a directory. Null to skip this check.
@param filePerms Permissions to compare/set, if the file is a file. Null to skip this check.
@param dryRun    Dry run - check but do not actually set
@param recurse   Whether to recursively check/set the contents of a directory
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/util/HiveStrictManagedMigration.java