/** * Writes a zero-compressed encoded int to a byte array. * * @param byteStream * the byte array/stream * @param i * the int */ public static void writeVInt(RandomAccessOutput byteStream, int i) { writeVLong(byteStream, i); }
public void writeVLong(long value) { LazyBinaryUtils.writeVLong(this, value); }
@Override void serialize(RandomAccessOutput byteStream, Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, BooleanRef warnedOnceNullMapKey) { LongObjectInspector loi = (LongObjectInspector) objInspector; long v = loi.get(obj); LazyBinaryUtils.writeVLong(byteStream, v); return; } }
public void writeToByteStream(RandomAccessOutput byteStream) { LazyBinaryUtils.writeVLong(byteStream, intervalValue.getTotalSeconds()); LazyBinaryUtils.writeVInt(byteStream, intervalValue.getNanos()); }
LongObjectInspector loi = (LongObjectInspector) poi; long v = loi.get(obj); LazyBinaryUtils.writeVLong(byteStream, v); return;
/** * Writes a zero-compressed encoded int to a byte array. * * @param byteStream * the byte array/stream * @param i * the int */ public static void writeVInt(RandomAccessOutput byteStream, int i) { writeVLong(byteStream, i); }
/** * Writes a zero-compressed encoded int to a byte array. * * @param byteStream * the byte array/stream * @param i * the int */ public static void writeVInt(Output byteStream, int i) { writeVLong(byteStream, i); }
/** * Writes a zero-compressed encoded int to a byte array. * * @param byteStream * the byte array/stream * @param i * the int */ public static void writeVInt(RandomAccessOutput byteStream, int i) { writeVLong(byteStream, i); }
/** * Writes a zero-compressed encoded int to a byte array. * * @param byteStream * the byte array/stream * @param i * the int */ public static void writeVInt(RandomAccessOutput byteStream, int i) { writeVLong(byteStream, i); }
/** * Writes a zero-compressed encoded int to a byte array. * * @param byteStream * the byte array/stream * @param i * the int */ public static void writeVInt(RandomAccessOutput byteStream, int i) { writeVLong(byteStream, i); }
public void writeVLong(long value) { LazyBinaryUtils.writeVLong(this, value); }
public void writeVLong(long value) { LazyBinaryUtils.writeVLong(this, value); }
public void writeVLong(long value) { LazyBinaryUtils.writeVLong(this, value); }
public void writeVLong(long value) { LazyBinaryUtils.writeVLong(this, value); }
@Override void serialize(RandomAccessOutput byteStream, Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, BooleanRef warnedOnceNullMapKey) { LongObjectInspector loi = (LongObjectInspector) objInspector; long v = loi.get(obj); LazyBinaryUtils.writeVLong(byteStream, v); return; } }
public void writeToByteStream(RandomAccessOutput byteStream) { LazyBinaryUtils.writeVLong(byteStream, intervalValue.getTotalSeconds()); LazyBinaryUtils.writeVInt(byteStream, intervalValue.getNanos()); }
public void writeToByteStream(RandomAccessOutput byteStream) { LazyBinaryUtils.writeVLong(byteStream, intervalValue.getTotalSeconds()); LazyBinaryUtils.writeVInt(byteStream, intervalValue.getNanos()); }
public void writeToByteStream(RandomAccessOutput byteStream) { LazyBinaryUtils.writeVLong(byteStream, intervalValue.getTotalSeconds()); LazyBinaryUtils.writeVInt(byteStream, intervalValue.getNanos()); }
public void writeToByteStream(RandomAccessOutput byteStream) { LazyBinaryUtils.writeVLong(byteStream, intervalValue.getTotalSeconds()); LazyBinaryUtils.writeVInt(byteStream, intervalValue.getNanos()); }
@Override public void writeLong(long v) throws IOException { // Every 8 fields we write a NULL byte. if ((fieldIndex % 8) == 0) { if (fieldIndex > 0) { // Write back previous 8 field's NULL byte. output.writeByte(nullOffset, nullByte); nullByte = 0; nullOffset = output.getLength(); } // Allocate next NULL byte. output.reserve(1); } // Set bit in NULL byte when a field is NOT NULL. nullByte |= 1 << (fieldIndex % 8); LazyBinaryUtils.writeVLong(output, v); fieldIndex++; if (fieldIndex == fieldCount) { // Write back the final NULL byte before the last fields. output.writeByte(nullOffset, nullByte); } }