void initEncryptionShim(HiveConf conf) throws IOException {
    FileSystem fs;
    HadoopShims shims = ShimLoader.getHadoopShims();
    conf.set(SECURITY_KEY_PROVIDER_URI_NAME, getKeyProviderURI());
    int numberOfDataNodes = 4;
    dfs = shims.getMiniDfs(conf, numberOfDataNodes, true, null);
    fs = dfs.getFileSystem();

    // set up a java key provider for encrypted hdfs cluster
    shims.createHdfsEncryptionShim(fs, conf);
  }
Execute Hive CLI statement
@param cmd arbitrary statement to execute
hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderEncryption.java