private byte[] getMutationBytes() { try { MutationProto m = toMutationProto(this.mutation); return m.toByteArray(); } catch (IOException e) { throw new IllegalArgumentException("Failed to get bytes for mutation!", e); } }
private byte[] getMutationBytes() { try { MutationProto m = toMutationProto(this.mutation); return m.toByteArray(); } catch (IOException e) { throw new IllegalArgumentException("Failed to get bytes for mutation!", e); } }
private byte[] getMutationBytes() { try { MutationProto m = toMutationProto(this.mutation); return m.toByteArray(); } catch (IOException e) { throw new IllegalArgumentException("Failed to get bytes for mutation!", e); } }
/** * Internal write the underlying data for the entry - this does not do any special prefixing. Writing should be done * via {@link KeyValueCodec#write(DataOutput, KeyValue)} to ensure consistent reading/writing of * {@link IndexedKeyValue}s. * * @param out * to write data to. Does not close or flush the passed object. * @throws IOException * if there is a problem writing the underlying data */ void writeData(DataOutput out) throws IOException { Bytes.writeByteArray(out, this.indexTableName.get()); MutationProto m = toMutationProto(this.mutation); Bytes.writeByteArray(out, m.toByteArray()); }
@Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { AbstractFillFromArchiveTask.FillResult fillResult = task.apply(value); for (Put put : fillResult.getVariantPuts()) { ClientProtos.MutationProto proto = ProtobufUtil.toMutation(ClientProtos.MutationProto.MutationType.PUT, put); context.write(new BytesWritable(put.getRow()), new BytesWritable(proto.toByteArray())); } for (Put put : fillResult.getSamplesIndexPuts()) { setSampleIndexTablePut(put); ClientProtos.MutationProto proto = ProtobufUtil.toMutation(ClientProtos.MutationProto.MutationType.PUT, put); context.write(new BytesWritable(put.getRow()), new BytesWritable(proto.toByteArray())); } updateStats(context); }
/** * Internal write the underlying data for the entry - this does not do any special prefixing. Writing should be done * via {@link KeyValueCodec#write(DataOutput, KeyValue)} to ensure consistent reading/writing of * {@link IndexedKeyValue}s. * * @param out * to write data to. Does not close or flush the passed object. * @throws IOException * if there is a problem writing the underlying data */ void writeData(DataOutput out) throws IOException { Bytes.writeByteArray(out, this.indexTableName.get()); MutationProto m = toMutationProto(this.mutation); Bytes.writeByteArray(out, m.toByteArray()); }
/** * Internal write the underlying data for the entry - this does not do any special prefixing. Writing should be done * via {@link KeyValueCodec#write(DataOutput, KeyValue)} to ensure consistent reading/writing of * {@link IndexedKeyValue}s. * * @param out * to write data to. Does not close or flush the passed object. * @throws IOException * if there is a problem writing the underlying data */ void writeData(DataOutput out) throws IOException { Bytes.writeByteArray(out, this.indexTableName.get()); MutationProto m = toMutationProto(this.mutation); Bytes.writeByteArray(out, m.toByteArray()); }