pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1605272 - in /pig/trunk: CHANGES.txt test/org/apache/pig/impl/streaming/TestPigStreamingUDF.java test/org/apache/pig/test/TestPigStreaming.java
Date Wed, 25 Jun 2014 05:55:30 GMT
Author: daijy
Date: Wed Jun 25 05:55:30 2014
New Revision: 1605272

URL: http://svn.apache.org/r1605272
Log:
PIG-4024: TestPigStreamingUDF and TestPigStreaming fail on IBM JDK

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/test/org/apache/pig/impl/streaming/TestPigStreamingUDF.java
    pig/trunk/test/org/apache/pig/test/TestPigStreaming.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1605272&r1=1605271&r2=1605272&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Wed Jun 25 05:55:30 2014
@@ -40,6 +40,8 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-4024: TestPigStreamingUDF and TestPigStreaming fail on IBM JDK (ahireanup via daijy)
+
 PIG-4023: BigDec/Int sort is broken (ahireanup via daijy)
 
 PIG-4003: Error is thrown by JobStats.getOutputSize() when storing to a Hive table (cheolsoo)

Modified: pig/trunk/test/org/apache/pig/impl/streaming/TestPigStreamingUDF.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/impl/streaming/TestPigStreamingUDF.java?rev=1605272&r1=1605271&r2=1605272&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/impl/streaming/TestPigStreamingUDF.java (original)
+++ pig/trunk/test/org/apache/pig/impl/streaming/TestPigStreamingUDF.java Wed Jun 25 05:55:30
2014
@@ -19,7 +19,7 @@ package org.apache.pig.impl.streaming;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.TreeMap;
 import java.util.List;
 import java.util.Map;
 
@@ -159,7 +159,7 @@ public class TestPigStreamingUDF {
     @Test
     public void testSerialize__map() throws IOException {
         Tuple t =tf.newTuple(1);
-        Map<String, String> m = new HashMap<String, String>();
+        Map<String, String> m = new TreeMap<String, String>();
         m.put("A", "B");
         m.put("C", "D");
         t.set(0,m);
@@ -170,16 +170,16 @@ public class TestPigStreamingUDF {
     @Test
     public void testSerialize__complex_map() throws IOException {
         Tuple t = tf.newTuple(1);
-        Map<String, Object> inner_map = new HashMap<String, Object>();
+        Map<String, Object> inner_map = new TreeMap<String, Object>();
         inner_map.put("A", 1);
         inner_map.put("B", "E");
         
-        Map<String, Object> outer_map = new HashMap<String, Object>();
+        Map<String, Object> outer_map = new TreeMap<String, Object>();
         outer_map.put("C", "F");
         outer_map.put("D", inner_map);
         
         t.set(0,outer_map);
-        byte[] expectedOutput = "|[_CD#|[_CA#I1|,_CB#CE|]_|,_CC#CF|]_|_\n".getBytes();
+        byte[] expectedOutput = "|[_CC#CF|,_CD#|[_CA#I1|,_CB#CE|]_|]_|_\n".getBytes();
         Assert.assertTrue(assertEquals(expectedOutput, ps.serializeToBytes(t)));
     }
 
@@ -360,7 +360,7 @@ public class TestPigStreamingUDF {
         PigStreamingUDF sp = new PigStreamingUDF(fs);
 
         
-        Map<String, String> expectedOutput = new HashMap<String, String>();
+        Map<String, String> expectedOutput = new TreeMap<String, String>();
         expectedOutput.put("A", "B");
         expectedOutput.put("C", "D");        
         

Modified: pig/trunk/test/org/apache/pig/test/TestPigStreaming.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestPigStreaming.java?rev=1605272&r1=1605271&r2=1605272&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestPigStreaming.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestPigStreaming.java Wed Jun 25 05:55:30 2014
@@ -20,7 +20,7 @@ package org.apache.pig.test;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.TreeMap;
 import java.util.List;
 import java.util.Map;
 
@@ -135,7 +135,7 @@ public class TestPigStreaming extends Te
     @Test
     public void testSerialize__map() throws IOException {
         Tuple t = tf.newTuple(1);
-        Map<String, String> m = new HashMap<String, String>();
+        Map<String, String> m = new TreeMap<String, String>();
         m.put("A", "B");
         m.put("C", "D");
         t.set(0,m);
@@ -147,16 +147,16 @@ public class TestPigStreaming extends Te
     @Test
     public void testSerialize__complex_map() throws IOException {
         Tuple t = tf.newTuple(1);
-        Map<String, Object> inner_map = new HashMap<String, Object>();
+        Map<String, Object> inner_map = new TreeMap<String, Object>();
         inner_map.put("A", 1);
         inner_map.put("B", "E");
         
-        Map<String, Object> outer_map = new HashMap<String, Object>();
+        Map<String, Object> outer_map = new TreeMap<String, Object>();
         outer_map.put("C", "F");
         outer_map.put("D", inner_map);
         
         t.set(0,outer_map);
-        byte[] expectedOutput = "[D#[A#1,B#E],C#F]\n".getBytes();
+        byte[] expectedOutput = "[C#F,D#[A#1,B#E]]\n".getBytes();
         byte[] output = ps.serialize(t);
         Assert.assertArrayEquals(expectedOutput, output);
     }



Mime
View raw message