You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by yu...@apache.org on 2015/06/22 17:54:16 UTC
[09/17] incubator-reef git commit: Fix the error from using the wrong
codec
Fix the error from using the wrong codec
Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/01d0dff8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/01d0dff8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/01d0dff8
Branch: refs/heads/REEF-395
Commit: 01d0dff856a783f9eced249b8ac9ae448b59457c
Parents: 09ea37b
Author: Yunseong Lee <yu...@apache.org>
Authored: Mon Jun 22 12:18:41 2015 +0900
Committer: Yunseong Lee <yu...@apache.org>
Committed: Mon Jun 22 12:18:45 2015 +0900
----------------------------------------------------------------------
.../apache/reef/tang/formats/AvroClassHierarchySerializer.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/01d0dff8/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
----------------------------------------------------------------------
diff --git a/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java b/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
index 282314e..f096021 100644
--- a/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
+++ b/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
@@ -184,10 +184,10 @@ public class AvroClassHierarchySerializer implements ClassHierarchySerializer {
@Override
public String toString(final ClassHierarchy classHierarchy) throws IOException {
- final DatumWriter<AvroNode> configurationWriter = new SpecificDatumWriter<>(AvroNode.class);
+ final DatumWriter<AvroNode> classHierarchyWriter = new SpecificDatumWriter<>(AvroNode.class);
try (final ByteArrayOutputStream out = new ByteArrayOutputStream()) {
- final JsonEncoder encoder = EncoderFactory.get().jsonEncoder(AvroConfiguration.SCHEMA$, out);
- configurationWriter.write(toAvro(classHierarchy), encoder);
+ final JsonEncoder encoder = EncoderFactory.get().jsonEncoder(AvroNode.SCHEMA$, out);
+ classHierarchyWriter.write(toAvro(classHierarchy), encoder);
encoder.flush();
out.flush();
return out.toString(JSON_CHARSET);