You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ying He (JIRA)" <ji...@apache.org> on 2010/02/17 00:47:28 UTC

[jira] Created: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

Accumulator is turned on when a map is used with a non-accumulative UDF
-----------------------------------------------------------------------

                 Key: PIG-1241
                 URL: https://issues.apache.org/jira/browse/PIG-1241
             Project: Pig
          Issue Type: Bug
            Reporter: Ying He


Exception is thrown for a script like the following:

register /homes/yinghe/owl/string.jar;
a = load 'a.txt' as (id, url);
b = group  a by (id, url);
c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
dump c;

In this query, URLPARSE() is not accumulative, and it returns a map. 

The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

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

Daniel Dai closed PIG-1241.
---------------------------


> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Ying He
>            Assignee: Ying He
>             Fix For: 0.7.0
>
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

Posted by "Ying He (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834955#action_12834955 ] 

Ying He commented on PIG-1241:
------------------------------

no, by default it is on.

boolean isAccum = "true".equalsIgnoreCase(pc.getProperties().getProperty("opt.accumulator","true"));

means if "opt.accumulator" is not present, the default value is "true"

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Ying He
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834947#action_12834947 ] 

Olga Natkovich commented on PIG-1241:
-------------------------------------

Ying, I thought that accumlate is on by default but it looks like you are setting it on only if the property is present. Is this true?

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Ying He
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

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

Ying He updated PIG-1241:
-------------------------

    Attachment: accum.patch

patch to check UDF when it's with map operation

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Ying He
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

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

Olga Natkovich updated PIG-1241:
--------------------------------

    Affects Version/s: 0.6.0
        Fix Version/s: 0.7.0
             Assignee: Ying He

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Ying He
>            Assignee: Ying He
>             Fix For: 0.7.0
>
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

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

Olga Natkovich updated PIG-1241:
--------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

patch committed to the trunk. Thanks, Ying

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Ying He
>            Assignee: Ying He
>             Fix For: 0.7.0
>
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834635#action_12834635 ] 

Hadoop QA commented on PIG-1241:
--------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12436056/accum.patch
  against trunk revision 909921.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 6 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/212/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/212/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/212/console

This message is automatically generated.

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Ying He
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-1241) Accumulator is turned on when a map is used with a non-accumulative UDF

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

Ying He updated PIG-1241:
-------------------------

    Status: Patch Available  (was: Open)

> Accumulator is turned on when a map is used with a non-accumulative UDF
> -----------------------------------------------------------------------
>
>                 Key: PIG-1241
>                 URL: https://issues.apache.org/jira/browse/PIG-1241
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Ying He
>         Attachments: accum.patch
>
>
> Exception is thrown for a script like the following:
> register /homes/yinghe/owl/string.jar;
> a = load 'a.txt' as (id, url);
> b = group  a by (id, url);
> c = foreach b generate  COUNT(a), (CHARARRAY) string.URLPARSE(group.url)#'url';
> dump c;
> In this query, URLPARSE() is not accumulative, and it returns a map. 
> The accumulator optimizer failed to check UDF in this case, and tries to run the job in accumulative mode. ClassCastException is thrown when trying to cast UDF into Accumulator interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.