public int getNumElements() throws IOException { return readVInt(); }
public int readToken() throws IOException { return readVInt(); }
public int readToken() throws IOException { return readVInt(); }
public int getNumElements() throws IOException { return readVInt(); }
public IndexTuple readIndexTuple( IndexTuple tuple ) throws IOException { tuple.setIndex( readVInt() ); tuple.setTuple( readTuple() ); return tuple; }
public IndexTuple readIndexTuple( IndexTuple tuple ) throws IOException { tuple.setIndex( readVInt() ); tuple.setTuple( readTuple() ); return tuple; }
public int compare( byte[] b1, int s1, int l1, byte[] b2, int s2, int l2 ) { try { lhsBuffer.reset( b1, s1, l1 ); rhsBuffer.reset( b2, s2, l2 ); // pop off index lhsStream.readVInt(); rhsStream.readVInt(); return compareTuples( null, groupComparators ); } catch( IOException exception ) { throw new CascadingException( exception ); } finally { lhsBuffer.clear(); rhsBuffer.clear(); } }
public int compare( byte[] b1, int s1, int l1, byte[] b2, int s2, int l2 ) { try { lhsBuffer.reset( b1, s1, l1 ); rhsBuffer.reset( b2, s2, l2 ); // pop off index lhsStream.readVInt(); rhsStream.readVInt(); return compareTuples( null, groupComparators ); } catch( IOException exception ) { throw new CascadingException( exception ); } finally { lhsBuffer.clear(); rhsBuffer.clear(); } }
public int compare( byte[] b1, int s1, int l1, byte[] b2, int s2, int l2 ) { try { lhsBuffer.reset( b1, s1, l1 ); rhsBuffer.reset( b2, s2, l2 ); int lhsIndex = lhsStream.readVInt(); int rhsIndex = rhsStream.readVInt(); int c = compareTuples( keyTypes, groupComparators ); if( c != 0 ) return c; return rhsIndex - lhsIndex; } catch( IOException exception ) { throw new CascadingException( exception ); } finally { lhsBuffer.clear(); rhsBuffer.clear(); } }
public int compare( byte[] b1, int s1, int l1, byte[] b2, int s2, int l2 ) { try { lhsBuffer.reset( b1, s1, l1 ); rhsBuffer.reset( b2, s2, l2 ); int lhsIndex = lhsStream.readVInt(); int rhsIndex = rhsStream.readVInt(); int c = compareTuples( keyTypes, groupComparators ); if( c != 0 ) return c; return rhsIndex - lhsIndex; } catch( IOException exception ) { throw new CascadingException( exception ); } finally { lhsBuffer.clear(); rhsBuffer.clear(); } }
public T deserialize( IndexTuple tuple ) throws IOException { if( tuple == null ) tuple = createTuple(); int ordinal = inputStream.readVInt(); tuple.setIndex( ordinal ); Class[] types = getTypesFor( ordinal ); // in both cases, we need to fill a new Tuple instance if( types == null ) tuple.setTuple( inputStream.readUnTyped( new Tuple() ) ); else tuple.setTuple( inputStream.readTyped( types, new Tuple() ) ); return (T) tuple; }
public T deserialize( IndexTuple tuple ) throws IOException { if( tuple == null ) tuple = createTuple(); int ordinal = inputStream.readVInt(); tuple.setIndex( ordinal ); Class[] types = getTypesFor( ordinal ); // in both cases, we need to fill a new Tuple instance if( types == null ) tuple.setTuple( inputStream.readUnTyped( new Tuple() ) ); else tuple.setTuple( inputStream.readTyped( types, new Tuple() ) ); return (T) tuple; }
protected final Object readType( int type ) throws IOException { switch( type ) { case 0: return null; case 1: return readString(); case 2: return readFloat(); case 3: return readDouble(); case 4: return readVInt(); case 5: return readVLong(); case 6: return readBoolean(); case 7: return readShort(); case 8: return readTuple(); case 9: return readTuplePair(); case 10: return readIndexTuple(); default: return elementReader.read( type, this ); } }
protected final Object readType( int type ) throws IOException { switch( type ) { case 0: return null; case 1: return readString(); case 2: return readFloat(); case 3: return readDouble(); case 4: return readVInt(); case 5: return readVLong(); case 6: return readBoolean(); case 7: return readShort(); case 8: return readTuple(); case 9: return readTuplePair(); case 10: return readIndexTuple(); default: return elementReader.read( type, this ); } }
return readDouble(); if( type == Integer.TYPE ) return readVInt(); if( type == Long.TYPE ) return readVLong();
return readDouble(); if( type == Integer.TYPE ) return readVInt(); if( type == Long.TYPE ) return readVLong();