You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crunch.apache.org by "Gabriel Reid (JIRA)" <ji...@apache.org> on 2012/09/04 21:50:08 UTC

[jira] [Created] (CRUNCH-55) MemPipeline doesn't correctly initialize PTypes

Gabriel Reid created CRUNCH-55:
----------------------------------

             Summary: MemPipeline doesn't correctly initialize PTypes
                 Key: CRUNCH-55
                 URL: https://issues.apache.org/jira/browse/CRUNCH-55
             Project: Crunch
          Issue Type: Bug
    Affects Versions: 0.3.0, 0.4.0
            Reporter: Gabriel Reid


When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on PCollections. On PTypes that rely on logic in the initialize method, this causes the pipeline to crash.

This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType not being fully set up.

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

[jira] [Commented] (CRUNCH-55) MemPipeline doesn't correctly initialize PTypes MapFns

Posted by "Gabriel Reid (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CRUNCH-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453756#comment-13453756 ] 

Gabriel Reid commented on CRUNCH-55:
------------------------------------

I believe I misreported this issue -- the initialize only needs to be called if the PType is being used for actual reading or writing. Will get a closer look at this one once I'm better connected (I've only got mobile phone connectivity ATM), as this is linked to another issue that I was encountering with writable ptypes. 
                
> MemPipeline doesn't correctly initialize PTypes MapFns
> ------------------------------------------------------
>
>                 Key: CRUNCH-55
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-55
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.3.0, 0.4.0
>            Reporter: Gabriel Reid
>         Attachments: WritableIT.java
>
>
> When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on the MapFns in PTypes. On PTypes MapFns that rely on logic in the initialize method, this causes the pipeline to crash.
> This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType input or output MapFn not being fully set up.

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

[jira] [Updated] (CRUNCH-55) MemPipeline doesn't correctly initialize PTypes MapFns

Posted by "Rahul Sharma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CRUNCH-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rahul Sharma updated CRUNCH-55:
-------------------------------

    Attachment: WritableIT.java

I think this is not just with MemPipeline, MRPipelines also have the same issue. I have attached a testcase that has Ptype doing things in initialize. This one fails for both pipelines.

Can someone tell me if my test case is right ? 
                
> MemPipeline doesn't correctly initialize PTypes MapFns
> ------------------------------------------------------
>
>                 Key: CRUNCH-55
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-55
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.3.0, 0.4.0
>            Reporter: Gabriel Reid
>         Attachments: WritableIT.java
>
>
> When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on the MapFns in PTypes. On PTypes MapFns that rely on logic in the initialize method, this causes the pipeline to crash.
> This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType input or output MapFn not being fully set up.

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

[jira] [Closed] (CRUNCH-55) MemPipeline doesn't correctly initialize PTypes MapFns

Posted by "Gabriel Reid (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CRUNCH-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriel Reid closed CRUNCH-55.
------------------------------

    Resolution: Invalid
      Assignee: Gabriel Reid

Invalid issue, no need to initialize MapFns in PTypes unless they're being used for io
                
> MemPipeline doesn't correctly initialize PTypes MapFns
> ------------------------------------------------------
>
>                 Key: CRUNCH-55
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-55
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.3.0, 0.4.0
>            Reporter: Gabriel Reid
>            Assignee: Gabriel Reid
>         Attachments: WritableIT.java
>
>
> When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on the MapFns in PTypes. On PTypes MapFns that rely on logic in the initialize method, this causes the pipeline to crash.
> This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType input or output MapFn not being fully set up.

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

[jira] [Updated] (CRUNCH-55) MemPipeline doesn't correctly initialize PTypes MapFns

Posted by "Gabriel Reid (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CRUNCH-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriel Reid updated CRUNCH-55:
-------------------------------

    Description: 
When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on the MapFns in PTypes. On PTypes MapFns that rely on logic in the initialize method, this causes the pipeline to crash.

This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType input or output MapFn not being fully set up.

  was:
When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on PCollections. On PTypes that rely on logic in the initialize method, this causes the pipeline to crash.

This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType not being fully set up.

        Summary: MemPipeline doesn't correctly initialize PTypes MapFns  (was: MemPipeline doesn't correctly initialize PTypes)
    
> MemPipeline doesn't correctly initialize PTypes MapFns
> ------------------------------------------------------
>
>                 Key: CRUNCH-55
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-55
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.3.0, 0.4.0
>            Reporter: Gabriel Reid
>
> When a MemPipeline is run, the setContext method (and therefore also the initialize method) is not called on the MapFns in PTypes. On PTypes MapFns that rely on logic in the initialize method, this causes the pipeline to crash.
> This can be shown by using PTable#join with Writable values -- a NullPointerException occurs due to the state of the PType input or output MapFn not being fully set up.

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