You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2014/08/06 23:53:13 UTC

svn commit: r1616362 - in /pig/trunk: CHANGES.txt test/org/apache/pig/builtin/TestAvroStorage.java

Author: daijy
Date: Wed Aug  6 21:53:13 2014
New Revision: 1616362

URL: http://svn.apache.org/r1616362
Log:
PIG-4105: Fix TestAvroStorage with ibm jdk

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/test/org/apache/pig/builtin/TestAvroStorage.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1616362&r1=1616361&r2=1616362&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Wed Aug  6 21:53:13 2014
@@ -56,6 +56,8 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-4105: Fix TestAvroStorage with ibm jdk (fang fang chen via daijy)
+
 PIG-4108: Pig -Dhadoopversion=23 compile fail after TEZ-1317 (daijy)
 
 PIG-4086: Fix Orc e2e tests for tez (daijy)

Modified: pig/trunk/test/org/apache/pig/builtin/TestAvroStorage.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/builtin/TestAvroStorage.java?rev=1616362&r1=1616361&r2=1616362&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/builtin/TestAvroStorage.java (original)
+++ pig/trunk/test/org/apache/pig/builtin/TestAvroStorage.java Wed Aug  6 21:53:13 2014
@@ -40,6 +40,7 @@ import org.apache.pig.backend.executione
 import org.apache.pig.backend.executionengine.ExecJob.JOB_STATUS;
 import org.apache.pig.builtin.mock.Storage.Data;
 import org.apache.pig.data.Tuple;
+import org.apache.pig.impl.util.Utils;
 import org.apache.pig.impl.util.avro.AvroBagWrapper;
 import org.apache.pig.impl.util.avro.AvroMapWrapper;
 import org.apache.pig.impl.util.avro.AvroTupleWrapper;
@@ -311,7 +312,15 @@ public class TestAvroStorage {
         if(Util.WINDOWS){
             outbasedir = outbasedir.replace('\\','/');
         }
-        return outbasedir + st[2].getMethodName();
+
+        int index;
+        if (Utils.isVendorIBM()) {
+            index = 3;
+        } else {
+            index = 2;
+        }
+
+        return outbasedir + st[index].getMethodName();
     }
 
     @Test public void testLoadRecords() throws Exception {