@SuppressFBWarnings(value = "LI_LAZY_INIT_STATIC", justification = "All threads set the same value despite data race")
  public static boolean isHdfsEncryptionSupported() {
    if (hdfsEncryptionSupport == null) {
      Method m = null;

      try {
        m = HdfsAdmin.class.getMethod("getEncryptionZoneForPath", Path.class);
      } catch (NoSuchMethodException e) {
        // This version of Hadoop does not support HdfsAdmin.getEncryptionZoneForPath().
        // Hadoop 2.6.0 introduces this new method.
      }

      hdfsEncryptionSupport = (m != null);
    }

    return hdfsEncryptionSupport;
  }
Checks wether reverse diff on the snapshot should be performed or not.
@param p path where snapshot exists.
@param conf the hive configuration.
@param snapshot the name of snapshot.
@param overwriteTarget whether overwriting target is enabled.
@return true, if we need to do rdiff.
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java