Package org.apache.pig.impl.logicalLayer

Examples of org.apache.pig.impl.logicalLayer.FrontendException


    }
 
    @Override
    public void accept(PlanVisitor v) throws FrontendException {
         if (!(v instanceof LogicalRelationalNodesVisitor)) {
             throw new FrontendException("Expected LogicalPlanVisitor", 2223);
         }
         ((LogicalRelationalNodesVisitor)v).visit(this);
    }
View Full Code Here


    }  
   
    @Override
    public void accept(PlanVisitor v) throws FrontendException {
        if (!(v instanceof LogicalRelationalNodesVisitor)) {
            throw new FrontendException("Expected LogicalPlanVisitor", 2223);
        }
        ((LogicalRelationalNodesVisitor)v).visit(this);
    }
View Full Code Here

            loadMetadata = (LoadMetadata)loadFunc;
            try {
        partitionKeys = loadMetadata.getPartitionKeys(
            loLoad.getFileSpec().getFileName(), new Job( loLoad.getConfiguration() ) );
      } catch (IOException e) {
        throw new FrontendException( e );
      }
            if( partitionKeys == null || partitionKeys.length == 0 ) {
              return false;
            }
           
View Full Code Here

            // LoadFunc.getSchema()
            updateMappedColNames(partitionFilter);
            try {
          loadMetadata.setPartitionFilter(partitionFilter);
        } catch (IOException e) {
          throw new FrontendException( e );
        }
            if(pColFilterFinder.isFilterRemovable()) { 
              currentPlan.removeAndReconnect( loFilter );
            }
          }
View Full Code Here

                        StreamingCommand command = ((LOStream)op).getStreamingCommand();
                        HandleSpec streamOutputSpec = command.getOutputSpec();
                        loadFuncSpec = new FuncSpec(streamOutputSpec.getSpec());
                    } else {
                        String msg = "TypeCastInserter invoked with an invalid operator class name: " + innerPlan.getClass().getSimpleName();
                        throw new FrontendException(msg, 2242);
                    }
                    cast.setFuncSpec(loadFuncSpec);
                }
                exps.add(exp);
            }
View Full Code Here

                if(ioe instanceof PigException){
                    errCode = ((PigException)ioe).getErrorCode();
                }
                String exceptionMsg = ioe.getMessage();
                validationErrStr += (exceptionMsg == null) ? "" : " More info to follow:\n" +exceptionMsg;
                throw new FrontendException(validationErrStr, errCode, pigCtx.getErrorSource(), ioe);
            }
           
            validationErrStr += " More info to follow:\n";
            try {
                sf.getOutputFormat().checkOutputSpecs(dummyJob);
            } catch (IOException ioe) {
                byte errSrc = pigCtx.getErrorSource();
                switch(errSrc) {
                case PigException.BUG:
                    errCode = 2002;
                    break;
                case PigException.REMOTE_ENVIRONMENT:
                    errCode = 6000;
                    break;
                case PigException.USER_ENVIRONMENT:
                    errCode = 4000;
                    break;
                }
                validationErrStr  += ioe.getMessage();
                throw new FrontendException(validationErrStr, errCode, errSrc, ioe);
            } catch (InterruptedException ie) {
                validationErrStr += ie.getMessage();
                throw new FrontendException(validationErrStr, errCode, pigCtx.getErrorSource(), ie);
            }
        }
View Full Code Here

        Iterator<Long> iter = uids.iterator();
        while(iter.hasNext()) {
            long uid = iter.next();
            int index = schema.findField(uid);
            if (index == -1) {
                throw new FrontendException("UID " + uid + " is not found in the schema " + schema, 2241);
            }
             
            cols.add(index);
        }
         
View Full Code Here

     * @link org.apache.pig.newplan.Operator#accept(org.apache.pig.newplan.PlanVisitor)
     */
    @Override
    public void accept(PlanVisitor v) throws FrontendException {
        if (!(v instanceof LogicalExpressionVisitor)) {
            throw new FrontendException("Expected LogicalExpressionVisitor", 2222);
        }
        ((LogicalExpressionVisitor)v).visit(this);
    }
View Full Code Here

            LogicalExpressionPlan otherPlan = (LogicalExpressionPlan)other;
            List<Operator> roots = getSources();
            List<Operator> otherRoots = otherPlan.getSources();
            if (roots.size() == 0 && otherRoots.size() == 0) return true;
            if (roots.size() > 1 || otherRoots.size() > 1) {
                throw new FrontendException("Found LogicalExpressionPlan with more than one root.  Unexpected.", 2224);
            }
            return roots.get(0).isEqual(otherRoots.get(0));           
        } else {
            return false;
        }
View Full Code Here

     * @link org.apache.pig.newplan.Operator#accept(org.apache.pig.newplan.PlanVisitor)
     */
    @Override
    public void accept(PlanVisitor v) throws FrontendException {
        if (!(v instanceof LogicalExpressionVisitor)) {
            throw new FrontendException("Expected LogicalExpressionVisitor", 2222);
        }
        ((LogicalExpressionVisitor)v).visit(this);
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.impl.logicalLayer.FrontendException

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.