You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
Repository navigation
Commit bb36292
Browse filesBrowse the repository at this point in the historyBrowse files
This adds a reversed boolean to Query, which will allow endusers to stream rows in reverse order.
Example:
```java
Query query = Query.create("alphabet").range("a", "z").limit(3);
ServerStream<Row> results = client.readRows(query);
for (Row row : results) {
System.out.println(row.getKey().toStringUtf8());
}
// Prints z, y, x
```
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtil.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ public class RowMergerUtil implements AutoCloseable {
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtil.java
+57-58Lines changed: 57 additions & 58 deletions
Original file line number
Diff line number
Diff line change
@@ -50,80 +50,79 @@ public final class RowSetUtil {
50
50
privateRowSetUtil() {}
51
51
52
52
/**
53
-
* Splits the provided {@link RowSet} along the provided splitPoint into 2 segments. The right
54
-
* segment will contain all keys that are strictly greater than the splitPoint and all {@link
55
-
* RowRange}s truncated to start right after the splitPoint. The primary usecase is to resume a
56
-
* broken ReadRows stream.
53
+
* Removes all the keys and range parts that fall on or before the splitPoint.
54
+
*
55
+
* <p>The direction of before is determined by fromStart: for forward scans fromStart is true and
56
+
* will remove all the keys and range segments that would've been read prior to the splitPoint
57
+
* (ie. all of the keys sort lexiographically at or before the split point. For reverse scans,
58
+
* fromStart is false and all segments that sort lexiographically at or after the split point are
59
+
* removed. The primary usecase is to resume a broken ReadRows stream.
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsResumptionStrategy.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,8 @@ public ReadRowsRequest getResumeRequest(ReadRowsRequest originalRequest) {
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/RowMerger.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -61,8 +61,8 @@ public class RowMerger<RowT> implements Reframer<RowT, ReadRowsResponse> {
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/RowMergingCallable.java
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachine.java
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@
76
76
*/
77
77
finalclassStateMachine<RowT> {
78
78
privatefinalRowBuilder<RowT> adapter;
79
+
privatebooleanreversed;
79
80
privateStatecurrentState;
80
81
privateByteStringlastCompleteRowKey;
81
82
@@ -102,9 +103,11 @@ final class StateMachine<RowT> {
102
103
* Initialize a new state machine that's ready for a new row.
103
104
*
104
105
* @param adapter The adapter that will build the final row.
Copy file name to clipboardExpand all lines: java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactoryTest.java
0 commit comments