/** * Convert a protocol buffer Mutate to an Append * @param cellScanner * @param proto the protocol buffer Mutate to convert * @return the converted client Append * @throws IOException */ public static Append toAppend(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.APPEND : type.name(); Append append = toDelta((Bytes row) -> new Append(row.get(), row.getOffset(), row.getLength()), Append::add, proto, cellScanner); if (proto.hasTimeRange()) { TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); append.setTimeRange(timeRange.getMin(), timeRange.getMax()); } return append; }
/** * Convert a protocol buffer Mutate to an Increment * * @param proto the protocol buffer Mutate to convert * @return the converted client Increment * @throws IOException */ public static Increment toIncrement(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT : type.name(); Increment increment = toDelta((Bytes row) -> new Increment(row.get(), row.getOffset(), row.getLength()), Increment::add, proto, cellScanner); if (proto.hasTimeRange()) { TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); increment.setTimeRange(timeRange.getMin(), timeRange.getMax()); } return increment; }
TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); get.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); scan.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); scan.setTimeRange(timeRange.getMin(), timeRange.getMax());
/** * Convert a protocol buffer Mutate to an Increment * * @param proto the protocol buffer Mutate to convert * @return the converted client Increment * @throws IOException */ public static Increment toIncrement(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT : type.name(); Increment increment = toDelta((Bytes row) -> new Increment(row.get(), row.getOffset(), row.getLength()), Increment::add, proto, cellScanner); if (proto.hasTimeRange()) { TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); increment.setTimeRange(timeRange.getMin(), timeRange.getMax()); } return increment; }
/** * Convert a protocol buffer Mutate to an Append * @param cellScanner * @param proto the protocol buffer Mutate to convert * @return the converted client Append * @throws IOException */ public static Append toAppend(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.APPEND : type.name(); Append append = toDelta((Bytes row) -> new Append(row.get(), row.getOffset(), row.getLength()), Append::add, proto, cellScanner); if (proto.hasTimeRange()) { TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); append.setTimeRange(timeRange.getMin(), timeRange.getMax()); } return append; }
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); get.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); scan.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); scan.setTimeRange(timeRange.getMin(), timeRange.getMax());
/** * Convert a protocol buffer Mutate to an Append * @param cellScanner * @param proto the protocol buffer Mutate to convert * @return the converted client Append * @throws IOException */ public static Append toAppend(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.APPEND : type.name(); Append append = toDelta((Bytes row) -> new Append(row.get(), row.getOffset(), row.getLength()), Append::add, proto, cellScanner); if (proto.hasTimeRange()) { TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); append.setTimeRange(timeRange.getMin(), timeRange.getMax()); } return append; }
/** * Convert a protocol buffer Mutate to an Increment * * @param proto the protocol buffer Mutate to convert * @return the converted client Increment * @throws IOException */ public static Increment toIncrement(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT : type.name(); Increment increment = toDelta((Bytes row) -> new Increment(row.get(), row.getOffset(), row.getLength()), Increment::add, proto, cellScanner); if (proto.hasTimeRange()) { TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); increment.setTimeRange(timeRange.getMin(), timeRange.getMax()); } return increment; }
TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); get.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); scan.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); scan.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); get.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); get.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(cftr.getTimeRange()); scan.setColumnFamilyTimeRange(cftr.getColumnFamily().toByteArray(), timeRange.getMin(), timeRange.getMax()); TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); scan.setTimeRange(timeRange.getMin(), timeRange.getMax());
TimeRange timeRange = protoToTimeRange(proto.getTimeRange()); increment.setTimeRange(timeRange.getMin(), timeRange.getMax());