You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crunch.apache.org by "Matthias Friedrich (JIRA)" <ji...@apache.org> on 2012/11/03 17:31:12 UTC
[jira] [Updated] (CRUNCH-106) StringConcatAggregator doesn't reset
its state
[ 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