private static <T> T createShim(String className, Class<T> xface) {
    try {
      Class<?> clazz = Class.forName(className);
      return xface.cast(clazz.newInstance());
    } catch (Exception e) {
      throw new RuntimeException("Could not load shims in class " + className, e);
    }
  }
Factory method to get an instance of HadoopShims based on the
version of Hadoop on the classpath.
shims/common/src/main/java/org/apache/hadoop/hive/shims/ShimLoader.java