@Override protected Tuple unwrapGrouping( Tuple key ) { return sortFields == null ? key : ( (TuplePair) key ).getLhs(); }
@Override protected Tuple unwrapGrouping( Tuple key ) { return sortFields == null ? key : ( (TuplePair) key ).getLhs(); }
public int getPartition( Object key, Object value, int numReduceTasks ) { return ( hashCode( ( (TuplePair) key ).getLhs() ) & Integer.MAX_VALUE ) % numReduceTasks; } }
@Override protected Tuple unwrapGrouping( Tuple key ) { // copying the lhs key during secondary sorting prevents the key from advancing at the end of the // aggregation iterator return sortFields == null ? key : new Tuple( ( (TuplePair) key ).getLhs() ); } }
public int getPartition( Object key, Object value, int numReduceTasks ) { return ( hashCode( ( (TuplePair) key ).getLhs() ) & Integer.MAX_VALUE ) % numReduceTasks; } }
@Override protected Tuple unwrapGrouping( Tuple key ) { // copying the lhs key during secondary sorting prevents the key from advancing at the end of the // aggregation iterator return sortFields == null ? key : new Tuple( ( (TuplePair) key ).getLhs() ); } }
public int getPartition( TuplePair key, Tuple value, int numReduceTasks ) { return ( hashCode( key.getLhs() ) & Integer.MAX_VALUE ) % numReduceTasks; }
public int getPartition( TuplePair key, Tuple value, int numReduceTasks ) { return ( hashCode( key.getLhs() ) & Integer.MAX_VALUE ) % numReduceTasks; }
protected boolean advance() throws IOException { if( parent == null ) return false; boolean next = parent.next(); if( !next ) { parent = null; return false; } currentKeyPair = (TuplePair) parent.getCurrentKey(); isNewKey = currentKey == null || groupComparator.compare( currentKey, currentKeyPair.getLhs() ) != 0; currentKey = currentKeyPair.getLhs(); currentValues = parent.getCurrentValues(); return true; }
protected boolean advance() throws IOException { if( parent == null ) return false; boolean next = parent.next(); if( !next ) { parent = null; return false; } currentKeyPair = (TuplePair) parent.getCurrentKey(); isNewKey = currentKey == null || groupComparator.compare( currentKey, currentKeyPair.getLhs() ) != 0; currentKey = currentKeyPair.getLhs(); currentValues = parent.getCurrentValues(); return true; }
public void serialize( TuplePair tuple ) throws IOException { if( keyWriters == null ) outputStream.writeUnTyped( tuple.getLhs() ); else outputStream.writeWith( keyWriters, tuple.getLhs() ); if( sortWriters == null ) outputStream.writeUnTyped( tuple.getRhs() ); else outputStream.writeWith( sortWriters, tuple.getRhs() ); } }
public void serialize( TuplePair tuple ) throws IOException { if( keyWriters == null ) outputStream.writeUnTyped( tuple.getLhs() ); else outputStream.writeWith( keyWriters, tuple.getLhs() ); if( sortWriters == null ) outputStream.writeUnTyped( tuple.getRhs() ); else outputStream.writeWith( sortWriters, tuple.getRhs() ); } }
currentKey = ( (TuplePair) currentKey ).getLhs();
currentKey = ( (TuplePair) currentKey ).getLhs();