You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crunch.apache.org by tz...@apache.org on 2012/06/28 18:47:38 UTC
git commit: Update to Avro 1.7.0 - resolves the ClassCastException
issue: https://issues.apache.org/jira/browse/AVRO-1046
Updated Branches:
refs/heads/master 1d020be25 -> 76c501568
Update to Avro 1.7.0 - resolves the ClassCastException issue: https://issues.apache.org/jira/browse/AVRO-1046
Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/76c50156
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/76c50156
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/76c50156
Branch: refs/heads/master
Commit: 76c5015687a2e97d55bd95e0715fe900adc78084
Parents: 1d020be
Author: Christian Tzolov <ch...@gmail.com>
Authored: Thu Jun 28 18:47:10 2012 +0200
Committer: Christian Tzolov <ch...@gmail.com>
Committed: Thu Jun 28 18:47:10 2012 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
.../crunch/lib/SpecificAvroGroupByTest.java | 30 +++++++--------
2 files changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/76c50156/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a2936c3..0f50778 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <avro.version>1.6.3</avro.version>
+ <avro.version>1.7.0</avro.version>
<hadoop.version>0.20.2-cdh3u4</hadoop.version>
<hbase.version>0.90.6-cdh3u4</hbase.version>
</properties>
http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/76c50156/src/test/java/com/cloudera/crunch/lib/SpecificAvroGroupByTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/cloudera/crunch/lib/SpecificAvroGroupByTest.java b/src/test/java/com/cloudera/crunch/lib/SpecificAvroGroupByTest.java
index 3b6082e..ef889ab 100644
--- a/src/test/java/com/cloudera/crunch/lib/SpecificAvroGroupByTest.java
+++ b/src/test/java/com/cloudera/crunch/lib/SpecificAvroGroupByTest.java
@@ -68,22 +68,20 @@ public class SpecificAvroGroupByTest implements Serializable {
testSpecificAvro(pipeline);
}
- @Test(expected = Exception.class)
- public void testGrouByOnSpecificAvroButReflectionDatumReader()
- throws Exception {
- MRPipeline pipeline = new MRPipeline(SpecificAvroGroupByTest.class);
-
- // Simulate the old (pre-fix) AvroSerializer implementation which
- // creates ReflectDatumReader even for specific Avro types. This leads
- // to:
- // java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to
- // java.util.List
- // at com.cloudera.crunch.test.Person.put(Person.java:49)
- pipeline.getConfiguration().setBoolean(AvroJob.MAP_OUTPUT_IS_REFLECT,
- true);
-
- testSpecificAvro(pipeline);
- }
+ @Test
+ public void testGrouByOnSpecificAvroButReflectionDatumReader()
+ throws Exception {
+ MRPipeline pipeline = new MRPipeline(SpecificAvroGroupByTest.class);
+
+ // https://issues.apache.org/jira/browse/AVRO-1046 resolves
+ // the ClassCastException when reading specific Avro types with
+ // ReflectDatumReader
+
+ pipeline.getConfiguration().setBoolean(AvroJob.MAP_OUTPUT_IS_REFLECT,
+ true);
+
+ testSpecificAvro(pipeline);
+ }
public void testSpecificAvro(MRPipeline pipeline) throws Exception {