@java.lang.Override public com.google.bigtable.v2.ReadRowsRequest getDefaultInstanceForType() { return com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance(); }
/** * * * <pre> * The unique name of the table from which to read. * Values are of the form * `projects/<project>/instances/<instance>/tables/<table>`. * </pre> * * <code>string table_name = 1;</code> */ public Builder clearTableName() { tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } /**
/** * * * <pre> * This value specifies routing for replication. If not specified, the * "default" application profile will be used. * </pre> * * <code>string app_profile_id = 5;</code> */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); onChanged(); return this; } /**
@Test public void testRealRow() { Row row = buildRealRow(); ServerStreamingStashCallable<ReadRowsRequest, Row> innerCallable = new ServerStreamingStashCallable<>(Lists.newArrayList(row)); FilterMarkerRowsCallable<Row> filterCallable = new FilterMarkerRowsCallable<>(innerCallable, rowAdapter); ServerStream<Row> results = filterCallable.call(ReadRowsRequest.getDefaultInstance()); assertThat(results).containsExactly(row); }
@Test public void testOnlyMarker() { ServerStreamingStashCallable<ReadRowsRequest, Row> innerCallable = new ServerStreamingStashCallable<>(Lists.newArrayList(buildScanMarker())); FilterMarkerRowsCallable<Row> filterCallable = new FilterMarkerRowsCallable<>(innerCallable, rowAdapter); ServerStream<Row> results = filterCallable.call(ReadRowsRequest.getDefaultInstance()); assertThat(results).isEmpty(); }
@Test public void testEmpty() { ServerStreamingStashCallable<ReadRowsRequest, Row> innerCallable = new ServerStreamingStashCallable<>(); FilterMarkerRowsCallable<Row> filterCallable = new FilterMarkerRowsCallable<>(innerCallable, rowAdapter); ServerStream<Row> results = filterCallable.call(ReadRowsRequest.getDefaultInstance()); assertThat(results).isEmpty(); }
@Test public void testMixed() { Row row = buildRealRow(); Row markerRow = buildScanMarker(); ServerStreamingStashCallable<ReadRowsRequest, Row> innerCallable = new ServerStreamingStashCallable<>(Lists.newArrayList(row, markerRow)); FilterMarkerRowsCallable<Row> filterCallable = new FilterMarkerRowsCallable<>(innerCallable, rowAdapter); ServerStream<Row> results = filterCallable.call(ReadRowsRequest.getDefaultInstance()); assertThat(results).containsExactly(row); }
@Test(expected = IllegalArgumentException.class) public void testFromProtoWithEmptyTableId() { Query.fromProto(ReadRowsRequest.getDefaultInstance()); expect.expect(IllegalArgumentException.class); expect.expectMessage("Invalid table name:"); } }
@Test public void scanMarker() { FakeStreamingApi.ServerStreamingStashCallable<ReadRowsRequest, ReadRowsResponse> inner = new ServerStreamingStashCallable<>( Lists.newArrayList( // send a scan marker ReadRowsResponse.newBuilder() .setLastScannedRowKey(ByteString.copyFromUtf8("key1")) .build())); RowMergingCallable<Row> rowMergingCallable = new RowMergingCallable<>(inner, new DefaultRowAdapter()); List<Row> results = rowMergingCallable.all().call(ReadRowsRequest.getDefaultInstance()); Truth.assertThat(results) .containsExactly( Row.create(ByteString.copyFromUtf8("key1"), Lists.<RowCell>newArrayList())); }
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
ServerStream<Row> stream = mergingCallable.call(ReadRowsRequest.getDefaultInstance());
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@java.lang.Override public com.google.bigtable.v2.ReadRowsRequest getDefaultInstanceForType() { return com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance(); }
public com.google.bigtable.v2.ReadRowsRequest getDefaultInstanceForType() { return com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance(); }
/** * <pre> * The unique name of the table from which to read. * Values are of the form * projects/&lt;project&gt;/instances/&lt;instance&gt;/tables/&lt;table&gt; * </pre> * * <code>string table_name = 1;</code> */ public Builder clearTableName() { tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } /**
/** * * * <pre> * This value specifies routing for replication. If not specified, the * "default" application profile will be used. * </pre> * * <code>string app_profile_id = 5;</code> */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); onChanged(); return this; } /**
/** * * * <pre> * The unique name of the table from which to read. * Values are of the form * `projects/<project>/instances/<instance>/tables/<table>`. * </pre> * * <code>string table_name = 1;</code> */ public Builder clearTableName() { tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } onChanged(); return this; }
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(