pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohini Palaniswamy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-4913) Reduce jython function initiation during compilation
Date Tue, 31 May 2016 20:05:12 GMT

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

Rohini Palaniswamy commented on PIG-4913:
-----------------------------------------

https://issues.apache.org/jira/browse/PIG-4908?focusedCommentId=15308499&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15308499
can also be addressed as part of this.

> Reduce jython function initiation during compilation
> ----------------------------------------------------
>
>                 Key: PIG-4913
>                 URL: https://issues.apache.org/jira/browse/PIG-4913
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Rohini Palaniswamy
>
> While investigating PIG-4908, saw that ScriptEngine.getScriptAsStream was invoked way
too many times during compilation phase for a simple script.
> {code:title=sleep.py}
> #!/usr/bin/python
> import time;
> @outputSchema("sltime:int")
> def sleep(num):
>     if num == 1:
>         print "Sleeping for %d minutes" % num;
>         time.sleep(num * 60);
>     return num;
> {code}
> {code:title=sleep.pig}
> register 'sleep.py' using jython;
> A = LOAD '/tmp/sleepdata' as (f1:int);
> B = FOREACH A generate $0, sleep($0);
> STORE B into '/tmp/tezout';
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message