crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Wills (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRUNCH-142) Context not being passed to FilterFn instances wrapped in boolean AndFn,OrFn,NotFn
Date Mon, 14 Jan 2013 15:42:13 GMT

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

Josh Wills commented on CRUNCH-142:
-----------------------------------

The initialize() calls in the children will get handled by calling setContext on them, but
adding a call to initialize() to the setContext overrides in AndFn, NotFn, and OrFn is a good
idea (even if they probably won't get called.)

An override to cleanup() is unnecessary here IMO, since the contract on FilterFn is like the
contract on MapFn: each record should be handled independently according to a accept-or-not
test condition.
                
> Context not being passed to FilterFn instances wrapped in boolean AndFn,OrFn,NotFn
> ----------------------------------------------------------------------------------
>
>                 Key: CRUNCH-142
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-142
>             Project: Crunch
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.4.0
>            Reporter: Dave Beech
>         Attachments: CRUNCH-142_1.patch, CRUNCH-142.patch
>
>
> The boolean filter classes AndFn, OrFn and NotFn delegate calls to FilterFn instances
internally, but setContext is not called on these first. 
> As a result, methods which need the context such as getCounter() fail with NullPointerException.


--
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