@@ -395,9 +395,20 @@ public Map<String, String> extract(ReadRowsRequest readRowsRequest) {
395395 }
396396
397397 /**
398- * @param rowAdapter
399- * @param <RowT>
400- * @return
398+ * Creates a callable chain to handle bulk ReadRows RPCs. This is meant to be used in ReadRows
399+ * batcher. The chain will:
400+ *
401+ * <ul>
402+ * <li>Convert a {@link Query} into a {@link com.google.bigtable.v2.ReadRowsRequest}.
403+ * <li>Upon receiving the response stream, it will merge the {@link
404+ * com.google.bigtable.v2.ReadRowsResponse.CellChunk}s in logical rows. The actual row
405+ * implementation can be configured in by the {@code rowAdapter} parameter.
406+ * <li>Retry/resume on failure.
407+ * <li>Filter out marker rows.
408+ * <li>Construct a {@link UnaryCallable} that will buffer the entire stream into memory before
409+ * completing. If the stream is empty, then the list will be empty.
410+ * <li>Add tracing & metrics.
411+ * </ul>
401412 */
402413 private <RowT > UnaryCallable <Query , List <RowT >> createBulkReadRowsCallable (
403414 RowAdapter <RowT > rowAdapter ) {
@@ -409,6 +420,8 @@ private <RowT> UnaryCallable<Query, List<RowT>> createBulkReadRowsCallable(
409420
410421 SpanName span = getSpanName ("ReadRows" );
411422
423+ // TracedBatchingContextCallable needs to be the last in the callable chain so Batcher can pass
424+ // a BatchedCallContext to add batching metrics to ApiTracer.
412425 UnaryCallable <Query , List <RowT >> traced =
413426 new TracedBatchedContextCallable <>(
414427 readRowsUserCallable .all (),
@@ -540,7 +553,7 @@ private UnaryCallable<BulkMutation, Void> createBulkMutateRowsCallable() {
540553 userFacing , settings .getHeaderTracer (), spanName .toString ());
541554
542555 // TracedBatchingContextCallable needs to be the last in the callable chain so Batcher can pass
543- // batchingCallContext to add batching metrics to ApiTracer.
556+ // a BatchedCallContext to add batching metrics to ApiTracer.
544557 UnaryCallable <BulkMutation , Void > batchingContextCallable =
545558 new TracedBatchedContextCallable <>(
546559 withHeaderTracer ,
0 commit comments