hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1176485 - in /hadoop/common/branches/branch-0.22/common: ./ ivy/ src/java/org/apache/hadoop/io/serializer/avro/ src/java/org/apache/hadoop/ipc/ src/test/core/org/apache/hadoop/io/ src/test/core/org/apache/hadoop/ipc/
Date Tue, 27 Sep 2011 17:36:29 GMT
Author: shv
Date: Tue Sep 27 17:36:28 2011
New Revision: 1176485

URL: http://svn.apache.org/viewvc?rev=1176485&view=rev
Log:
HADOOP-7646. Upgrade to Avro 1.5.3. Contributed by Joep Rottinghuis.

Modified:
    hadoop/common/branches/branch-0.22/common/CHANGES.txt
    hadoop/common/branches/branch-0.22/common/build.xml
    hadoop/common/branches/branch-0.22/common/ivy.xml
    hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-instrumented-template.xml
    hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-template.xml
    hadoop/common/branches/branch-0.22/common/ivy/libraries.properties
    hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/io/serializer/avro/AvroSerialization.java
    hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroRpcEngine.java
    hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroSpecificRpcEngine.java
    hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/io/AvroTestUtil.java
    hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/AvroTestProtocol.java
    hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/TestAvroRpc.java

Modified: hadoop/common/branches/branch-0.22/common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/CHANGES.txt?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/common/CHANGES.txt Tue Sep 27 17:36:28 2011
@@ -266,6 +266,8 @@ Release 0.22.0 - Unreleased
     HADOOP-7298. Add test utility for writing multi-threaded tests. (todd and
     Harsh J Chouraria via todd)
 
+    HADOOP-7646. Upgrade to Avro 1.5.3. (Joep Rottinghuis via shv)
+
   OPTIMIZATIONS
 
     HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

Modified: hadoop/common/branches/branch-0.22/common/build.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/build.xml?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/build.xml (original)
+++ hadoop/common/branches/branch-0.22/common/build.xml Tue Sep 27 17:36:28 2011
@@ -498,7 +498,7 @@
   </target>
 
   <target name="generate-avro-records" depends="init, ivy-retrieve-test">
-    <taskdef name="schema" classname="org.apache.avro.specific.SchemaTask">
+    <taskdef name="schema" classname="org.apache.avro.compiler.specific.SchemaTask">
       <classpath refid="test.classpath"/>
     </taskdef>
     <schema destdir="${test.generated.dir}">
@@ -509,7 +509,7 @@
   </target>
 
   <target name="generate-avro-protocols" depends="init, ivy-retrieve-test">
-    <taskdef name="schema" classname="org.apache.avro.specific.ProtocolTask">
+    <taskdef name="schema" classname="org.apache.avro.compiler.specific.ProtocolTask">
       <classpath refid="test.classpath"/>
     </taskdef>
     <schema destdir="${test.generated.dir}">

Modified: hadoop/common/branches/branch-0.22/common/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/ivy.xml?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/ivy.xml (original)
+++ hadoop/common/branches/branch-0.22/common/ivy.xml Tue Sep 27 17:36:28 2011
@@ -261,14 +261,24 @@
       rev="${slf4j-log4j12.version}"
       conf="common->master">
     </dependency>
-    <dependency org="org.apache.hadoop"
+    <dependency org="org.apache.avro"
       name="avro"
       rev="${avro.version}"
       conf="common->default">
+    </dependency>
+    <dependency org="org.apache.avro"
+      name="avro-compiler"
+      rev="${avro.version}"
+      conf="common->default">
+    </dependency>
+     <dependency org="org.apache.avro"
+      name="avro-ipc"
+      rev="${avro.version}"
+      conf="common->default">
       <exclude module="ant"/>
       <exclude module="jetty"/>
       <exclude module="slf4j-simple"/>
-    </dependency>
+    </dependency>    
     <dependency org="org.codehaus.jackson"
       name="jackson-mapper-asl"
       rev="${jackson.version}"

Modified: hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-instrumented-template.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-instrumented-template.xml?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-instrumented-template.xml
(original)
+++ hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-instrumented-template.xml
Tue Sep 27 17:36:28 2011
@@ -119,9 +119,14 @@
       <version>2.0.8</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
+      <groupId>org.apache.avro</groupId>
       <artifactId>avro</artifactId>
-      <version>1.3.2</version>
+      <version>1.5.3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.avro</groupId>
+      <artifactId>avro-ipc</artifactId>
+      <version>1.5.3</version>
       <exclusions>
         <exclusion>
           <!-- Don't pull in Avro's (later) version of Jetty.-->

Modified: hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-template.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-template.xml?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-template.xml (original)
+++ hadoop/common/branches/branch-0.22/common/ivy/hadoop-common-template.xml Tue Sep 27 17:36:28
2011
@@ -119,9 +119,14 @@
       <version>2.0.8</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
+      <groupId>org.apache.avro</groupId>
       <artifactId>avro</artifactId>
-      <version>1.3.2</version>
+      <version>1.5.3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.avro</groupId>
+      <artifactId>avro-ipc</artifactId>
+      <version>1.5.3</version>
       <exclusions>
         <exclusion>
           <!-- Don't pull in Avro's (later) version of Jetty.-->

Modified: hadoop/common/branches/branch-0.22/common/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/ivy/libraries.properties?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/ivy/libraries.properties (original)
+++ hadoop/common/branches/branch-0.22/common/ivy/libraries.properties Tue Sep 27 17:36:28
2011
@@ -16,7 +16,7 @@
 #These are the versions of our dependencies (in alphabetical order)
 ant-task.version=2.0.10
 
-avro.version=1.3.2
+avro.version=1.5.3
 
 checkstyle.version=4.2
 
@@ -64,6 +64,8 @@ mina-core.version=2.0.0-M5
 
 oro.version=2.0.8
 
+paranamer.version=2.3
+
 rats-lib.version=0.6
 
 servlet.version=4.0.6

Modified: hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/io/serializer/avro/AvroSerialization.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/io/serializer/avro/AvroSerialization.java?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/io/serializer/avro/AvroSerialization.java
(original)
+++ hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/io/serializer/avro/AvroSerialization.java
Tue Sep 27 17:36:28 2011
@@ -28,6 +28,7 @@ import org.apache.avro.io.BinaryEncoder;
 import org.apache.avro.io.DatumReader;
 import org.apache.avro.io.DatumWriter;
 import org.apache.avro.io.DecoderFactory;
+import org.apache.avro.io.EncoderFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configured;
@@ -93,7 +94,7 @@ public abstract class AvroSerialization<
     @Override
     public void open(OutputStream out) throws IOException {
       outStream = out;
-      encoder = new BinaryEncoder(out);
+      encoder = EncoderFactory.get().binaryEncoder(out, null);
     }
 
     @Override

Modified: hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroRpcEngine.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroRpcEngine.java?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroRpcEngine.java
(original)
+++ hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroRpcEngine.java
Tue Sep 27 17:36:28 2011
@@ -34,9 +34,9 @@ import javax.net.SocketFactory;
 
 import org.apache.avro.ipc.Responder;
 import org.apache.avro.ipc.Transceiver;
-import org.apache.avro.reflect.ReflectRequestor;
-import org.apache.avro.reflect.ReflectResponder;
-import org.apache.avro.specific.SpecificRequestor;
+import org.apache.avro.ipc.reflect.ReflectRequestor;
+import org.apache.avro.ipc.reflect.ReflectResponder;
+import org.apache.avro.ipc.specific.SpecificRequestor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceStability;

Modified: hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroSpecificRpcEngine.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroSpecificRpcEngine.java?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroSpecificRpcEngine.java
(original)
+++ hadoop/common/branches/branch-0.22/common/src/java/org/apache/hadoop/ipc/AvroSpecificRpcEngine.java
Tue Sep 27 17:36:28 2011
@@ -22,8 +22,8 @@ import java.io.IOException;
 
 import org.apache.avro.ipc.Responder;
 import org.apache.avro.ipc.Transceiver;
-import org.apache.avro.specific.SpecificRequestor;
-import org.apache.avro.specific.SpecificResponder;
+import org.apache.avro.ipc.specific.SpecificRequestor;
+import org.apache.avro.ipc.specific.SpecificResponder;
 import org.apache.hadoop.classification.InterfaceStability;
 
 /**

Modified: hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/io/AvroTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/io/AvroTestUtil.java?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/io/AvroTestUtil.java
(original)
+++ hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/io/AvroTestUtil.java
Tue Sep 27 17:36:28 2011
@@ -18,18 +18,18 @@
 
 package org.apache.hadoop.io;
 
-import java.io.IOException;
+import static junit.framework.Assert.assertEquals;
+
 import java.io.ByteArrayOutputStream;
 import java.lang.reflect.Type;
 
 import org.apache.avro.Schema;
+import org.apache.avro.Schema.Parser;
+import org.apache.avro.io.DecoderFactory;
+import org.apache.avro.io.EncoderFactory;
 import org.apache.avro.reflect.ReflectData;
-import org.apache.avro.reflect.ReflectDatumWriter;
 import org.apache.avro.reflect.ReflectDatumReader;
-import org.apache.avro.io.BinaryEncoder;
-import org.apache.avro.io.DecoderFactory;
-
-import static junit.framework.TestCase.assertEquals;
+import org.apache.avro.reflect.ReflectDatumWriter;
 
 public class AvroTestUtil {
 
@@ -42,15 +42,15 @@ public class AvroTestUtil {
 
     // check that schema matches expected
     Schema s = ReflectData.get().getSchema(type);
-    assertEquals(Schema.parse(schema), s);
+    assertEquals(new Parser().parse(schema), s);
 
     // check that value is serialized correctly
     ReflectDatumWriter<Object> writer = new ReflectDatumWriter<Object>(s);
     ByteArrayOutputStream out = new ByteArrayOutputStream();
-    writer.write(value, new BinaryEncoder(out));
+    writer.write(value, EncoderFactory.get().binaryEncoder(out, null));
     ReflectDatumReader<Object> reader = new ReflectDatumReader<Object>(s);
     Object after =
-      reader.read(null, DecoderFactory.defaultFactory().createBinaryDecoder(
+      reader.read(null, DecoderFactory.get().binaryDecoder(
           out.toByteArray(), null));
     assertEquals(value, after);
   }

Modified: hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/AvroTestProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/AvroTestProtocol.java?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/AvroTestProtocol.java
(original)
+++ hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/AvroTestProtocol.java
Tue Sep 27 17:36:28 2011
@@ -18,7 +18,7 @@
 
 package org.apache.hadoop.ipc;
 
-import org.apache.avro.ipc.AvroRemoteException;
+import org.apache.avro.AvroRemoteException;
 
 @SuppressWarnings("serial")
 public interface AvroTestProtocol {

Modified: hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/TestAvroRpc.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/TestAvroRpc.java?rev=1176485&r1=1176484&r2=1176485&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/TestAvroRpc.java
(original)
+++ hadoop/common/branches/branch-0.22/common/src/test/core/org/apache/hadoop/ipc/TestAvroRpc.java
Tue Sep 27 17:36:28 2011
@@ -22,7 +22,7 @@ import java.net.InetSocketAddress;
 
 import junit.framework.TestCase;
 
-import org.apache.avro.ipc.AvroRemoteException;
+import org.apache.avro.AvroRemoteException;
 import org.apache.avro.util.Utf8;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -109,7 +109,7 @@ public class TestAvroRpc extends TestCas
         (AvroSpecificTestProtocol)RPC.getProxy(AvroSpecificTestProtocol.class, 
             0, addr, conf);
       
-      Utf8 echo = proxy.echo(new Utf8("hello world"));
+      CharSequence echo = proxy.echo("hello world");
       assertEquals("hello world", echo.toString());
 
       int intResult = proxy.add(1, 2);
@@ -129,7 +129,7 @@ public class TestAvroRpc extends TestCas
     }
 
     @Override
-    public Utf8 echo(Utf8 msg) throws AvroRemoteException {
+    public CharSequence echo(CharSequence msg) throws AvroRemoteException {
       return msg;
     }
     



Mime
View raw message