Package org.apache.pig.data

Examples of org.apache.pig.data.IndexedTuple


                bags[i - 1] = BagFactory.getInstance().newDefaultBag();
                t.setField(i, bags[i - 1]);
            }

            while (values.hasNext()) {
                IndexedTuple it = values.next();
                t.getBagField(it.index + 1).add(it.toTuple());
            }
           
            for (int i = 0; i < inputCount; i++) {
                if (isInner[i] && t.getBagField(1 + i).size() == 0)
                    return;
View Full Code Here


                if (group == null) {
                    oc.collect(null, (Tuple)d);
                } else {
                    Datum[] groupAndTuple = LOCogroup.getGroupAndTuple(d);
                    // wrap group label in a tuple, so it becomes writable.
                    oc.collect(new Tuple(groupAndTuple[0]), new IndexedTuple((Tuple)groupAndTuple[1], index));
                }
            }catch(IOException e){
                throw new RuntimeException(e);
            }
        }
View Full Code Here

                bags[i - 1].clear();
                t.setField(i, bags[i - 1]);
            }

            while (values.hasNext()) {
                IndexedTuple it = values.next();
                t.getBagField(it.index + 1).add(it.toTuple());
            }
            for (int i = 0; i < inputCount; i++) {  // XXX: shouldn't we only do this if INNER flag is set?
                if (t.getBagField(1 + i).size() == 0)
                    return;
            }
View Full Code Here

        @Override
        public void add(Datum d){
            if (d == null) return// EOF marker from eval pipeline; ignore
            try{
                // oc.collect(group, new IndexedTuple(((Tuple)d).getTupleField(0),index));
                oc.collect(group, new IndexedTuple(((Tuple)d),index));
            }catch (IOException e){
                throw new RuntimeException(e);
            }
        }
View Full Code Here

                bags[i - 1].clear();
                t.setField(i, bags[i - 1]);
            }

            while (values.hasNext()) {
                IndexedTuple it = values.next();
                t.getBagField(it.index + 1).add(it.toTuple());
            }
            for (int i = 0; i < inputCount; i++) {  // XXX: shouldn't we only do this if INNER flag is set?
                if (t.getBagField(1 + i).size() == 0)
                    return;
            }
View Full Code Here

        @Override
        public void add(Datum d){
            if (d == null) return// EOF marker from eval pipeline; ignore
            try{
                // oc.collect(group, new IndexedTuple(((Tuple)d).getTupleField(0),index));
                oc.collect(group, new IndexedTuple(((Tuple)d),index));
            }catch (IOException e){
                throw new RuntimeException(e);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.pig.data.IndexedTuple

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.