Pig
  1. Pig
  2. PIG-2699

Reduce the number of instances of Load and Store Funcs down to 2+1. It should be 1 in the front-end and 1 in the backend

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.11
    • Component/s: internal-udfs
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      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.

      A = LOAD 'foo' USING TestLoadStoreFuncLifeCycle$Loader();
      STORE A INTO 'bar' USING TestLoadStoreFuncLifeCycle$Storer();
      
      
      report:
      3 instances of Loader
      20 calls to Loader
      3 instances of Storer
      24 calls to Storer
      
      all calls:
      Loader[1].<init>()
      Loader[1].relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
      Loader[1].setUDFContextSignature(A_1-0)
      Loader[1].getSchema(foo, org.apache.hadoop.mapreduce.Job@7ee49dcd)
      Storer[1].<init>()
      Storer[1].setStoreFuncUDFContextSignature(A_1-1)
      Storer[1].relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
      Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@776be68f)
      Storer[1].getOutputFormat()
      Loader[1].getStatistics(foo, org.apache.hadoop.mapreduce.Job@11e9c82e)
      Loader[1].setLocation(foo, org.apache.hadoop.mapreduce.Job@11e9c82e)
      Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@57d840cd)
      Storer[2].<init>()
      Storer[2].setStoreFuncUDFContextSignature(A_1-1)
      Storer[2].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@76996cca)
      Storer[2].getOutputFormat()
      Loader[2].<init>()
      Loader[2].setUDFContextSignature(A_1-0)
      Loader[2].setLocation(foo, org.apache.hadoop.mapreduce.Job@317cfd38)
      Loader[2].getInputFormat()
      Storer[3].<init>()
      Storer[3].setStoreFuncUDFContextSignature(A_1-1)
      Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@459d3b3a)
      Storer[3].getOutputFormat()
      Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@225f1ae9)
      Loader[3].<init>()
      Loader[3].setUDFContextSignature(A_1-0)
      Loader[3].setLocation(foo, org.apache.hadoop.mapreduce.Job@6b98e8b4)
      Loader[3].getInputFormat()
      Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@5fb11b79)
      Storer[3].getOutputFormat()
      Storer[3].prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@49b09282)
      Loader[3].setUDFContextSignature(A_1-0)
      Loader[3].prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@2c8c7d6, 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@3ebfbbe3)
      Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@14d964af)
      Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@644ca6b6)
      
      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:486)
      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)
      

      In trunk this was:

      5 instances of Loader
      31 calls to Loader
      6 instances of Storer
      30 calls to Storer
      
      all calls:
      Loader[1].<init>()
      Loader[2].<init>()
      Loader[2].relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk)
      Storer[1].<init>()
      Storer[2].<init>()
      Storer[2].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
      Storer[2].relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk)
      Storer[3].<init>()
      Storer[3].setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
      Loader[3].<init>()
      Loader[3].setUDFContextSignature(A)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@4c349471)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@24c0f1ec)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@900bac2)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@635aed57)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@2d7cec96)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@4b947496)
      Storer[3].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@776be68f)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@560c3014)
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@5773ec72)
      Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@bb273cc)
      Storer[3].getOutputFormat()
      Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@45660d6)
      Loader[3].setLocation(foo, org.apache.hadoop.mapreduce.Job@d2368df)
      Loader[3].getStatistics(foo, org.apache.hadoop.mapreduce.Job@d2368df)
      Storer[4].<init>()
      Storer[4].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
      Storer[4].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@78ff9053)
      Storer[5].<init>()
      Storer[5].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
      Storer[5].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@336d8196)
      Storer[5].getOutputFormat()
      Loader[4].<init>()
      Loader[4].setUDFContextSignature(A)
      Loader[4].setLocation(foo, org.apache.hadoop.mapreduce.Job@61250ff2)
      Loader[4].getInputFormat()
      Storer[6].<init>()
      Storer[6].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
      Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@604788d5)
      Storer[6].getOutputFormat()
      Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7f342545)
      Loader[5].<init>()
      Loader[5].setUDFContextSignature(A)
      Loader[5].setLocation(foo, org.apache.hadoop.mapreduce.Job@459d3b3a)
      Loader[5].getInputFormat()
      Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@795e0c2b)
      Storer[6].getOutputFormat()
      Storer[6].prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@7c34151f)
      Loader[5].setUDFContextSignature(A)
      Loader[5].prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@62114b17, Number of splits :1...)
      Loader[5].getNext()
      Storer[6].putNext((a))
      Loader[5].getNext()
      Storer[6].putNext((b))
      Loader[5].getNext()
      Storer[6].putNext((c))
      Loader[5].getNext()
      Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@bf47ae8)
      Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@4bb7b407)
      Storer[4].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@3cee6ad6)
      
      constructor calls:
      Loader[1].<init> called by 
      org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
      org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
      org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
      org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
      org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3117)
      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)
      Loader[2].<init> called by 
      org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
      org.apache.pig.parser.LogicalPlanBuilder.getAbolutePathForLoad(LogicalPlanBuilder.java:417)
      org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:436)
      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.validateFuncSpec(LogicalPlanBuilder.java:791)
      org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
      org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
      org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6312)
      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.parser.LogicalPlanBuilder.getAbolutePathForStore(LogicalPlanBuilder.java:478)
      org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:499)
      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[3].<init> called by 
      org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
      org.apache.pig.newplan.logical.relational.LOStore.<init>(LOStore.java:55)
      org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:505)
      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)
      Loader[3].<init> called by 
      org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
      org.apache.pig.newplan.logical.relational.LOLoad.getLoadFunc(LOLoad.java:77)
      org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:149)
      org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
      org.apache.pig.newplan.logical.relational.LOStore.getSchema(LOStore.java:68)
      org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:60)
      org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.visit(SchemaAliasVisitor.java:84)
      org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:77)
      org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
      org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
      org.apache.pig.PigServer$Graph.compile(PigServer.java:1630)
      org.apache.pig.PigServer$Graph.compile(PigServer.java:1624)
      org.apache.pig.PigServer$Graph.access$2(PigServer.java:1623)
      org.apache.pig.PigServer.execute(PigServer.java:1246)
      org.apache.pig.PigServer.access$0(PigServer.java:1237)
      org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
      Storer[4].<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.JobControlCompiler.getJob(JobControlCompiler.java:499)
      org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:281)
      org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:178)
      org.apache.pig.PigServer.launchPlan(PigServer.java:1279)
      org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1264)
      org.apache.pig.PigServer.execute(PigServer.java:1254)
      org.apache.pig.PigServer.access$0(PigServer.java:1237)
      org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
      org.apache.pig.PigServer.registerQuery(PigServer.java:534)
      org.apache.pig.PigServer.registerQuery(PigServer.java:547)
      Storer[5].<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[4].<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[6].<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[5].<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)
      
      1. PIG-2699.patch
        25 kB
        Julien Le Dem
      2. PIG-2699_f.patch
        110 kB
        Julien Le Dem
      3. PIG-2699_e.patch
        110 kB
        Julien Le Dem
      4. PIG-2699_d.patch
        110 kB
        Julien Le Dem
      5. PIG-2699_c.patch
        81 kB
        Julien Le Dem
      6. PIG-2699_b.patch
        33 kB
        Julien Le Dem
      7. PIG-2699_a.patch
        32 kB
        Julien Le Dem

        Issue Links

          Activity

          Julien Le Dem created issue -
          Julien Le Dem made changes -
          Field Original Value New Value
          Attachment PIG-2699.patch [ 12526784 ]
          Julien Le Dem made changes -
          Patch Info Patch Available [ 10042 ]
          Julien Le Dem made changes -
          Description Here is a patch to get it down to 3
          Here is the report of the remaining calls:
          {noformat}
          3 instances of Loader
          3 instances of Storer
          all calls:
          Loader(1).<init>
          Loader(1).relativeToAbsolutePath
          Storer(1).<init>
          Storer(1).setStoreFuncUDFContextSignature
          Storer(1).relToAbsPathForStoreLocation
          Storer(1).setStoreFuncUDFContextSignature
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Storer(1).setStoreFuncUDFContextSignature
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Storer(1).setStoreLocation
          Storer(1).getOutputFormat
          Loader(1).getSchema
          Loader(1).getStatistics
          Loader(1).setLocation
          Storer(1).setStoreLocation
          Storer(2).<init>
          Storer(2).setStoreFuncUDFContextSignature
          Storer(2).setStoreLocation
          Storer(2).getOutputFormat
          Loader(2).<init>
          Loader(2).setUDFContextSignature
          Loader(2).setLocation
          Loader(2).getInputFormat
          Storer(3).<init>
          Storer(3).setStoreFuncUDFContextSignature
          Storer(3).setStoreLocation
          Storer(3).getOutputFormat
          Storer(3).setStoreLocation
          Loader(3).<init>
          Loader(3).setUDFContextSignature
          Loader(3).setLocation
          Loader(3).getInputFormat
          Storer(3).setStoreLocation
          Storer(3).getOutputFormat
          Storer(3).prepareToWrite
          Loader(3).setUDFContextSignature
          Loader(3).prepareToRead
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).setStoreLocation
          Storer(3).setStoreLocation
          Storer(1).setStoreLocation

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:421)
          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:477)
          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}
          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();


          3 instances of Loader
          3 instances of Storer
          all calls:
          Loader(1).<init>
          Loader(1).relativeToAbsolutePath
          Storer(1).<init>
          Storer(1).setStoreFuncUDFContextSignature
          Storer(1).relToAbsPathForStoreLocation
          Storer(1).setStoreFuncUDFContextSignature
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Storer(1).setStoreFuncUDFContextSignature
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Storer(1).setStoreLocation
          Storer(1).getOutputFormat
          Loader(1).getSchema
          Loader(1).getStatistics
          Loader(1).setLocation
          Storer(1).setStoreLocation
          Storer(2).<init>
          Storer(2).setStoreFuncUDFContextSignature
          Storer(2).setStoreLocation
          Storer(2).getOutputFormat
          Loader(2).<init>
          Loader(2).setUDFContextSignature
          Loader(2).setLocation
          Loader(2).getInputFormat
          Storer(3).<init>
          Storer(3).setStoreFuncUDFContextSignature
          Storer(3).setStoreLocation
          Storer(3).getOutputFormat
          Storer(3).setStoreLocation
          Loader(3).<init>
          Loader(3).setUDFContextSignature
          Loader(3).setLocation
          Loader(3).getInputFormat
          Storer(3).setStoreLocation
          Storer(3).getOutputFormat
          Storer(3).prepareToWrite
          Loader(3).setUDFContextSignature
          Loader(3).prepareToRead
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).setStoreLocation
          Storer(3).setStoreLocation
          Storer(1).setStoreLocation

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:421)
          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:477)
          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}
          Julien Le Dem made changes -
          Attachment PIG-2699_a.patch [ 12527371 ]
          Julien Le Dem made changes -
          Attachment PIG-2699_b.patch [ 12527372 ]
          Julien Le Dem made changes -
          Description 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();


          3 instances of Loader
          3 instances of Storer
          all calls:
          Loader(1).<init>
          Loader(1).relativeToAbsolutePath
          Storer(1).<init>
          Storer(1).setStoreFuncUDFContextSignature
          Storer(1).relToAbsPathForStoreLocation
          Storer(1).setStoreFuncUDFContextSignature
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Storer(1).setStoreFuncUDFContextSignature
          Loader(1).getSchema
          Loader(1).getSchema
          Loader(1).getSchema
          Storer(1).setStoreLocation
          Storer(1).getOutputFormat
          Loader(1).getSchema
          Loader(1).getStatistics
          Loader(1).setLocation
          Storer(1).setStoreLocation
          Storer(2).<init>
          Storer(2).setStoreFuncUDFContextSignature
          Storer(2).setStoreLocation
          Storer(2).getOutputFormat
          Loader(2).<init>
          Loader(2).setUDFContextSignature
          Loader(2).setLocation
          Loader(2).getInputFormat
          Storer(3).<init>
          Storer(3).setStoreFuncUDFContextSignature
          Storer(3).setStoreLocation
          Storer(3).getOutputFormat
          Storer(3).setStoreLocation
          Loader(3).<init>
          Loader(3).setUDFContextSignature
          Loader(3).setLocation
          Loader(3).getInputFormat
          Storer(3).setStoreLocation
          Storer(3).getOutputFormat
          Storer(3).prepareToWrite
          Loader(3).setUDFContextSignature
          Loader(3).prepareToRead
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).putNext
          Loader(3).getNext
          Storer(3).setStoreLocation
          Storer(3).setStoreLocation
          Storer(1).setStoreLocation

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:421)
          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:477)
          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}
          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}
          Julien Le Dem made changes -
          Attachment PIG-2699_c.patch [ 12527963 ]
          Julien Le Dem made changes -
          Description 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}
          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}
          Julien Le Dem made changes -
          Link This issue is duplicated by PIG-2654 [ PIG-2654 ]
          Julien Le Dem made changes -
          Link This issue is related to PIG-2344 [ PIG-2344 ]
          Julien Le Dem made changes -
          Link This issue is related to PIG-2421 [ PIG-2421 ]
          Julien Le Dem made changes -
          Description 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}
          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)

          In trunk this was:
          5 instances of Loader
          6 instances of Storer

          all calls:
          Loader(1).<init>()
          Loader(2).<init>()
          Loader(2).relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk)
          Storer(1).<init>()
          Storer(2).<init>()
          Storer(2).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(2).relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk)
          Storer(3).<init>()
          Storer(3).setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).<init>()
          Loader(3).setUDFContextSignature(A)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@16aeea66)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@36d1c778)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@27b62aab)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@8542529)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@75be16f5)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7971f189)
          Storer(3).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@714ae2c1)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7d5718f2)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@1a3a9bba)
          Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@421690ab)
          Storer(3).getOutputFormat()
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@663257b8)
          Loader(3).getStatistics(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Loader(3).setLocation(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Storer(4).<init>()
          Storer(4).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@c970c0e)
          Storer(5).<init>()
          Storer(5).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(5).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@181b7c76)
          Storer(5).getOutputFormat()
          Loader(4).<init>()
          Loader(4).setUDFContextSignature(A)
          Loader(4).setLocation(foo, org.apache.hadoop.mapreduce.Job@44aea710)
          Loader(4).getInputFormat()
          Storer(6).<init>()
          Storer(6).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@51a9876e)
          Storer(6).getOutputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@77762fc7)
          Loader(5).<init>()
          Loader(5).setUDFContextSignature(A)
          Loader(5).setLocation(foo, org.apache.hadoop.mapreduce.Job@8429c19)
          Loader(5).getInputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7b6ee3ec)
          Storer(6).getOutputFormat()
          Storer(6).prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@2a8c7be5)
          Loader(5).setUDFContextSignature(A)
          Loader(5).prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@49594a88, Number of splits :1...)
          Loader(5).getNext()
          Storer(6).putNext((a))
          Loader(5).getNext()
          Storer(6).putNext((b))
          Loader(5).getNext()
          Storer(6).putNext((c))
          Loader(5).getNext()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54128635)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@78688954)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54140fee)

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3117)
          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)
          Loader(2).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.getAbolutePathForLoad(LogicalPlanBuilder.java:417)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:436)
          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.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6312)
          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.parser.LogicalPlanBuilder.getAbolutePathForStore(LogicalPlanBuilder.java:478)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:499)
          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(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOStore.<init>(LOStore.java:55)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:505)
          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)
          Loader(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOLoad.getLoadFunc(LOLoad.java:77)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:149)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
          org.apache.pig.newplan.logical.relational.LOStore.getSchema(LOStore.java:68)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:60)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.visit(SchemaAliasVisitor.java:84)
          org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:77)
          org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
          org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1630)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1624)
          org.apache.pig.PigServer$Graph.access$2(PigServer.java:1623)
          org.apache.pig.PigServer.execute(PigServer.java:1246)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          Storer(4).<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.JobControlCompiler.getJob(JobControlCompiler.java:478)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:265)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:178)
          org.apache.pig.PigServer.launchPlan(PigServer.java:1279)
          org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1264)
          org.apache.pig.PigServer.execute(PigServer.java:1254)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          org.apache.pig.PigServer.registerQuery(PigServer.java:534)
          org.apache.pig.PigServer.registerQuery(PigServer.java:547)
          Storer(5).<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(4).<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(6).<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(5).<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}
          Julien Le Dem made changes -
          Description 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)

          In trunk this was:
          5 instances of Loader
          6 instances of Storer

          all calls:
          Loader(1).<init>()
          Loader(2).<init>()
          Loader(2).relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk)
          Storer(1).<init>()
          Storer(2).<init>()
          Storer(2).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(2).relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk)
          Storer(3).<init>()
          Storer(3).setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).<init>()
          Loader(3).setUDFContextSignature(A)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@16aeea66)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@36d1c778)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@27b62aab)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@8542529)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@75be16f5)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7971f189)
          Storer(3).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@714ae2c1)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7d5718f2)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@1a3a9bba)
          Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@421690ab)
          Storer(3).getOutputFormat()
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@663257b8)
          Loader(3).getStatistics(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Loader(3).setLocation(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Storer(4).<init>()
          Storer(4).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@c970c0e)
          Storer(5).<init>()
          Storer(5).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(5).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@181b7c76)
          Storer(5).getOutputFormat()
          Loader(4).<init>()
          Loader(4).setUDFContextSignature(A)
          Loader(4).setLocation(foo, org.apache.hadoop.mapreduce.Job@44aea710)
          Loader(4).getInputFormat()
          Storer(6).<init>()
          Storer(6).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@51a9876e)
          Storer(6).getOutputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@77762fc7)
          Loader(5).<init>()
          Loader(5).setUDFContextSignature(A)
          Loader(5).setLocation(foo, org.apache.hadoop.mapreduce.Job@8429c19)
          Loader(5).getInputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7b6ee3ec)
          Storer(6).getOutputFormat()
          Storer(6).prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@2a8c7be5)
          Loader(5).setUDFContextSignature(A)
          Loader(5).prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@49594a88, Number of splits :1...)
          Loader(5).getNext()
          Storer(6).putNext((a))
          Loader(5).getNext()
          Storer(6).putNext((b))
          Loader(5).getNext()
          Storer(6).putNext((c))
          Loader(5).getNext()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54128635)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@78688954)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54140fee)

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3117)
          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)
          Loader(2).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.getAbolutePathForLoad(LogicalPlanBuilder.java:417)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:436)
          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.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6312)
          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.parser.LogicalPlanBuilder.getAbolutePathForStore(LogicalPlanBuilder.java:478)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:499)
          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(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOStore.<init>(LOStore.java:55)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:505)
          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)
          Loader(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOLoad.getLoadFunc(LOLoad.java:77)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:149)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
          org.apache.pig.newplan.logical.relational.LOStore.getSchema(LOStore.java:68)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:60)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.visit(SchemaAliasVisitor.java:84)
          org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:77)
          org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
          org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1630)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1624)
          org.apache.pig.PigServer$Graph.access$2(PigServer.java:1623)
          org.apache.pig.PigServer.execute(PigServer.java:1246)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          Storer(4).<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.JobControlCompiler.getJob(JobControlCompiler.java:478)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:265)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:178)
          org.apache.pig.PigServer.launchPlan(PigServer.java:1279)
          org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1264)
          org.apache.pig.PigServer.execute(PigServer.java:1254)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          org.apache.pig.PigServer.registerQuery(PigServer.java:534)
          org.apache.pig.PigServer.registerQuery(PigServer.java:547)
          Storer(5).<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(4).<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(6).<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(5).<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}
          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}

          In trunk this was:
          {noformat}
          5 instances of Loader
          6 instances of Storer

          all calls:
          Loader(1).<init>()
          Loader(2).<init>()
          Loader(2).relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk)
          Storer(1).<init>()
          Storer(2).<init>()
          Storer(2).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(2).relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk)
          Storer(3).<init>()
          Storer(3).setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).<init>()
          Loader(3).setUDFContextSignature(A)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@16aeea66)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@36d1c778)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@27b62aab)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@8542529)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@75be16f5)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7971f189)
          Storer(3).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@714ae2c1)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7d5718f2)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@1a3a9bba)
          Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@421690ab)
          Storer(3).getOutputFormat()
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@663257b8)
          Loader(3).getStatistics(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Loader(3).setLocation(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Storer(4).<init>()
          Storer(4).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@c970c0e)
          Storer(5).<init>()
          Storer(5).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(5).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@181b7c76)
          Storer(5).getOutputFormat()
          Loader(4).<init>()
          Loader(4).setUDFContextSignature(A)
          Loader(4).setLocation(foo, org.apache.hadoop.mapreduce.Job@44aea710)
          Loader(4).getInputFormat()
          Storer(6).<init>()
          Storer(6).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@51a9876e)
          Storer(6).getOutputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@77762fc7)
          Loader(5).<init>()
          Loader(5).setUDFContextSignature(A)
          Loader(5).setLocation(foo, org.apache.hadoop.mapreduce.Job@8429c19)
          Loader(5).getInputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7b6ee3ec)
          Storer(6).getOutputFormat()
          Storer(6).prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@2a8c7be5)
          Loader(5).setUDFContextSignature(A)
          Loader(5).prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@49594a88, Number of splits :1...)
          Loader(5).getNext()
          Storer(6).putNext((a))
          Loader(5).getNext()
          Storer(6).putNext((b))
          Loader(5).getNext()
          Storer(6).putNext((c))
          Loader(5).getNext()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54128635)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@78688954)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54140fee)

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3117)
          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)
          Loader(2).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.getAbolutePathForLoad(LogicalPlanBuilder.java:417)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:436)
          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.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6312)
          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.parser.LogicalPlanBuilder.getAbolutePathForStore(LogicalPlanBuilder.java:478)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:499)
          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(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOStore.<init>(LOStore.java:55)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:505)
          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)
          Loader(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOLoad.getLoadFunc(LOLoad.java:77)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:149)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
          org.apache.pig.newplan.logical.relational.LOStore.getSchema(LOStore.java:68)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:60)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.visit(SchemaAliasVisitor.java:84)
          org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:77)
          org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
          org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1630)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1624)
          org.apache.pig.PigServer$Graph.access$2(PigServer.java:1623)
          org.apache.pig.PigServer.execute(PigServer.java:1246)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          Storer(4).<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.JobControlCompiler.getJob(JobControlCompiler.java:478)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:265)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:178)
          org.apache.pig.PigServer.launchPlan(PigServer.java:1279)
          org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1264)
          org.apache.pig.PigServer.execute(PigServer.java:1254)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          org.apache.pig.PigServer.registerQuery(PigServer.java:534)
          org.apache.pig.PigServer.registerQuery(PigServer.java:547)
          Storer(5).<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(4).<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(6).<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(5).<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}
          Julien Le Dem made changes -
          Description 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}

          In trunk this was:
          {noformat}
          5 instances of Loader
          6 instances of Storer

          all calls:
          Loader(1).<init>()
          Loader(2).<init>()
          Loader(2).relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk)
          Storer(1).<init>()
          Storer(2).<init>()
          Storer(2).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(2).relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk)
          Storer(3).<init>()
          Storer(3).setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).<init>()
          Loader(3).setUDFContextSignature(A)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@16aeea66)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@36d1c778)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@27b62aab)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@8542529)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@75be16f5)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7971f189)
          Storer(3).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@714ae2c1)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@7d5718f2)
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@1a3a9bba)
          Storer(3).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@421690ab)
          Storer(3).getOutputFormat()
          Loader(3).getSchema(foo, org.apache.hadoop.mapreduce.Job@663257b8)
          Loader(3).getStatistics(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Loader(3).setLocation(foo, org.apache.hadoop.mapreduce.Job@122b7db1)
          Storer(4).<init>()
          Storer(4).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@c970c0e)
          Storer(5).<init>()
          Storer(5).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(5).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@181b7c76)
          Storer(5).getOutputFormat()
          Loader(4).<init>()
          Loader(4).setUDFContextSignature(A)
          Loader(4).setLocation(foo, org.apache.hadoop.mapreduce.Job@44aea710)
          Loader(4).getInputFormat()
          Storer(6).<init>()
          Storer(6).setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@51a9876e)
          Storer(6).getOutputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@77762fc7)
          Loader(5).<init>()
          Loader(5).setUDFContextSignature(A)
          Loader(5).setLocation(foo, org.apache.hadoop.mapreduce.Job@8429c19)
          Loader(5).getInputFormat()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7b6ee3ec)
          Storer(6).getOutputFormat()
          Storer(6).prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@2a8c7be5)
          Loader(5).setUDFContextSignature(A)
          Loader(5).prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@49594a88, Number of splits :1...)
          Loader(5).getNext()
          Storer(6).putNext((a))
          Loader(5).getNext()
          Storer(6).putNext((b))
          Loader(5).getNext()
          Storer(6).putNext((c))
          Loader(5).getNext()
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54128635)
          Storer(6).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@78688954)
          Storer(4).setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@54140fee)

          constructor calls:
          Loader(1).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3117)
          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)
          Loader(2).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.getAbolutePathForLoad(LogicalPlanBuilder.java:417)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:436)
          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.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6312)
          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.parser.LogicalPlanBuilder.getAbolutePathForStore(LogicalPlanBuilder.java:478)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:499)
          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(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOStore.<init>(LOStore.java:55)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:505)
          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)
          Loader(3).<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOLoad.getLoadFunc(LOLoad.java:77)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:149)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
          org.apache.pig.newplan.logical.relational.LOStore.getSchema(LOStore.java:68)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:60)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.visit(SchemaAliasVisitor.java:84)
          org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:77)
          org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
          org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1630)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1624)
          org.apache.pig.PigServer$Graph.access$2(PigServer.java:1623)
          org.apache.pig.PigServer.execute(PigServer.java:1246)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          Storer(4).<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.JobControlCompiler.getJob(JobControlCompiler.java:478)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:265)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:178)
          org.apache.pig.PigServer.launchPlan(PigServer.java:1279)
          org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1264)
          org.apache.pig.PigServer.execute(PigServer.java:1254)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          org.apache.pig.PigServer.registerQuery(PigServer.java:534)
          org.apache.pig.PigServer.registerQuery(PigServer.java:547)
          Storer(5).<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(4).<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(6).<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(5).<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}
          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
          20 calls to Loader
          3 instances of Storer
          24 calls to Storer

          all calls:
          Loader[1].<init>()
          Loader[1].relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
          Loader[1].setUDFContextSignature(A_1-0)
          Loader[1].getSchema(foo, org.apache.hadoop.mapreduce.Job@7ee49dcd)
          Storer[1].<init>()
          Storer[1].setStoreFuncUDFContextSignature(A_1-1)
          Storer[1].relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk-LoadStoreFunc-lifecycle)
          Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@776be68f)
          Storer[1].getOutputFormat()
          Loader[1].getStatistics(foo, org.apache.hadoop.mapreduce.Job@11e9c82e)
          Loader[1].setLocation(foo, org.apache.hadoop.mapreduce.Job@11e9c82e)
          Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@57d840cd)
          Storer[2].<init>()
          Storer[2].setStoreFuncUDFContextSignature(A_1-1)
          Storer[2].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@76996cca)
          Storer[2].getOutputFormat()
          Loader[2].<init>()
          Loader[2].setUDFContextSignature(A_1-0)
          Loader[2].setLocation(foo, org.apache.hadoop.mapreduce.Job@317cfd38)
          Loader[2].getInputFormat()
          Storer[3].<init>()
          Storer[3].setStoreFuncUDFContextSignature(A_1-1)
          Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@459d3b3a)
          Storer[3].getOutputFormat()
          Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@225f1ae9)
          Loader[3].<init>()
          Loader[3].setUDFContextSignature(A_1-0)
          Loader[3].setLocation(foo, org.apache.hadoop.mapreduce.Job@6b98e8b4)
          Loader[3].getInputFormat()
          Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@5fb11b79)
          Storer[3].getOutputFormat()
          Storer[3].prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@49b09282)
          Loader[3].setUDFContextSignature(A_1-0)
          Loader[3].prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@2c8c7d6, 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@3ebfbbe3)
          Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@14d964af)
          Storer[1].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@644ca6b6)

          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:486)
          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}

          In trunk this was:
          {noformat}
          5 instances of Loader
          31 calls to Loader
          6 instances of Storer
          30 calls to Storer

          all calls:
          Loader[1].<init>()
          Loader[2].<init>()
          Loader[2].relativeToAbsolutePath(foo, file:/Users/julien/svn/pig/trunk)
          Storer[1].<init>()
          Storer[2].<init>()
          Storer[2].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer[2].relToAbsPathForStoreLocation(bar, file:/Users/julien/svn/pig/trunk)
          Storer[3].<init>()
          Storer[3].setStoreFuncUDFContextSignature(1-0_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader[3].<init>()
          Loader[3].setUDFContextSignature(A)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@4c349471)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@24c0f1ec)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@900bac2)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@635aed57)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@2d7cec96)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@4b947496)
          Storer[3].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@776be68f)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@560c3014)
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@5773ec72)
          Storer[3].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@bb273cc)
          Storer[3].getOutputFormat()
          Loader[3].getSchema(foo, org.apache.hadoop.mapreduce.Job@45660d6)
          Loader[3].setLocation(foo, org.apache.hadoop.mapreduce.Job@d2368df)
          Loader[3].getStatistics(foo, org.apache.hadoop.mapreduce.Job@d2368df)
          Storer[4].<init>()
          Storer[4].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer[4].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@78ff9053)
          Storer[5].<init>()
          Storer[5].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer[5].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@336d8196)
          Storer[5].getOutputFormat()
          Loader[4].<init>()
          Loader[4].setUDFContextSignature(A)
          Loader[4].setLocation(foo, org.apache.hadoop.mapreduce.Job@61250ff2)
          Loader[4].getInputFormat()
          Storer[6].<init>()
          Storer[6].setStoreFuncUDFContextSignature(A_bar_org.apache.pig.TestLoadStoreFuncLifeCycle$Storer)
          Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@604788d5)
          Storer[6].getOutputFormat()
          Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@7f342545)
          Loader[5].<init>()
          Loader[5].setUDFContextSignature(A)
          Loader[5].setLocation(foo, org.apache.hadoop.mapreduce.Job@459d3b3a)
          Loader[5].getInputFormat()
          Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@795e0c2b)
          Storer[6].getOutputFormat()
          Storer[6].prepareToWrite(org.apache.pig.builtin.mock.Storage$MockRecordWriter@7c34151f)
          Loader[5].setUDFContextSignature(A)
          Loader[5].prepareToRead(org.apache.pig.builtin.mock.Storage$MockRecordReader@62114b17, Number of splits :1...)
          Loader[5].getNext()
          Storer[6].putNext((a))
          Loader[5].getNext()
          Storer[6].putNext((b))
          Loader[5].getNext()
          Storer[6].putNext((c))
          Loader[5].getNext()
          Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@bf47ae8)
          Storer[6].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@4bb7b407)
          Storer[4].setStoreLocation(bar, org.apache.hadoop.mapreduce.Job@3cee6ad6)

          constructor calls:
          Loader[1].<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3117)
          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)
          Loader[2].<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.parser.LogicalPlanBuilder.getAbolutePathForLoad(LogicalPlanBuilder.java:417)
          org.apache.pig.parser.LogicalPlanBuilder.buildLoadOp(LogicalPlanBuilder.java:436)
          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.validateFuncSpec(LogicalPlanBuilder.java:791)
          org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:780)
          org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:4670)
          org.apache.pig.parser.LogicalPlanGenerator.store_clause(LogicalPlanGenerator.java:6312)
          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.parser.LogicalPlanBuilder.getAbolutePathForStore(LogicalPlanBuilder.java:478)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:499)
          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[3].<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOStore.<init>(LOStore.java:55)
          org.apache.pig.parser.LogicalPlanBuilder.buildStoreOp(LogicalPlanBuilder.java:505)
          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)
          Loader[3].<init> called by
          org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:565)
          org.apache.pig.newplan.logical.relational.LOLoad.getLoadFunc(LOLoad.java:77)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchemaFromMetaData(LOLoad.java:149)
          org.apache.pig.newplan.logical.relational.LOLoad.getSchema(LOLoad.java:110)
          org.apache.pig.newplan.logical.relational.LOStore.getSchema(LOStore.java:68)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:60)
          org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.visit(SchemaAliasVisitor.java:84)
          org.apache.pig.newplan.logical.relational.LOStore.accept(LOStore.java:77)
          org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
          org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1630)
          org.apache.pig.PigServer$Graph.compile(PigServer.java:1624)
          org.apache.pig.PigServer$Graph.access$2(PigServer.java:1623)
          org.apache.pig.PigServer.execute(PigServer.java:1246)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          Storer[4].<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.JobControlCompiler.getJob(JobControlCompiler.java:499)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:281)
          org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:178)
          org.apache.pig.PigServer.launchPlan(PigServer.java:1279)
          org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1264)
          org.apache.pig.PigServer.execute(PigServer.java:1254)
          org.apache.pig.PigServer.access$0(PigServer.java:1237)
          org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1556)
          org.apache.pig.PigServer.registerQuery(PigServer.java:534)
          org.apache.pig.PigServer.registerQuery(PigServer.java:547)
          Storer[5].<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[4].<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[6].<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[5].<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}
          Julien Le Dem made changes -
          Attachment PIG-2699_d.patch [ 12531015 ]
          Julien Le Dem made changes -
          Attachment PIG-2699_e.patch [ 12531018 ]
          Julien Le Dem made changes -
          Attachment PIG-2699_f.patch [ 12532491 ]
          Julien Le Dem made changes -
          Summary Pig creates too many instances of Load and Store Funcs. It should be 1 in the front-end and 1 in the backend Reduce the number of instances of Load and Store Funcs down to 2+1. It should be 1 in the front-end and 1 in the backend
          Julien Le Dem made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 0.11 [ 12318878 ]
          Resolution Fixed [ 1 ]
          Julien Le Dem made changes -
          Link This issue breaks PIG-2790 [ PIG-2790 ]
          Julien Le Dem made changes -
          Link This issue breaks PIG-2807 [ PIG-2807 ]
          Julien Le Dem made changes -
          Link This issue breaks PIG-2809 [ PIG-2809 ]
          Julien Le Dem made changes -
          Link This issue breaks PIG-2820 [ PIG-2820 ]
          Bill Graham made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Julien Le Dem
              Reporter:
              Julien Le Dem
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development