Author: rohini
Date: Wed May 31 20:33:56 2017
New Revision: 1797106

URL: http://svn.apache.org/viewvc?rev=1797106&view=rev
Log:
PIG-5248: Fix TestCombiner#testGroupByLimit after PigOnSpark merge (rohini)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/test/org/apache/pig/test/TestCombiner.java
    pig/trunk/test/org/apache/pig/test/Util.java

Modified: pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1797106&r1=1797105&r2=1797106&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Wed May 31 20:33:56 2017
@@ -122,6 +122,8 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-5248: Fix TestCombiner#testGroupByLimit after PigOnSpark merge (rohini)
+
 PIG-5245: TestGrunt.testStopOnFailure is flaky (rohini)
 
 PIG-5244: Several unit tests are failing in Tez mode after merging spark 
branch (nkollar via szita)

Modified: pig/trunk/test/org/apache/pig/test/TestCombiner.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestCombiner.java?rev=1797106&r1=1797105&r2=1797106&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestCombiner.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestCombiner.java Wed May 31 20:33:56 
2017
@@ -40,6 +40,7 @@ import org.apache.pig.data.Tuple;
 import org.apache.pig.impl.PigContext;
 import org.apache.pig.impl.io.FileLocalizer;
 import org.junit.AfterClass;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -372,6 +373,8 @@ public class TestCombiner {
 
     @Test
     public void testGroupByLimit() throws Exception {
+        Assume.assumeFalse("Skip this test for Tez till PIG-5249 is fixed",
+                Util.isTezExecType(cluster.getExecType()));
         // test use of combiner when group elements are accessed in the foreach
         String input[] = {
                         "ABC 1",

Modified: pig/trunk/test/org/apache/pig/test/Util.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/Util.java?rev=1797106&r1=1797105&r2=1797106&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/Util.java (original)
+++ pig/trunk/test/org/apache/pig/test/Util.java Wed May 31 20:33:56 2017
@@ -615,7 +615,7 @@ public class Util {
 
          Assert.assertEquals("Comparing actual and expected results. ",
                  expectedResList, actualResList);
-         
+
     }
 
     /**
@@ -1334,14 +1334,6 @@ public class Util {
         return false;
     }
 
-    public static boolean isSparkExecType(ExecType execType) {
-        if (execType.name().toLowerCase().startsWith("spark")) {
-            return true;
-        }
-
-        return false;
-    }
-
     public static void sortQueryOutputsIfNeed(List<Tuple> actualResList, 
boolean toSort){
         if( toSort == true) {
             for (Tuple t : actualResList) {
@@ -1466,6 +1458,20 @@ public class Util {
         return execType == ExecType.MAPREDUCE;
     }
 
+    public static boolean isTezExecType(ExecType execType) {
+        if (execType.name().toLowerCase().startsWith("tez")) {
+            return true;
+        }
+        return false;
+    }
+
+    public static boolean isSparkExecType(ExecType execType) {
+        if (execType.name().toLowerCase().startsWith("spark")) {
+            return true;
+        }
+        return false;
+    }
+
     public static String findPigJarName() {
         final String suffix = System.getProperty("hadoopversion").equals("20") 
? "1" : "2";
         File baseDir = new File(".");


Reply via email to