Examples of LogicalToPhysicalTranslatorException


Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

            try {
                currentPlan.connect(from, exprOp);
            } catch (PlanException e) {
                int errCode = 2015;
                String msg = "Invalid physical operators in the physical plan" ;
                throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
            }
        }
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

         
            if(inputSchema == null) {
                int errCode = 1109;
                String msg = "Input (" + ((LogicalRelationalOperator) joinInput).getAlias() + ") " +
                        "on which outer join is desired should have a valid schema";
                throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.INPUT);
            }
        } catch (FrontendException e) {
            int errCode = 2104;
            String msg = "Error while determining the schema of input";
            throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
        }
       
        CompilerUtils.addEmptyBagOuterJoin(fePlan, translateSchema(inputSchema));
       
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

        List<Operator> preds = plan.getPredecessors(loj);

        int errCode = 1101;
        String errMsg = "Merge Join must have exactly two inputs.";
        if(preds.size() != 2)
            throw new LogicalToPhysicalTranslatorException(errMsg+" Found: "+preds.size(),errCode);
       
        return mergeJoinValidator(preds,loj.getPlan());
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

                try {
                    currentPlan.connect(from, p);
                } catch (PlanException e) {
                    int errCode = 2015;
                    String msg = "Invalid physical operators in the physical plan" ;
                    throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
                }
            }
        }
        logToPhyMap.put(op, p);
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

        String errMsg = "Merge join only supports Filter, Foreach, filter and Load as its predecessor. Found : ";
        if(preds != null && !preds.isEmpty()){
            for(Operator lo : preds){
                // TODO Need to add LOForEach in this statement
                if (!(lo instanceof LOFilter || lo instanceof LOLoad)) // || lo instanceof LOForEach
                 throw new LogicalToPhysicalTranslatorException(errMsg, errCode);
                // All is good at this level. Visit predecessors now.
                mergeJoinValidator(lp.getPredecessors(lo),lp);
            }
        }
        // We visited everything and all is good.
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

            try {
                currentPlan.connect(from, load);
            } catch (PlanException e) {
                int errCode = 2015;
                String msg = "Invalid physical operators in the physical plan" ;
                throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
            }
        }
//        System.err.println("Exiting Load");
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

        if(op != null) {
            from = logToPhyMap.get(op.get(0));
        } else {
            int errCode = 2051;
            String msg = "Did not find a predecessor for Filter." ;
            throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG);
        }
       
        try {
            currentPlan.connect(from, poFilter);
        } catch (PlanException e) {
            int errCode = 2015;
            String msg = "Invalid physical operators in the physical plan" ;
            throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
        }
//        System.err.println("Exiting Filter");
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

        try {
           currentPlan.connect(from, poFE);
        } catch (Exception e) {
            int errCode = 2015;
            String msg = "Invalid physical operators in the physical plan" ;
            throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
        }

    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

        try {
            currentPlan.connect(from, store);
        } catch (PlanException e) {
            int errCode = 2015;
            String msg = "Invalid physical operators in the physical plan" ;
            throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
        }
        logToPhyMap.put(loStore, store);
//        System.err.println("Exiting Store");
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogicalToPhysicalTranslatorException

        try {
            currentPlan.connect(poGlobal, poPackage);
        } catch (PlanException e1) {
            int errCode = 2015;
            String msg = "Invalid physical operators in the physical plan" ;
            throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e1);
        }

        Byte type = null;
        for( int i = 0 ; i < preds.size(); i++ ) {
            ArrayList<LogicalExpressionPlan> exprPlans =
                (ArrayList<LogicalExpressionPlan>) cg.getExpressionPlans().get(i);
           
            POLocalRearrange physOp = new POLocalRearrange(new OperatorKey(
                    DEFAULT_SCOPE, nodeGen.getNextNodeId(DEFAULT_SCOPE)), cg.getRequestedParallelisam() );
            physOp.setAlias(cg.getAlias());
           
            List<PhysicalPlan> pExprPlans = translateExpressionPlans( cg, exprPlans );
           
            try {
                physOp.setPlans(pExprPlans);
            } catch (PlanException pe) {
                int errCode = 2071;
                String msg = "Problem with setting up local rearrange's plans.";
                throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, pe);
            }
            try {
                physOp.setIndex(i);
            } catch (ExecException e1) {
                // int errCode = 2058;
                String msg = "Unable to set index on newly create POLocalRearrange.";
                throw new IOException(msg);
            }
            if (exprPlans.size() > 1) {
                type = DataType.TUPLE;
                physOp.setKeyType(type);
            } else {
                type = pExprPlans.get(0).getLeaves().get(0).getResultType();
                physOp.setKeyType(type);
            }
            physOp.setResultType(DataType.TUPLE);

            currentPlan.add(physOp);

            try {
                currentPlan.connect(logToPhyMap.get(preds.get(i)), physOp);
                currentPlan.connect(physOp, poGlobal);
            } catch (PlanException e) {
                int errCode = 2015;
                String msg = "Invalid physical operators in the physical plan" ;
                throw new LogicalToPhysicalTranslatorException(msg, errCode, PigException.BUG, e);
            }
        }
       
        poPackage.setKeyType(type);
        poPackage.setResultType(DataType.TUPLE);
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.