Package org.apache.pig.impl.plan

Examples of org.apache.pig.impl.plan.VisitorException


       
        LogicalSchema s;
        try {
            s = Util.translateSchema(stream.getSchema());
        }catch(Exception e) {
            throw new VisitorException("Failed to translate schema.", e);
        }
       
        org.apache.pig.newplan.logical.relational.LOStream newStream =
            new org.apache.pig.newplan.logical.relational.LOStream(logicalPlan,
                    stream.getExecutableManager(), stream.getStreamingCommand(), s);
View Full Code Here


                                newUserDefinedSchemaList.add(new Schema(s.getField(j)));
                            } else {
                                newUserDefinedSchemaList.add(null);
                            }
                        } catch (FrontendException fee) {
                            throw new VisitorException(fee.getMessage(), fee);
                        }
                    } else {
                        newUserDefinedSchemaList.add(null);
                    }
                }
View Full Code Here

                if(null != fs) {
                    s = fs.schema;
                }
            }
        } catch (FrontendException fee) {
            throw new VisitorException(fee.getMessage(), fee);
        }
        if (null != s) {
            for(int i = 0; i < s.size(); ++i) {
                LogicalPlan replicatedPlan = replicatePlan(lp);
                replaceProjectStar(replicatedPlan, projectStar, i);
View Full Code Here

        opsMap.put(split, newSplit);
        translateConnection(split, newSplit);
    }

    public void visit(LOGenerate g) throws VisitorException {
        throw new VisitorException("LOGenerate is not supported.");
    }
View Full Code Here

        for(LogicalOperator succ: successors) {
            replicatedPlan.add(succ);
            try {
                replicatedPlan.connect(root, succ);
            } catch (PlanException pe) {
                throw new VisitorException(pe.getMessage(), pe);
            }
            addSuccessors(lp, replicatedPlan, succ);
        }
    }
View Full Code Here

        LogicalPlan projectPlan = projectStar.getPlan();
        LOProject replacementProject = new LOProject(projectPlan, OperatorKey.genOpKey(scope), projectInput, column);
        try {
            lp.replace(projectStar, replacementProject);
        } catch (PlanException pe) {
            throw new VisitorException(pe.getMessage(), pe);
        }
    }
View Full Code Here

       
        LogicalSchema s = null;
        try {
            s = Util.translateSchema(load.getSchema());
        }catch(Exception e) {
            throw new VisitorException("Failed to translate schema.", e);
        }
       
        org.apache.pig.newplan.logical.relational.LOLoad ld =
            new org.apache.pig.newplan.logical.relational.LOLoad(fs, s, logicalPlan, load.getConfiguration());
       
View Full Code Here

            for (LogicalOperator so : splitOutputs) {
                if (!(so instanceof LOSplitOutput)) {
                    String msg = "Found an LOSplit with an operator other "
                        + "than LOSplitOutput after it!";
                    log.error(msg);
                    throw new VisitorException(msg);
                }
                plans.add(((LOSplitOutput)so).getConditionPlan());
            }
        } else if (before instanceof LOForEach) {
            plans.addAll(((LOForEach)before).getForEachPlans());
View Full Code Here

    public void visit(LOConst con) throws VisitorException{
        ConstantExpression ce = null;
        try {
            ce = new ConstantExpression(exprPlan, con.getValue(), Util.translateFieldSchema(con.getFieldSchema()));
        } catch (FrontendException e) {
            throw new VisitorException(e);
        }
       
        exprPlan.add(ce);
        exprOpsMap.put(con, ce);      
        translateConnection(con, ce);
View Full Code Here

       
        CastExpression c = null;
        try {
            c = new CastExpression(exprPlan, exprOpsMap.get(exp), Util.translateFieldSchema(cast.getFieldSchema()));
        } catch (FrontendException e) {
            throw new VisitorException(e);
        }
        c.setFuncSpec(cast.getLoadFuncSpec());
        exprOpsMap.put(cast, c);
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.impl.plan.VisitorException

Copyright © 2018 www.massapicom. 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.