public void write(Kryo kryo, Output output, HiveKey object) { output.writeVarInt(object.getLength(), true); output.write(object.getBytes(), 0, object.getLength()); output.writeVarInt(object.hashCode(), false); }
public void write(Kryo kryo, Output output, BytesWritable object) { output.writeVarInt(object.getLength(), true); output.write(object.getBytes(), 0, object.getLength()); }
public void write(Kryo kryo, Output output, HiveKey object) { output.writeVarInt(object.getLength(), true); output.write(object.getBytes(), 0, object.getLength()); }
/** Writes a 1-5 byte int. This stream may consider such a variable length encoding request as a hint. It is not guaranteed * that a variable length encoding will be really used. The stream may decide to use native-sized integer representation for * efficiency reasons. * * @param optimizePositive If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be * inefficient (5 bytes). */ public int writeInt (int value, boolean optimizePositive) throws KryoException { return writeVarInt(value, optimizePositive); }
public void write (Kryo kryo, Output output, byte[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeBytes(object); }
public void write (Kryo kryo, Output output, short[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeShorts(object); }
public void write (Kryo kryo, Output output, double[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeDoubles(object); }
public void write (Kryo kryo, Output output, boolean[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); for (int i = 0, n = object.length; i < n; i++) output.writeBoolean(object[i]); }
public void write (Kryo kryo, Output output, byte[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeBytes(object); }
public void write (Kryo kryo, Output output, float[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeFloats(object); }
public void write (Kryo kryo, Output output, double[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeDoubles(object); }
public void write (Kryo kryo, Output output, short[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeShorts(object); }
public void write (Kryo kryo, Output output, int[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeInts(object, false); }
public void write (Kryo kryo, Output output, int[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeInts(object, false); }
public void write (Kryo kryo, Output output, short[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeShorts(object); }
public void write (Kryo kryo, Output output, double[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeDoubles(object); }
public void write (Kryo kryo, Output output, float[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); output.writeFloats(object); }
public void write (Kryo kryo, Output output, boolean[] object) { if (object == null) { output.writeVarInt(NULL, true); return; } output.writeVarInt(object.length + 1, true); for (int i = 0, n = object.length; i < n; i++) output.writeBoolean(object[i]); }
public void write (Kryo kryo, Output output, T object) { CachedField[] fields = getFields(); output.writeVarInt(writeFieldCount, true); // Can be used for null. for (int i = 0, n = fields.length; i < n; i++) { if (deprecated[i]) continue; output.writeVarInt(tags[i], true); fields[i].write(output, object); } }
public void write (Kryo kryo, Output output, BigDecimal object) { if (object == null) { output.writeVarInt(NULL, true); return; } BigDecimal value = (BigDecimal)object; bigIntegerSerializer.write(kryo, output, value.unscaledValue()); output.writeInt(value.scale(), false); }