@Override protected void writeNull(Put put) throws IOException { nextField(); }
@Override protected void writeNull(Put put) throws IOException { nextField(); }
@Override protected void writeInt(Put put, int val) throws IOException { put.add(nextField(), val); }
@Override protected void writeBool(Put put, Boolean val) throws IOException { put.add(nextField(), val); }
@Override protected void writeBytes(Put put, byte[] val) throws IOException { put.add(nextField(), val); }
@Override protected void writeLong(Put put, long val) throws IOException { put.add(nextField(), val); }
@Override protected void writeFloat(Put put, Float val) throws IOException { put.add(nextField(), val); }
@Override protected void writeFloat(Put put, Float val) throws IOException { put.add(nextField(), val); }
@Override protected void writeDouble(Put put, Double val) throws IOException { put.add(nextField(), val); }
@Override protected void writeDouble(Put put, Double val) throws IOException { put.add(nextField(), val); }
@Override protected void writeString(Put put, String val) throws IOException { put.add(nextField(), val); }
@Override protected void writeBytes(Put put, byte[] val) throws IOException { put.add(nextField(), val); }
@Override protected void writeInt(Put put, int val) throws IOException { put.add(nextField(), val); }
@Override protected void writeLong(Put put, long val) throws IOException { put.add(nextField(), val); }
@Override protected void writeString(Put put, String val) throws IOException { put.add(nextField(), val); }
@Override protected void writeBool(Put put, Boolean val) throws IOException { put.add(nextField(), val); }
@Override protected void writeBytes(Put put, ByteBuffer val) throws IOException { put.add(nextField(), Bytes.toBytes(val)); }
@Override protected void writeBytes(Put put, ByteBuffer val) throws IOException { put.add(nextField(), Bytes.toBytes(val)); }
@Override protected void writeUnion(Put put, Object val, Schema schema) throws IOException { // only support unions if its for a nullable. if (!schema.isNullable()) { throw new UnsupportedOperationException("Unions that do not represent nullables are not supported."); } if (val != null) { seenRefs.remove(val); write(put, val, schema.getNonNullable()); } else { // if the value is null, we want to generate a put with value null, to make sure to delete any existing values. put.add(nextField(), (byte[]) null); } } }
@Override protected void writeUnion(Put put, Object val, Schema schema) throws IOException { // only support unions if its for a nullable. if (!schema.isNullable()) { throw new UnsupportedOperationException("Unions that do not represent nullables are not supported."); } if (val != null) { seenRefs.remove(val); write(put, val, schema.getNonNullable()); } else { // if the value is null, we want to generate a put with value null, to make sure to delete any existing values. put.add(nextField(), (byte[]) null); } } }