@Test public void testMultiRowRead() { ReadRowsRequest.Builder requestBuilder = ReadRowsRequest.newBuilder().setTableName(TABLE_NAME); requestBuilder.getRowsBuilder().addRowRanges(RowRange.getDefaultInstance()); defaultClient.readRows(requestBuilder.build()); verifyRequestCalled(requestBuilder.build()); }
@Override public ResultScanner<Row> readRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } final ResultScanner<FlatRow> delegate = readFlatRows(request); return new ResultScanner<Row>() { @Override public void close() throws IOException { delegate.close(); } @Override public Row[] next(int count) throws IOException { FlatRow[] flatRows = delegate.next(count); Row[] rows = new Row[flatRows.length]; for (int i = 0; i < flatRows.length; i++) { rows[i] = FlatRowConverter.convert(flatRows[i]); } return rows; } @Override public Row next() throws IOException { return FlatRowConverter.convert(delegate.next()); } @Override public int available() { return delegate.available(); } }; }
BigtableDataGrpcClient implements BigtableDataClient { @Override public ResultScanner<Row> readRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } final ResultScanner<FlatRow> delegate = readFlatRows(request); return new ResultScanner<Row>() { @Override public void close() throws IOException { delegate.close(); } @Override public Row[] next(int count) throws IOException { FlatRow[] flatRows = delegate.next(count); Row[] rows = new Row[flatRows.length]; for (int i = 0; i < flatRows.length; i++) { rows[i] = FlatRowConverter.convert(flatRows[i]); } return rows; } @Override public Row next() throws IOException { return FlatRowConverter.convert(delegate.next()); } @Override public int available() { return delegate.available(); } }; } }
BigtableDataGrpcClient implements BigtableDataClient { @Override public ResultScanner<Row> readRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } final ResultScanner<FlatRow> delegate = readFlatRows(request); return new ResultScanner<Row>() { @Override public void close() throws IOException { delegate.close(); } @Override public Row[] next(int count) throws IOException { FlatRow[] flatRows = delegate.next(count); Row[] rows = new Row[flatRows.length]; for (int i = 0; i < flatRows.length; i++) { rows[i] = FlatRowConverter.convert(flatRows[i]); } return rows; } @Override public Row next() throws IOException { return FlatRowConverter.convert(delegate.next()); } @Override public int available() { return delegate.available(); } }; } BigtableDataGrpcClient(
      Channel channel,
      ScheduledExecutorService retryExecutorService,
      BigtableOptions bigtableOptions); }
BigtableDataGrpcClient implements BigtableDataClient { @Override public ResultScanner<Row> readRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } final ResultScanner<FlatRow> delegate = readFlatRows(request); return new ResultScanner<Row>() { @Override public void close() throws IOException { delegate.close(); } @Override public Row[] next(int count) throws IOException { FlatRow[] flatRows = delegate.next(count); Row[] rows = new Row[flatRows.length]; for (int i = 0; i < flatRows.length; i++) { rows[i] = FlatRowConverter.convert(flatRows[i]); } return rows; } @Override public Row next() throws IOException { return FlatRowConverter.convert(delegate.next()); } @Override public int available() { return delegate.available(); } }; } BigtableDataGrpcClient(
      Channel channel,
      ScheduledExecutorService retryExecutorService,
      BigtableOptions bigtableOptions); @Override void setCallOptionsFactory(CallOptionsFactory callOptionsFactory); @Override MutateRowResponse mutateRow(MutateRowRequest request); @Override ListenableFuture<MutateRowResponse> mutateRowAsync(MutateRowRequest request); @Override List<MutateRowsResponse> mutateRows(MutateRowsRequest request); @Override ListenableFuture<List<MutateRowsResponse>> mutateRowsAsync(MutateRowsRequest request); @Override CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request); @Override ListenableFuture<CheckAndMutateRowResponse> checkAndMutateRowAsync(
      CheckAndMutateRowRequest request); @Override ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request); @Override ListenableFuture<ReadModifyWriteRowResponse> readModifyWriteRowAsync(
      ReadModifyWriteRowRequest request); @Override List<SampleRowKeysResponse> sampleRowKeys(SampleRowKeysRequest request); @Override ListenableFuture<List<SampleRowKeysResponse>> sampleRowKeysAsync(
      SampleRowKeysRequest request); @Override ListenableFuture<List<Row>> readRowsAsync(ReadRowsRequest request); @Override ListenableFuture<List<FlatRow>> readFlatRowsAsync(ReadRowsRequest request); @Override List<FlatRow> readFlatRowsList(ReadRowsRequest request); @Override ResultScanner<Row> readRows(ReadRowsRequest request); @Override ResultScanner<FlatRow> readFlatRows(ReadRowsRequest request); @Override ScanHandler readFlatRows(ReadRowsRequest request, StreamObserver<FlatRow> observer); }
BigtableDataGrpcClient implements BigtableDataClient { @Override public ResultScanner<Row> readRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } final ResultScanner<FlatRow> delegate = readFlatRows(request); return new ResultScanner<Row>() { @Override public void close() throws IOException { delegate.close(); } @Override public Row[] next(int count) throws IOException { FlatRow[] flatRows = delegate.next(count); Row[] rows = new Row[flatRows.length]; for (int i = 0; i < flatRows.length; i++) { rows[i] = FlatRowConverter.convert(flatRows[i]); } return rows; } @Override public Row next() throws IOException { return FlatRowConverter.convert(delegate.next()); } @Override public int available() { return delegate.available(); } }; } BigtableDataGrpcClient(
      Channel channel,
      ScheduledExecutorService retryExecutorService,
      BigtableOptions bigtableOptions); @Override void setCallOptionsFactory(CallOptionsFactory callOptionsFactory); @Override MutateRowResponse mutateRow(MutateRowRequest request); @Override ListenableFuture<MutateRowResponse> mutateRowAsync(MutateRowRequest request); @Override List<MutateRowsResponse> mutateRows(MutateRowsRequest request); @Override ListenableFuture<List<MutateRowsResponse>> mutateRowsAsync(MutateRowsRequest request); @Override CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request); @Override ListenableFuture<CheckAndMutateRowResponse> checkAndMutateRowAsync(
      CheckAndMutateRowRequest request); @Override ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request); @Override ListenableFuture<ReadModifyWriteRowResponse> readModifyWriteRowAsync(
      ReadModifyWriteRowRequest request); @Override List<SampleRowKeysResponse> sampleRowKeys(SampleRowKeysRequest request); @Override ListenableFuture<List<SampleRowKeysResponse>> sampleRowKeysAsync(
      SampleRowKeysRequest request); @Override ListenableFuture<List<Row>> readRowsAsync(ReadRowsRequest request); @Override ListenableFuture<List<FlatRow>> readFlatRowsAsync(ReadRowsRequest request); @Override List<FlatRow> readFlatRowsList(ReadRowsRequest request); @Override ResultScanner<Row> readRows(ReadRowsRequest request); @Override ResultScanner<FlatRow> readFlatRows(ReadRowsRequest request); @Override ScanHandler readFlatRows(ReadRowsRequest request, StreamObserver<FlatRow> observer); @VisibleForTesting
  static final Predicate<MutateRowRequest> IS_RETRYABLE_MUTATION; }