incubator-crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Friedrich (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CRUNCH-106) StringConcatAggregator doesn't reset its state
Date Sat, 03 Nov 2012 16:31:12 GMT

     [ https://issues.apache.org/jira/browse/CRUNCH-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matthias Friedrich updated CRUNCH-106:
--------------------------------------

    Attachment: 0001-CRUNCH-106-Fix-data-loss-in-CombineFn.patch

Here's a quick fix. Please review, I'd like to get it into the 0.4.0 release.

BTW, I think the aggregator would be better off with a StringBuilder. Linked lists may look
better in O calculus, but in real life (and Java) they perform quite poorly due to memory
management overhead.
                
> StringConcatAggregator doesn't reset its state
> ----------------------------------------------
>
>                 Key: CRUNCH-106
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-106
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Matthias Friedrich
>            Assignee: Matthias Friedrich
>            Priority: Critical
>             Fix For: 0.4.0
>
>         Attachments: 0001-CRUNCH-106-Fix-data-loss-in-CombineFn.patch
>
>
> StringConcatAggregator doesn't handle its length counter correctly when a limit to the
output string is set. This results in data loss: After the limit has been reached for the
first time, all subsequent data will be dropped silently. To fix this, the aggregator has
to re-initialize the counter when reset() is called.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message