diff --git a/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderEncryption.java b/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderEncryption.java index 6442f4c..da8deb5 100644 --- a/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderEncryption.java +++ b/hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderEncryption.java @@ -197,7 +197,7 @@ public void setup() throws Exception { createTableInSpecifiedPath(ENCRYPTED_TABLE, "a int, b string", WindowsPathUtil.getHdfsUriString(encryptedTablePath), driver); - associateEncryptionZoneWithPath(encryptedTablePath); + associateEncryptionZoneWithPath(WindowsPathUtil.getHdfsUriString(encryptedTablePath)); int LOOP_SIZE = 3; String[] input = new String[LOOP_SIZE * LOOP_SIZE]; @@ -237,7 +237,7 @@ void initEncryptionShim(HiveConf conf) throws IOException { FileSystem fs; HadoopShims shims = ShimLoader.getHadoopShims(); conf.set(SECURITY_KEY_PROVIDER_URI_NAME, getKeyProviderURI()); - + WindowsPathUtil.convertPathsFromWindowsToHdfs(conf); int numberOfDataNodes = 4; dfs = shims.getMiniDfs(conf, numberOfDataNodes, true, null); fs = dfs.getFileSystem(); @@ -367,12 +367,13 @@ public void testReadDataFromEncryptedHiveTableByHCatMR() throws Exception { job.setNumReduceTasks(0); FileSystem fs = new LocalFileSystem(); - Path path = new Path(TEST_DATA_DIR + "/testHCatMREncryptionOutput"); + String pathLoc = TEST_DATA_DIR + "/testHCatMREncryptionOutput"; + Path path = new Path(pathLoc); if (fs.exists(path)) { fs.delete(path, true); } - TextOutputFormat.setOutputPath(job, path); + TextOutputFormat.setOutputPath(job, new Path(WindowsPathUtil.getHdfsUriString(pathLoc))); job.waitForCompletion(true);