public static boolean checkFileSystemXAttrSupport(FileSystem fs, Path path) throws IOException {
    try {
      fs.getXAttrs(path);
      return true;
    } catch (UnsupportedOperationException e) {
      LOG.warn("XAttr won't be preserved since it is not supported for file system: " + fs.getUri());
      return false;
    }
  }
A JAAS configuration for ZooKeeper clients intended to use for SASL
Kerberos.
shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java