@Override protected Tuple unwrapGrouping( Tuple key ) { return ( (IndexTuple) key ).getTuple(); }
@Override protected Tuple unwrapGrouping( Tuple key ) { return ( (IndexTuple) key ).getTuple(); }
@Override public Tuple next() { if( value == null && !values.hasNext() ) throw new NoSuchElementException(); Tuple result = value.getTuple(); if( values.hasNext() ) value = values.next(); else value = null; return result; }
@Override public Tuple next() { if( value == null && !values.hasNext() ) throw new NoSuchElementException(); Tuple result = value.getTuple(); if( values.hasNext() ) value = values.next(); else value = null; return result; }
public int getPartition( Object key, Object value, int numReduceTasks ) { return ( hashCode( ( (IndexTuple) key ).getTuple() ) & Integer.MAX_VALUE ) % numReduceTasks; } }
public int getPartition( Object key, Object value, int numReduceTasks ) { return ( hashCode( ( (IndexTuple) key ).getTuple() ) & Integer.MAX_VALUE ) % numReduceTasks; } }
public int getPartition( IndexTuple key, Tuple value, int numReduceTasks ) { return ( hashCode( key.getTuple() ) & Integer.MAX_VALUE ) % numReduceTasks; }
public int getPartition( IndexTuple key, Tuple value, int numReduceTasks ) { return ( hashCode( key.getTuple() ) & Integer.MAX_VALUE ) % numReduceTasks; }
public void writeIndexTuple( IndexTuple indexTuple ) throws IOException { writeIntInternal( indexTuple.getIndex() ); writeTuple( indexTuple.getTuple() ); } }
public void writeIndexTuple( IndexTuple indexTuple ) throws IOException { writeIntInternal( indexTuple.getIndex() ); writeTuple( indexTuple.getTuple() ); } }
protected void build() { clearGroups(); if( collections[ 0 ] instanceof FalseCollection ) // force reset on FalseCollection ( (FalseCollection) collections[ 0 ] ).reset( null ); while( values[ 0 ].hasNext() ) { IndexTuple current = (IndexTuple) values[ 0 ].next(); int pos = current.getIndex(); // if this is the first (lhs) co-group, just use values iterator // we are guaranteed all the remainder tuples in the iterator are from pos == 0 if( numSelfJoins == 0 && pos == 0 ) { ( (FalseCollection) collections[ 0 ] ).reset( createIterator( current, values[ 0 ] ) ); break; } collections[ pos ].add( current.getTuple() ); // get the value tuple for this cogroup } }
protected void build() { clearGroups(); if( collections[ 0 ] instanceof FalseCollection ) // force reset on FalseCollection ( (FalseCollection) collections[ 0 ] ).reset( null ); while( values[ 0 ].hasNext() ) { IndexTuple current = (IndexTuple) values[ 0 ].next(); int pos = current.getIndex(); // if this is the first (lhs) co-group, just use values iterator // we are guaranteed all the remainder tuples in the iterator are from pos == 0 if( numSelfJoins == 0 && pos == 0 ) { ( (FalseCollection) collections[ 0 ] ).reset( createIterator( current, values[ 0 ] ) ); break; } collections[ pos ].add( current.getTuple() ); // get the value tuple for this cogroup } }