pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1368343 - in /pig/trunk: CHANGES.txt contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigAvroDatumWriter.java
Date Thu, 02 Aug 2012 02:42:14 GMT
Author: sms
Date: Thu Aug  2 02:42:14 2012
New Revision: 1368343

URL: http://svn.apache.org/viewvc?rev=1368343&view=rev
Log:
PIG-2854 AvroStorage doesn't work with Avro 1.7.1 (cheolsoo via sms)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigAvroDatumWriter.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1368343&r1=1368342&r2=1368343&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Thu Aug  2 02:42:14 2012
@@ -24,6 +24,8 @@ INCOMPATIBLE CHANGES
 
 IMPROVEMENTS
 
+PIG-2854 AvroStorage doesn't work with Avro 1.7.1 (cheolsoo via sms)
+
 PIG-2779: Refactoring the code for setting number of reducers (jay23jack via billgraham)
 
 PIG-2765: Implementing RollupDimensions UDF and adding ROLLUP clause in CUBE operator (prasanth_j
via dvryaboy)

Modified: pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigAvroDatumWriter.java
URL: http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigAvroDatumWriter.java?rev=1368343&r1=1368342&r2=1368343&view=diff
==============================================================================
--- pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigAvroDatumWriter.java
(original)
+++ pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/avro/PigAvroDatumWriter.java
Thu Aug  2 02:42:14 2012
@@ -108,7 +108,7 @@ public class PigAvroDatumWriter extends 
      */
     protected void writeUnion(Schema schema, Object datum, Encoder out)
                                     throws IOException {
-        int index = resolveUnion(schema, datum);
+        int index = resolveUnionSchema(schema, datum);
         out.writeIndex(index);
         write(schema.getTypes().get(index), datum, out);
     }
@@ -116,7 +116,7 @@ public class PigAvroDatumWriter extends 
     /**
      * Called to resolve union. 
      */
-    protected int resolveUnion(Schema union, Object datum) throws IOException {
+    protected int resolveUnionSchema(Schema union, Object datum) throws IOException {
         int i = 0;
         for (Schema type : union.getTypes()) {
             if (type.getType().equals(Schema.Type.UNION))
@@ -130,7 +130,7 @@ public class PigAvroDatumWriter extends 
 
     /**
      * Recursively check whether "datum" is an instance of "schema" and called 
-     * by {@link #resolveUnion(Schema,Object)},
+     * by {@link #resolveUnionSchema(Schema,Object)},
      * {@link #unwrappedInstanceOf(Schema,Object)}. 
      * 
      */
@@ -156,7 +156,7 @@ public class PigAvroDatumWriter extends 
 
             case UNION:
                 @SuppressWarnings("unused")
-                int index = resolveUnion(schema, datum);
+                int index = resolveUnionSchema(schema, datum);
                 return true;
             case ENUM:
                 return datum instanceof String && schema.hasEnumSymbol(((String)
datum))



Mime
View raw message