Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,43 @@ public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<R
return stub.createReadRowsCallable(rowAdapter);
}

/**
* Streams back the results of the query skipping the large-rows. This callable allows for customization of the logical
* representation of a row. It's meant for advanced use cases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we already have the InternalApi decorator, but can we also make it explicit on the method docs that this is an internal API, it is subject to breaking changes and should not be relied on by user code?

Just want to make sure this is very explicit for now

*
* <p>Sample code:
*
* <pre>{@code
* try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
* String tableId = "[TABLE]";
*
* Query query = Query.create(tableId)
* .range("[START KEY]", "[END KEY]")
* .filter(FILTERS.qualifier().regex("[COLUMN PREFIX].*"));
*
* // Iterator style
* try {
* for(CustomRow row : bigtableDataClient.skipLargeRowsCallable(new CustomRowAdapter()).call(query)) {
* // Do something with row
* }
* } catch (NotFoundException e) {
* System.out.println("Tried to read a non-existent table");
* } catch (RuntimeException e) {
* e.printStackTrace();
* }
* }
* }</pre>
*
* @see ServerStreamingCallable For call styles.
* @see Query For query options.
* @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL.
*/
@InternalApi("only to be used by Bigtable beam connector")
public <RowT> ServerStreamingCallable<Query, RowT> skipLargeRowsCallable(
RowAdapter<RowT> rowAdapter) {
return stub.createSkipLargeRowsCallable(rowAdapter);
}

/**
* Convenience method to synchronously return a sample of row keys in the table. The returned row
* keys will delimit contiguous sections of the table of approximately equal size, which can be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ private <ReqT, RowT> ServerStreamingCallable<ReadRowsRequest, RowT> createReadRo
* <li>Add tracing & metrics.
* </ul>
*/
private <ReqT, RowT> ServerStreamingCallable<Query, RowT> createSkipLargeRowsCallable(
public <ReqT, RowT> ServerStreamingCallable<Query, RowT> createSkipLargeRowsCallable(
RowAdapter<RowT> rowAdapter) {

ServerStreamingCallSettings<ReqT, Row> readRowsSettings =
Expand Down
Loading