incubator-crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject [5/9] git commit: Always use the ReflectDatumReader for reflect Avro
Date Wed, 22 Aug 2012 06:26:48 GMT
Always use the ReflectDatumReader for reflect Avro

Use the ReflectDatumReader if reflect data is included in an
Avro PType, regardless of whether specific data is included

Signed-off-by: Josh Wills <jwills@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/dfe70ca9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/dfe70ca9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/dfe70ca9

Branch: refs/heads/master
Commit: dfe70ca96f120659b89f6ad961fcbf4340deb942
Parents: 89e58b3
Author: Gabriel Reid <gabriel.reid@gmail.com>
Authored: Tue Aug 21 20:38:19 2012 +0200
Committer: Josh Wills <jwills@cloudera.com>
Committed: Tue Aug 21 18:54:29 2012 -0700

----------------------------------------------------------------------
 .../crunch/types/avro/AvroGroupedTableType.java    |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/dfe70ca9/crunch/src/main/java/org/apache/crunch/types/avro/AvroGroupedTableType.java
----------------------------------------------------------------------
diff --git a/crunch/src/main/java/org/apache/crunch/types/avro/AvroGroupedTableType.java b/crunch/src/main/java/org/apache/crunch/types/avro/AvroGroupedTableType.java
index e15581d..ab68e71 100644
--- a/crunch/src/main/java/org/apache/crunch/types/avro/AvroGroupedTableType.java
+++ b/crunch/src/main/java/org/apache/crunch/types/avro/AvroGroupedTableType.java
@@ -85,9 +85,8 @@ public class AvroGroupedTableType<K, V> extends PGroupedTableType<K,
V> {
     if (att.hasReflect()) {
       if (att.hasSpecific()) {
         Avros.checkCombiningSpecificAndReflectionSchemas();
-      } else {
-        conf.setBoolean(AvroJob.MAP_OUTPUT_IS_REFLECT, true);
       }
+      conf.setBoolean(AvroJob.MAP_OUTPUT_IS_REFLECT, true);
     }
     conf.set(AvroJob.MAP_OUTPUT_SCHEMA, schemaJson);
     job.setSortComparatorClass(AvroKeyComparator.class);
@@ -99,7 +98,8 @@ public class AvroGroupedTableType<K, V> extends PGroupedTableType<K,
V> {
 
     Avros.configureReflectDataFactory(conf);
 
-    Collection<String> serializations = job.getConfiguration().getStringCollection("io.serializations");
+    Collection<String> serializations = job.getConfiguration().getStringCollection(
+        "io.serializations");
     if (!serializations.contains(SafeAvroSerialization.class.getName())) {
       serializations.add(SafeAvroSerialization.class.getName());
       job.getConfiguration().setStrings("io.serializations", serializations.toArray(new String[0]));


Mime
View raw message