Package org.apache.pig.impl.eval.collector

Examples of org.apache.pig.impl.eval.collector.DataCollector


        for (int i = 0; i < inputs.length; i++) {
           
            final int finalI = i;
            sortedInputs[i] = new ArrayList<Datum[]>();
           
            DataCollector outputFromSpec = new DataCollector(null){
                @Override
                public void add(Datum d) {
                    sortedInputs[finalI].add(LOCogroup.getGroupAndTuple(d));
                }
            };
           
            DataCollector inputToSpec = specs.get(i).setupPipe(null,
                                                               outputFromSpec);
            if(lineageTracer != null) specs.get(i).setLineageTracer(lineageTracer);

            Tuple t;           
            while ((t = (Tuple) ((PhysicalOperator)opTable.get(inputs[i])).getNext()) != null) {
                inputToSpec.add(t);
            }
            inputToSpec.finishPipe();

            Collections.sort(sortedInputs[i], new Comparator<Datum[]>() {
                public int compare(Datum[] a, Datum[] b) {
                    return a[0].compareTo(b[0]);
                }
View Full Code Here


            }
            evalPipe = evalSpec.setupPipe(properties,
                                          new MapDataOutputCollector());
        } else {
            group = groupSpec;
            DataCollector groupInput =
                group.setupPipe(properties, new MapDataOutputCollector());
            evalPipe = evalSpec.setupPipe(properties, groupInput);
        }
       
    }
View Full Code Here

    }

    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
           
            @Override
            public void add(Datum d) {
                if (inTheMiddleOfBag){
                    if (checkDelimiter(d)){
View Full Code Here

                                   StreamingCommand command,
                                   DataCollector endOfPipe) {
            super(endOfPipe);
            this.executableManager = executableManager;

            DataCollector successor =
                new DataCollector(endOfPipe) {
                public void add(Datum d) {
                    // Just forward the data to the next EvalSpec in the pipeline
                    addToSuccessor(d);
                }
            };
View Full Code Here

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            LinkedList<CrossProductItem> pendingCrossProducts = new LinkedList<CrossProductItem>();
           
            @Override
            public void add(Datum d) {
               
View Full Code Here

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe) {

            @Override
            public void add(Datum d){
                if (checkDelimiter(d))
                    addToSuccessor(d);
View Full Code Here

public abstract class SimpleEvalSpec extends EvalSpec {

    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            @Override
            public void add(Datum d) {
                if (checkDelimiter(d))
                    addToSuccessor(d);
                else
View Full Code Here

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            @Override
            public void add(Datum d) {
                if (cond.eval(d)){
                    addToSuccessor(ifTrue.simpleEval(d));
                }else{
View Full Code Here

    }

    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe){
            private Datum getPlaceHolderForFuncOutput(){
                Type returnType = func.getReturnType();
                if (returnType == DataAtom.class)
                    return new DataAtom();
                else if (returnType == Tuple.class)
View Full Code Here

    }
   
    @Override
    protected DataCollector setupDefaultPipe(Properties properties,
                                             DataCollector endOfPipe) {
        return new DataCollector(endOfPipe) {

            @Override
            public void add(Datum d){
               
                boolean changed = false;
View Full Code Here

TOP

Related Classes of org.apache.pig.impl.eval.collector.DataCollector

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.