pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (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 Sat, 19 May 2012 07:44:12 GMT

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

Ashutosh Chauhan commented on PIG-2699:
---------------------------------------

+1 thanks for doing this Julien! I was waiting since ages for someone to pick up this tricky
but highly useful refactoring n cleanup.
                
> 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)
> Loader[1].setUDFContextSignature(1-0)
> Loader[1].getSchema(foo, org.apache.hadoop.mapreduce.Job@5773ec72)
> Storer[1].<init>()
> Storer[1].setStoreFuncUDFContextSignature(1-1)
> Storer[1].relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
> Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@337ec9f7)
> Storer[1].getOutputFormat()
> Loader[1].getStatistics(foo, org.apache.hadoop.mapreduce.Job@6b552b76)
> Loader[1].setLocation(foo, org.apache.hadoop.mapreduce.Job@6b552b76)
> Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@49a5af9f)
> Storer[2].<init>()
> Storer[2].setStoreFuncUDFContextSignature(1-1)
> Storer[2].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@3823bdd1)
> Storer[2].getOutputFormat()
> Loader[2].<init>()
> Loader[2].setUDFContextSignature(1-0)
> Loader[2].setLocation(foo, org.apache.hadoop.mapreduce.Job@7d0c3a08)
> Loader[2].getInputFormat()
> Storer[3].<init>()
> Storer[3].setStoreFuncUDFContextSignature(1-1)
> Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@1badd463)
> Storer[3].getOutputFormat()
> Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@52cab854)
> Loader[3].<init>()
> Loader[3].setUDFContextSignature(1-0)
> Loader[3].setLocation(foo, org.apache.hadoop.mapreduce.Job@5d684e26)
> Loader[3].getInputFormat()
> Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@4a2af8f5)
> Storer[3].getOutputFormat()
> Storer[3].prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@56b61c3)
> Loader[3].setUDFContextSignature(1-0)
> Loader[3].prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@57f5b4d1,
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@3d80a8b7)
> Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@21f11507)
> Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@52e3fda4)
> constructor calls:
> Loader[1].<init> called by 
> org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
> org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:426)
> 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:480)
> 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.hadoop20.PigJobControl.mainLoopAction(PigJobControl.java:157)
> org.apache.pig.backend.hadoop20.PigJobControl.run(PigJobControl.java:134)
> 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.hadoop20.PigJobControl.mainLoopAction(PigJobControl.java:157)
> org.apache.pig.backend.hadoop20.PigJobControl.run(PigJobControl.java:134)
> 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