Package org.apache.pig.impl.logicalLayer

Examples of org.apache.pig.impl.logicalLayer.LogicalPlan.connect()


                LOCast cast = new LOCast(genPlan,
                                         genNewOperatorKey(fromOp),
                                         inputFieldType) ;
                genPlan.add(cast) ;
                try {
                    genPlan.connect(project, cast);
                }
                catch (PlanException pe) {
                    // This should never happen
                    int errCode = 2059;
                    String msg = "Problem with inserting cast operator for project in plan.";
View Full Code Here


                            // from the type specified - so we need to cast
                            LOCast cast = new LOCast(p,
                                        OperatorKey.genOpKey(scope), fs.type);
                            cast.setFieldSchema(fs);
                            p.add(cast);
                            p.connect(proj, cast);
                           
                            cast.setFieldSchema(fs.clone());
                            FuncSpec loadFuncSpec = null;
                            if(lo instanceof LOLoad) {
                                loadFuncSpec = ((LOLoad)lo).getInputFile().getFuncSpec();
View Full Code Here

                LogicalPlan innerPlan = scalarEntry.getValue().first;
                LOConst rconst = new LOConst(innerPlan, new OperatorKey(scope, NodeIdGenerator.getGenerator().getNextNodeId(scope)), fileSpec.getFileName());
                rconst.setType(DataType.CHARARRAY);

                innerPlan.add(rconst);
                innerPlan.connect(rconst, scalarEntry.getKey());
               
                if (lp.getSoftLinkSuccessors(store)==null || !lp.getSoftLinkSuccessors(store).contains(scalarEntry.getValue().second))
                    lp.createSoftLink(store, scalarEntry.getValue().second);
            }
        } catch (IOException ioe) {
View Full Code Here

        LOStore store = new LOStore(plan, genNewOperatorKeyId(), filespec2, "new") ;
       
        plan.add(load) ;
        plan.add(store) ;
       
        plan.connect(load, store) ;    
       
        return plan ;   
    }
   
    private OperatorKey genNewOperatorKeyId() {
View Full Code Here

        LOStore store = new LOStore(plan, genNewOperatorKeyId(), filespec2, "new") ;
       
        plan.add(load) ;
        plan.add(store) ;
       
        plan.connect(load, store) ;    
       
        return plan ;   
    }
   
    private OperatorKey genNewOperatorKeyId() {
View Full Code Here

                LOCast cast = new LOCast(genPlan,
                                         genNewOperatorKey(fromOp),
                                         inputFieldType) ;
                genPlan.add(cast) ;
                try {
                    genPlan.connect(project, cast);
                }
                catch (PlanException pe) {
                    // This should never happen
                    int errCode = 2059;
                    String msg = "Problem with inserting cast operator for project in plan.";
View Full Code Here

                            // from the type specified - so we need to cast
                            LOCast cast = new LOCast(p,
                                        OperatorKey.genOpKey(scope), fs.type);
                            cast.setFieldSchema(fs);
                            p.add(cast);
                            p.connect(proj, cast);
                           
                            cast.setFieldSchema(fs.clone());
                            FuncSpec loadFuncSpec = null;
                            if(lo instanceof LOLoad) {
                                loadFuncSpec = ((LOLoad)lo).getInputFile().getFuncSpec();
View Full Code Here

                LogicalPlan innerPlan = scalarEntry.getValue().first;
                LOConst rconst = new LOConst(innerPlan, new OperatorKey(scope, NodeIdGenerator.getGenerator().getNextNodeId(scope)), fileSpec.getFileName());
                rconst.setType(DataType.CHARARRAY);

                innerPlan.add(rconst);
                innerPlan.connect(rconst, scalarEntry.getKey());
               
                if (lp.getSoftLinkSuccessors(store)==null || !lp.getSoftLinkSuccessors(store).contains(scalarEntry.getValue().second))
                    lp.createSoftLink(store, scalarEntry.getValue().second);
            }
        } catch (IOException ioe) {
View Full Code Here

                LOCast cast = new LOCast(genPlan,
                                         genNewOperatorKey(fromOp),
                                         inputFieldType) ;
                genPlan.add(cast) ;
                try {
                    genPlan.connect(project, cast);
                }
                catch (PlanException pe) {
                    // This should never happen
                    int errCode = 2059;
                    String msg = "Problem with inserting cast operator for project in plan.";
View Full Code Here

                            // from the "determinedSchema" is different
                            // from the type specified - so we need to cast
                            LOCast cast = new LOCast(p,
                                        OperatorKey.genOpKey(scope), fs.type);
                            p.add(cast);
                            p.connect(proj, cast);
                           
                            cast.setFieldSchema(fs.clone());
                            FuncSpec loadFuncSpec = null;
                            if(lo instanceof LOLoad) {
                                loadFuncSpec = ((LOLoad)lo).getInputFile().getFuncSpec();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.