Package org.apache.pig.backend.local.executionengine

Examples of org.apache.pig.backend.local.executionengine.POLoad


            throw new IOException("Illustrate command needs a user defined schema to function. Please specify a schema while loading the data.");
          }

          DataBag opBaseData = BagFactory.getInstance().newDefaultBag();
            //POLoad poLoad = new POLoad(pigContext, ((LOLoad) op).getInputFileSpec(), op.getOutputType());
          POLoad poLoad = new POLoad(op.getScope(),
                        NodeIdGenerator.getGenerator().getNextNodeId(op.getOperatorKey().getScope()),
                        new HashMap<OperatorKey, ExecPhysicalOperator> (),
                        pigContext,
                        fileSpec,
                        LogicalOperator.FIXED
                        );
          poLoad.setLineageTracer(new LineageTracer());
            poLoad.open();
            for (int i = 0; i < sampleSize; i++) {
                Tuple t = poLoad.getNext();

                if (t == null) break;
                opBaseData.add(t);
            }
            poLoad.close();
           
            baseData.put((LOLoad) op, opBaseData);
        } else {
            /*for (Iterator<LogicalOperator> it = op.getInputs().iterator(); it.hasNext(); ) {
                ReadBaseData(it.next(), baseData, sampleSize, pigContext);
View Full Code Here

TOP

Related Classes of org.apache.pig.backend.local.executionengine.POLoad

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.