pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1737175 - /pig/branches/spark/test/org/apache/pig/test/TestBuiltin.java
Date Thu, 31 Mar 2016 03:43:39 GMT
Author: xuefu
Date: Thu Mar 31 03:43:39 2016
New Revision: 1737175

URL: http://svn.apache.org/viewvc?rev=1737175&view=rev
Log:
PIG-4855: Merge trunk[4] into spark branch (Pallavi via Xuefu)

Modified:
    pig/branches/spark/test/org/apache/pig/test/TestBuiltin.java

Modified: pig/branches/spark/test/org/apache/pig/test/TestBuiltin.java
URL: http://svn.apache.org/viewvc/pig/branches/spark/test/org/apache/pig/test/TestBuiltin.java?rev=1737175&r1=1737174&r2=1737175&view=diff
==============================================================================
--- pig/branches/spark/test/org/apache/pig/test/TestBuiltin.java (original)
+++ pig/branches/spark/test/org/apache/pig/test/TestBuiltin.java Thu Mar 31 03:43:39 2016
@@ -3208,8 +3208,10 @@ public class TestBuiltin {
         Util.resetStateForExecModeSwitch();
         String inputFileName = "testUniqueID.txt";
         Util.createInputFile(cluster, inputFileName, new String[]
-            {"1\n2\n3\n4\n5\n1\n2\n3\n4\n5\n"});
-        PigServer pigServer = new PigServer(cluster.getExecType(), cluster.getProperties());
+                {"1\n2\n3\n4\n5\n1\n2\n3\n4\n5\n"});
+        Properties copyproperties = new Properties();
+        copyproperties.putAll(cluster.getProperties());
+        PigServer pigServer = new PigServer(cluster.getExecType(), copyproperties);
         pigServer.getPigContext().getProperties().setProperty("mapred.max.split.size", "10");
         pigServer.getPigContext().getProperties().setProperty("pig.noSplitCombination", "true");
         pigServer.registerQuery("A = load '" + inputFileName + "' as (name);");
@@ -3255,15 +3257,20 @@ public class TestBuiltin {
             assertEquals(iter.next().get(1), "0-2");
             assertEquals(iter.next().get(1), "0-3");
         }
+        Util.deleteFile(cluster, inputFileName);
     }
 
+
     @Test
     public void testRANDOMWithJob() throws Exception {
         Util.resetStateForExecModeSwitch();
         String inputFileName = "testRANDOM.txt";
         Util.createInputFile(cluster, inputFileName, new String[]
             {"1\n2\n3\n4\n5\n1\n2\n3\n4\n5\n"});
-        PigServer pigServer = new PigServer(cluster.getExecType(), cluster.getProperties());
+
+        Properties copyproperties = new Properties();
+        copyproperties.putAll(cluster.getProperties());
+        PigServer pigServer = new PigServer(cluster.getExecType(), copyproperties);
         // running with two mappers
         pigServer.getPigContext().getProperties().setProperty("mapred.max.split.size", "10");
         pigServer.getPigContext().getProperties().setProperty("pig.noSplitCombination", "true");
@@ -3290,6 +3297,7 @@ public class TestBuiltin {
         for( int i = 0; i < 5; i++ ){
             assertNotEquals(mapper1[i], mapper2[i], 0.0001);
         }
+        Util.deleteFile(cluster, inputFileName);
     }
 
 



Mime
View raw message