Index: common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java =================================================================== --- common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java (revision 1367127) +++ common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java (working copy) @@ -20,6 +20,7 @@ import junit.framework.TestCase; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; @@ -32,7 +33,8 @@ public class TestHiveConf extends TestCase { public void testHiveSitePath() throws Exception { - String expectedPath = System.getProperty("test.build.resources") + "/hive-site.xml"; + String expectedPath = + new Path(System.getProperty("test.build.resources") + "/hive-site.xml").toUri().getPath(); assertEquals(expectedPath, new HiveConf().getHiveSitePath()); } Index: ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java (revision 1367127) +++ ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java (working copy) @@ -48,7 +48,6 @@ import org.apache.hadoop.hive.ql.plan.ReduceSinkDesc; import org.apache.hadoop.hive.ql.plan.ScriptDesc; import org.apache.hadoop.hive.ql.plan.SelectDesc; -import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; import org.apache.hadoop.mapred.TextInputFormat; @@ -97,8 +96,7 @@ int i = 0; Path[] hadoopDataFile = new Path[2]; String[] testFiles = {"kv1.txt", "kv2.txt"}; - String testFileDir = "file://" - + conf.get("test.data.files").replace('\\', '/').replace("c:", ""); + String testFileDir = new Path(conf.get("test.data.files")).toUri().getPath(); for (String oneFile : testFiles) { Path localDataFile = new Path(testFileDir, oneFile); hadoopDataFile[i] = new Path(tmppath, oneFile); @@ -202,7 +200,7 @@ Operator op3 = OperatorFactory.get(new FileSinkDesc(tmpdir + "mapplan2.out", Utilities.defaultTd, false)); - Operator op2 = OperatorFactory.get(new ScriptDesc("/bin/cat", + Operator op2 = OperatorFactory.get(new ScriptDesc("cat", PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "key,value"), TextRecordWriter.class, PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "key,value"), TextRecordReader.class, @@ -330,7 +328,7 @@ Utilities.makeList(getStringColumn("tkey"), getStringColumn("tvalue")), outputColumns, false, -1, 1, -1)); - Operator op0 = OperatorFactory.get(new ScriptDesc("/bin/cat", + Operator op0 = OperatorFactory.get(new ScriptDesc("cat", PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "key,value"), TextRecordWriter.class, PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "tkey,tvalue"), TextRecordReader.class, @@ -406,7 +404,7 @@ getStringColumn("tvalue")), outputColumns, false, -1, 1, -1)); Operator op0 = OperatorFactory.get(new ScriptDesc( - "\'/bin/cat\'", PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, + "\'cat\'", PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "tkey,tvalue"), TextRecordWriter.class, PlanUtils .getDefaultTableDesc("" + Utilities.tabCode, "tkey,tvalue"), TextRecordReader.class, Index: ql/src/test/org/apache/hadoop/hive/ql/history/TestHiveHistory.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/history/TestHiveHistory.java (revision 1367127) +++ ql/src/test/org/apache/hadoop/hive/ql/history/TestHiveHistory.java (working copy) @@ -86,8 +86,7 @@ int i = 0; Path[] hadoopDataFile = new Path[2]; String[] testFiles = {"kv1.txt", "kv2.txt"}; - String testFileDir = "file://" - + conf.get("test.data.files").replace('\\', '/').replace("c:", ""); + String testFileDir = new Path(conf.get("test.data.files")).toUri().getPath(); for (String oneFile : testFiles) { Path localDataFile = new Path(testFileDir, oneFile); hadoopDataFile[i] = new Path(tmppath, oneFile);