pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Le Dem (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PIG-2699) Pig creates too many instances of Load and Store Funcs. It should be 1 in the front-end and 1 in the backend
Date Fri, 18 May 2012 00:25:05 GMT

     [ https://issues.apache.org/jira/browse/PIG-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Julien Le Dem updated PIG-2699:
-------------------------------

    Attachment: PIG-2699_c.patch

PIG-2699_c.patch
* The setContextSignatures methods being called multiple times with different values I changed
the logic so that the signature is unique from the begining and can not be modified.
* I refactored one of the unit test which had a lot of duplication and needed to be modified
to be more stable.
* The getSchema() method was called multiple time because of a caching mechanism that did
not handle null. I changed for a single initialization at the begining.

                
> Pig creates too many instances of Load and Store Funcs. It should be 1 in the front-end
and 1 in the backend
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2699
>                 URL: https://issues.apache.org/jira/browse/PIG-2699
>             Project: Pig
>          Issue Type: Bug
>          Components: internal-udfs
>    Affects Versions: 0.10.0
>            Reporter: Julien Le Dem
>            Assignee: Julien Le Dem
>         Attachments: PIG-2699.patch, PIG-2699_a.patch, PIG-2699_b.patch, PIG-2699_c.patch
>
>
> Attached: a patch to get it down to 3
> Here is the report of the remaining calls.
> some methods are unnecessarily called multiple times, this should be improved as well.
> {noformat}
> A = LOAD 'foo' USING TestLoadStoreFuncLifeCycle$Loader();
> STORE A INTO 'bar' USING TestLoadStoreFuncLifeCycle$Storer();
> report:
> 3 instances of Loader
> 3 instances of Storer
> all calls:
> Loader(1).<init>()
> Loader(1).relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
> Storer(1).<init>()
> Storer(1).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
> Storer(1).relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
> Storer(1).setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@359eda2c)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@67eb366)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@28ab54eb)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@4c53ab04)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@12d56b37)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@27a897a9)
> Storer(1).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@4b1c2b67)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@6126f827)
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@7dc5ddc9)
> Storer(1).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@5773ec72)
> Storer(1).getOutputFormat()
> Loader(1).getSchema(foo, org.apache.hadoop.mapreduce.Job@731d2572)
> Loader(1).getStatistics(foo, org.apache.hadoop.mapreduce.Job@6548f8c8)
> Loader(1).setLocation(foo, org.apache.hadoop.mapreduce.Job@6548f8c8)
> Storer(1).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@10987197)
> Storer(2).<init>()
> Storer(2).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
> Storer(2).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@34883357)
> Storer(2).getOutputFormat()
> Loader(2).<init>()
> Loader(2).setUDFContextSignature(A)
> Loader(2).setLocation(foo, org.apache.hadoop.mapreduce.Job@265a2eaa)
> Loader(2).getInputFormat()
> Storer(3).<init>()
> Storer(3).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
> Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@2d35da43)
> Storer(3).getOutputFormat()
> Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@1f47e668)
> Loader(3).<init>()
> Loader(3).setUDFContextSignature(A)
> Loader(3).setLocation(foo, org.apache.hadoop.mapreduce.Job@6335605a)
> Loader(3).getInputFormat()
> Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@387b1641)
> Storer(3).getOutputFormat()
> Storer(3).prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@40ae97c4)
> Loader(3).setUDFContextSignature(A)
> Loader(3).prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@19195c2b,
Number of splits :1...)
> Loader(3).getNext()
> Storer(3).putNext((a))
> Loader(3).getNext()
> Storer(3).putNext((b))
> Loader(3).getNext()
> Storer(3).putNext((c))
> Loader(3).getNext()
> Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@225f1ae9)
> Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7c34151f)
> Storer(1).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@6762ba99)
> constructor calls:
> Loader(1).<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:422)
> org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3170)
> org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1293)
> org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:791)
> org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:509)
> org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:384)
> org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:175)
> org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1602)
> org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1549)
> org.apache.pig.PigServer.registerQuery(PigServer.java:534)
> org.apache.pig.PigServer.registerQuery(PigServer.java:547)
> Storer(1).<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:478)
> org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6336)
> org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1337)
> org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:791)
> org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:509)
> org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:384)
> org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:175)
> org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1602)
> org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1549)
> org.apache.pig.PigServer.registerQuery(PigServer.java:534)
> org.apache.pig.PigServer.registerQuery(PigServer.java:547)
> Storer(2).<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POStore.getStoreFunc(POStore.java:232)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.setLocation(PigOutputFormat.java:168)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.checkOutputSpecsHelper(PigOutputFormat.java:200)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.checkOutputSpecs(PigOutputFormat.java:187)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:258)
> Loader(2).<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getSplits(PigInputFormat.java:254)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:258)
> Storer(3).<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POStore.getStoreFunc(POStore.java:232)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.getCommitters(PigOutputCommitter.java:84)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputCommitter.<init>(PigOutputCommitter.java:66)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.getOutputCommitter(PigOutputFormat.java:279)
> Loader(3).<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.getLoadFunc(PigInputFormat.java:158)
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.createRecordReader(PigInputFormat.java:106)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message