gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-361) AvroUtils.deepClonePersistent needs to flush BinaryEncoder
Date Wed, 30 Jul 2014 04:11:38 GMT

    [ https://issues.apache.org/jira/browse/GORA-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14078861#comment-14078861
] 

Hudson commented on GORA-361:
-----------------------------

SUCCESS: Integrated in gora-trunk #1156 (See [https://builds.apache.org/job/gora-trunk/1156/])
GORA-361 AvroUtils.deepClonePersistent needs to flush BinaryEncoder | patch by Gerhard Gossen
(henry.saputra: rev 86d8f8f13afd91536e8063badf3cf61281ae1354)
* gora-core/src/main/java/org/apache/gora/util/AvroUtils.java
* CHANGES.txt
* gora-core/src/test/java/org/apache/gora/util/TestAvroUtils.java


> AvroUtils.deepClonePersistent needs to flush BinaryEncoder
> ----------------------------------------------------------
>
>                 Key: GORA-361
>                 URL: https://issues.apache.org/jira/browse/GORA-361
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: gora-core
>    Affects Versions: 0.4
>            Reporter: Gerhard Gossen
>            Assignee: Gerhard Gossen
>             Fix For: 0.5
>
>         Attachments: GORA-361.patch
>
>
> Calling AvroUtils.deepClonePersistent on a smallish object (e.g. an unfetched Nutch WebPage)
results in the following exception:
> {code:java}
> java.lang.RuntimeException: Unable to deserialize avro object from byte buffer - please
report this issue to the Gora bugtracker or your administrator.
>         at org.apache.gora.util.AvroUtils.deepClonePersistent(AvroUtils.java:125)
> {code}
> The method clones its argument by writing it to a wrapped byte array and deserializing
it from there. However, the output is buffered in the BinaryEncoder and doesn't appear in
the OutputStream. Adding {{enc.flush()}} after {{writer.write}} seems to fix the bug.
> The attached patch contains a test that demonstrates the bug.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message