/** * Print out some subset of a MutationProto rather than all of it and its data * @param proto Protobuf to print out * @return Short String of mutation proto */ static String toShortString(final MutationProto proto) { return "row=" + Bytes.toString(proto.getRow().toByteArray()) + ", type=" + proto.getMutateType().toString(); }
getStringForByteString(actions.getAction(0).hasGet()? actions.getAction(0).getGet().getRow(): actions.getAction(0).getMutation().getRow()); return "region= " + getStringForByteString(actions.getRegion().getValue()) + ", for " + actionsCount + " action(s) and 1st row key=" + row; ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m; return "region= " + getStringForByteString(r.getRegion().getValue()) + ", row=" + getStringForByteString(r.getMutation().getRow()); } else if (m instanceof ClientProtos.CoprocessorServiceRequest) { ClientProtos.CoprocessorServiceRequest r = (ClientProtos.CoprocessorServiceRequest) m;
rm = new RowMutations(action.getMutation().getRow().toByteArray(), actions.size());
assert type == MutationType.PUT: type.name(); long timestamp = proto.hasTimestamp()? proto.getTimestamp(): HConstants.LATEST_TIMESTAMP; Put put = proto.hasRow() ? new Put(proto.getRow().toByteArray(), timestamp) : null; int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0; if (cellCount > 0) { if(qv.hasDeleteType()) { put.add(cellBuilder.clear() .setRow(proto.getRow().toByteArray()) .setFamily(family) .setQualifier(qv.hasQualifier() ? qv.getQualifier().toByteArray() : null)
assert type == MutationType.DELETE : type.name(); long timestamp = proto.hasTimestamp() ? proto.getTimestamp() : HConstants.LATEST_TIMESTAMP; Delete delete = proto.hasRow() ? new Delete(proto.getRow().toByteArray(), timestamp) : null; int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0; if (cellCount > 0) {
private static <T extends Mutation> T toDelta(Function<Bytes, T> supplier, ConsumerWithException<T, Cell> consumer, final MutationProto proto, final CellScanner cellScanner) throws IOException { byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; T mutation = row == null ? null : supplier.apply(new Bytes(row)); int cellCount = proto.hasAssociatedCellCount() ? proto.getAssociatedCellCount() : 0;
MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT || type == MutationType.APPEND : type.name(); byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; Get get = null; int cellCount = proto.hasAssociatedCellCount() ? proto.getAssociatedCellCount() : 0;
getStringForByteString(actions.getAction(0).hasGet()? actions.getAction(0).getGet().getRow(): actions.getAction(0).getMutation().getRow()); return "region= " + getStringForByteString(actions.getRegion().getValue()) + ", for " + r.getRegionActionCount() + ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m; return "region= " + getStringForByteString(r.getRegion().getValue()) + ", row=" + getStringForByteString(r.getMutation().getRow()); } else if (m instanceof ClientProtos.CoprocessorServiceRequest) { ClientProtos.CoprocessorServiceRequest r = (ClientProtos.CoprocessorServiceRequest) m;
/** * Print out some subset of a MutationProto rather than all of it and its data * @param proto Protobuf to print out * @return Short String of mutation proto */ static String toShortString(final MutationProto proto) { return "row=" + Bytes.toString(proto.getRow().toByteArray()) + ", type=" + proto.getMutateType().toString(); }
assert type == MutationType.DELETE : type.name(); long timestamp = proto.hasTimestamp() ? proto.getTimestamp() : HConstants.LATEST_TIMESTAMP; Delete delete = proto.hasRow() ? new Delete(proto.getRow().toByteArray(), timestamp) : null; int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0; if (cellCount > 0) {
assert type == MutationType.PUT: type.name(); long timestamp = proto.hasTimestamp()? proto.getTimestamp(): HConstants.LATEST_TIMESTAMP; Put put = proto.hasRow() ? new Put(proto.getRow().toByteArray(), timestamp) : null; int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0; if (cellCount > 0) { if(qv.hasDeleteType()) { put.add(cellBuilder.clear() .setRow(proto.getRow().toByteArray()) .setFamily(family) .setQualifier(qv.hasQualifier() ? qv.getQualifier().toByteArray() : null)
private static <T extends Mutation> T toDelta(Function<Bytes, T> supplier, ConsumerWithException<T, Cell> consumer, final MutationProto proto, final CellScanner cellScanner) throws IOException { byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; T mutation = row == null ? null : supplier.apply(new Bytes(row)); int cellCount = proto.hasAssociatedCellCount() ? proto.getAssociatedCellCount() : 0;
getStringForByteString(actions.getAction(0).hasGet()? actions.getAction(0).getGet().getRow(): actions.getAction(0).getMutation().getRow()); return "region= " + getStringForByteString(actions.getRegion().getValue()) + ", for " + actionsCount + " action(s) and 1st row key=" + row; ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m; return "region= " + getStringForByteString(r.getRegion().getValue()) + ", row=" + getStringForByteString(r.getMutation().getRow()); } else if (m instanceof ClientProtos.CoprocessorServiceRequest) { ClientProtos.CoprocessorServiceRequest r = (ClientProtos.CoprocessorServiceRequest) m;
MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT || type == MutationType.APPEND : type.name(); byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; Get get = null; int cellCount = proto.hasAssociatedCellCount() ? proto.getAssociatedCellCount() : 0;
/** * Print out some subset of a MutationProto rather than all of it and its data * @param proto Protobuf to print out * @return Short String of mutation proto */ static String toShortString(final MutationProto proto) { return "row=" + Bytes.toString(proto.getRow().toByteArray()) + ", type=" + proto.getMutateType().toString(); }
assert type == MutationType.PUT: type.name(); long timestamp = proto.hasTimestamp()? proto.getTimestamp(): HConstants.LATEST_TIMESTAMP; Put put = proto.hasRow() ? new Put(proto.getRow().toByteArray(), timestamp) : null; int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0; if (cellCount > 0) { if(qv.hasDeleteType()) { put.add(cellBuilder.clear() .setRow(proto.getRow().toByteArray()) .setFamily(family) .setQualifier(qv.hasQualifier() ? qv.getQualifier().toByteArray() : null)
assert type == MutationType.DELETE : type.name(); long timestamp = proto.hasTimestamp() ? proto.getTimestamp() : HConstants.LATEST_TIMESTAMP; Delete delete = proto.hasRow() ? new Delete(proto.getRow().toByteArray(), timestamp) : null; int cellCount = proto.hasAssociatedCellCount()? proto.getAssociatedCellCount(): 0; if (cellCount > 0) {
MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT || type == MutationType.APPEND : type.name(); byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; Get get = null; int cellCount = proto.hasAssociatedCellCount() ? proto.getAssociatedCellCount() : 0;
private static <T extends Mutation> T toDelta(Function<Bytes, T> supplier, ConsumerWithException<T, Cell> consumer, final MutationProto proto, final CellScanner cellScanner) throws IOException { byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; T mutation = row == null ? null : supplier.apply(new Bytes(row)); int cellCount = proto.hasAssociatedCellCount() ? proto.getAssociatedCellCount() : 0;