You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/04/06 19:36:21 UTC

[GitHub] [beam] diegomez17 commented on a diff in pull request #16939: Fix: Splitting scans into smaller chunks to buffer reads

diegomez17 commented on code in PR #16939:
URL: https://github.com/apache/beam/pull/16939#discussion_r844326495


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java:
##########
@@ -110,34 +118,49 @@ public boolean tableExists(String tableId) throws IOException {
   static class BigtableReaderImpl implements Reader {

Review Comment:
   Done.



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java:
##########
@@ -154,27 +177,98 @@ public boolean start() throws IOException {
               session.getOptions().getProjectId(),
               session.getOptions().getInstanceId(),
               source.getTableId().get()));
-      ServiceCallMetric serviceCallMetric =
+      serviceCallMetric =
           new ServiceCallMetric(MonitoringInfoConstants.Urns.API_REQUEST_COUNT, baseLabels);
-      ReadRowsRequest.Builder requestB =
-          ReadRowsRequest.newBuilder().setRows(rowSet).setTableName(tableNameSr);
-      if (source.getRowFilter() != null) {
-        requestB.setFilter(source.getRowFilter());
+
+      future = session.getDataClient().readRowsAsync(buildReadRowsRequest());
+      return advance();
+    }
+
+    @Override
+    public boolean advance() throws IOException {
+      if (buffer.isEmpty()) {

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org