splitPoints) {
- return split(rowSet, splitPoints, false);
- }
- /**
- * Split a {@link RowSet} into segments.
- *
- * Each segment is defined by a split point. The split point identifies the segment's inclusive
- * end. This means that the first segment will start at the beginning of the table and extend to
- * include the first split point. The last segment will start just after the last split point and
- * extend until the end of the table. The maximum number of segments that can be returned is the
- * number of split points + 1.
- *
- *
Each segment is represented by a RowSet in the returned List. Each of the returned RowSets
- * will contain all of the {@link RowRange}s and keys that fall between the previous segment and
- * this segment's split point. If there are no {@link RowRange}s or keys that belong to a segment,
- * then that segment will either be omitted or if {@code preserveNullSegments} is true, then it
- * will be represented by a null value in the returned list.
- *
- *
The segments in the returned list are guaranteed to be sorted. If {@code
- * preserveNullSegments} is true, then it will have exactly {@code splitPoints.size() + 1} items.
- * The extra segment will contain keys and {@link RowRange}s between the last splitPoint and the
- * end of the table.
- *
- *
Please note that an empty {@link RowSet} is treated like a full table scan and each segment
- * will contain a {@link RowRange} that covers the full extent of the segment.
- */
- @Nonnull
- static List split(
- @Nonnull RowSet rowSet,
- @Nonnull SortedSet splitPoints,
- boolean preserveNullSegments) {
// An empty RowSet represents a full table scan. Make that explicit so that there is RowRange to
// split.
- if (RowSet.getDefaultInstance().equals(rowSet)) {
+ if (rowSet.getRowKeysList().isEmpty() && rowSet.getRowRangesList().isEmpty()) {
rowSet = RowSet.newBuilder().addRowRanges(RowRange.getDefaultInstance()).build();
}
- // Create sorted copies of the ranges and keys in the RowSet
- ByteString[] rowKeys =
- rowSet.getRowKeysList().toArray(new ByteString[rowSet.getRowKeysCount()]);
- RowRange[] rowRanges =
- rowSet.getRowRangesList().toArray(new RowRange[rowSet.getRowRangesCount()]);
+ ArrayDeque keys =
+ rowSet.getRowKeysList().stream()
+ .sorted(ByteStringComparator.INSTANCE)
+ .collect(Collectors.toCollection(ArrayDeque::new));
+ ArrayDeque ranges =
+ rowSet.getRowRangesList().stream()
+ .sorted(Comparator.comparing(StartPoint::extract))
+ .collect(Collectors.toCollection(ArrayDeque::new));
- Arrays.sort(rowKeys, ByteStringComparator.INSTANCE);
- Arrays.sort(rowRanges, RANGE_START_COMPARATOR);
+ List segments = new ArrayList<>();
- List results = Lists.newArrayList();
+ boolean currentSegmentIsEmpty;
+ RowSet.Builder segment;
- // Track consumption of input ranges & keys.
- int rowKeysStart = 0;
- int rowRangesStart = 0;
+ for (ByteString splitPoint : splitPoints) {
+ Preconditions.checkArgument(!splitPoint.isEmpty(), "Can't handle empty splitPoints");
- // Keys and ranges that lie before the current split point,
- RowSet.Builder segment = RowSet.newBuilder();
- boolean isSegmentEmpty = true;
+ segment = RowSet.newBuilder();
+ currentSegmentIsEmpty = true;
- for (ByteString splitPoint : splitPoints) {
- Preconditions.checkState(!splitPoint.isEmpty(), "Split point can't be empty");
-
- // Consume all of the row keys that lie on and to the left of the split point. Consumption is
- // designated by advancing rowKeysStart.
- for (int i = rowKeysStart; i < rowKeys.length; i++) {
- ByteString rowKey = rowKeys[i];
- if (ByteStringComparator.INSTANCE.compare(rowKey, splitPoint) <= 0) {
- segment.addRowKeys(rowKey);
- isSegmentEmpty = false;
- rowKeysStart++;
+ // Handle keys - add all keys strictly < split point
+ while (!keys.isEmpty()) {
+ if (ByteStringComparator.INSTANCE.compare(keys.peek(), splitPoint) < 0) {
+ segment.addRowKeys(keys.poll());
+ currentSegmentIsEmpty = false;
} else {
- // This key and all following keys belong to a later segment.
+ // This key and the following will be in a later segment
break;
}
}
- // Consume all of the ranges that lie before the split point (splitting the range if
- // necessary). Consumption is designated by advancing rowRangesStart.
- for (int i = rowRangesStart; i < rowRanges.length; i++) {
- RowRange rowRange = rowRanges[i];
-
+ // Handle ranges
+ while (!ranges.isEmpty()) {
// Break early when encountering the first start point that is past the split point.
- // (The split point is the inclusive end of of the segment)
- int startCmp = StartPoint.extract(rowRange).compareTo(new StartPoint(splitPoint, true));
- if (startCmp > 0) {
+ // Ranges start on or after the split point lay to the right
+ StartPoint startPoint = StartPoint.extract(ranges.peek());
+ int startCmp =
+ ComparisonChain.start()
+ .compareTrueFirst(startPoint.value.isEmpty(), false)
+ .compare(startPoint.value, splitPoint, ByteStringComparator.INSTANCE)
+ // when start point is on the split point, it will always be on the right
+ .result();
+ if (startCmp >= 0) {
break;
}
-
- // Some part of this range will be in the segment.
- isSegmentEmpty = false;
-
- // Figure out the endpoint and remainder.
- int endCmp = EndPoint.extract(rowRange).compareTo(new EndPoint(splitPoint, true));
- if (endCmp <= 0) {
- // The range is fully contained in the segment.
- segment.addRowRanges(rowRange);
-
- // Consume the range, but take care to shift partially consumed ranges to fill the gap
- // created by consuming the current range. For example if the list contained the following
- // ranges: [a-z], [b-d], [f-z] and the split point was 'e'. Then after processing the
- // split point, the list would contain: (d-z], GAP, [f-z]. So we fill the gap by shifting
- // (d-z] over by one and advancing rowRangesStart.
- // Partially consumed ranges will only exist if the original RowSet had overlapping
- // ranges, this should be a rare occurrence.
- System.arraycopy(
- rowRanges, rowRangesStart, rowRanges, rowRangesStart + 1, i - rowRangesStart);
- rowRangesStart++;
+ RowRange range = ranges.poll();
+
+ @SuppressWarnings("ConstantConditions")
+ EndPoint endPoint = EndPoint.extract(range);
+
+ int endCmp =
+ ComparisonChain.start()
+ .compareFalseFirst(endPoint.value.isEmpty(), false)
+ .compare(endPoint.value, splitPoint, ByteStringComparator.INSTANCE)
+ .compareFalseFirst(endPoint.isClosed, true)
+ .result();
+ if (endCmp < 0) {
+ segment.addRowRanges(range);
+ currentSegmentIsEmpty = false;
} else {
- // The range is split:
- // Add the left part to the segment
- RowRange leftSubRange = rowRange.toBuilder().setEndKeyClosed(splitPoint).build();
- segment.addRowRanges(leftSubRange);
- // Save the remainder for the next segment. This is done by replacing the current rowRange
- // with the remainder and not advancing rowRangesStart.
- RowRange rightSubRange = rowRange.toBuilder().setStartKeyOpen(splitPoint).build();
- rowRanges[i] = rightSubRange;
+ segment.addRowRanges(range.toBuilder().setEndKeyOpen(splitPoint));
+ currentSegmentIsEmpty = false;
+ ranges.addFirst(range.toBuilder().setStartKeyClosed(splitPoint).build());
}
}
- // Build the current segment
- if (!isSegmentEmpty) {
- results.add(segment.build());
- isSegmentEmpty = true;
- segment = RowSet.newBuilder();
- } else if (preserveNullSegments) {
- results.add(null);
+ if (!currentSegmentIsEmpty) {
+ segments.add(segment.build());
}
}
- // Create the last segment (from the last splitKey to the end of the table)
- for (int i = rowKeysStart; i < rowKeys.length; i++) {
- isSegmentEmpty = false;
- segment.addRowKeys(rowKeys[i]);
- }
- for (int i = rowRangesStart; i < rowRanges.length; i++) {
- isSegmentEmpty = false;
- segment.addRowRanges(rowRanges[i]);
- }
- if (!isSegmentEmpty) {
- results.add(segment.build());
- } else if (preserveNullSegments) {
- results.add(null);
+ if (!keys.isEmpty() || !ranges.isEmpty()) {
+ segment = RowSet.newBuilder().addAllRowKeys(keys).addAllRowRanges(ranges);
+ segments.add(segment.build());
}
- return results;
+ return segments;
}
/** Get the bounding range of a {@link RowSet}. */
@@ -297,14 +298,6 @@ public static Split of(RowSet left, RowSet right) {
}
}
- private static final Comparator RANGE_START_COMPARATOR =
- new Comparator() {
- @Override
- public int compare(@Nonnull RowRange o1, @Nonnull RowRange o2) {
- return StartPoint.extract(o1).compareTo(StartPoint.extract(o2));
- }
- };
-
/** Helper class to ease comparison of RowRange start points. */
private static final class StartPoint implements Comparable {
private final ByteString value;
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java
index 555676ffb1..37ec606103 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java
@@ -20,12 +20,13 @@
import com.google.bigtable.v2.RowRange;
import com.google.bigtable.v2.RowSet;
import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange;
-import com.google.common.collect.ImmutableSortedSet;
-import com.google.common.collect.Lists;
+import com.google.common.base.Preconditions;
import com.google.protobuf.ByteString;
import java.util.Arrays;
import java.util.List;
import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -33,423 +34,180 @@
@RunWith(JUnit4.class)
public class RowSetUtilTest {
@Test
- public void noSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("a"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("p"))
- .setEndKeyOpen(ByteString.copyFromUtf8("q")))
- .build();
-
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE).build();
+ public void testSplitFullScan() {
+ RowSet input = RowSet.getDefaultInstance();
+ RowSetUtil.Split split = RowSetUtil.split(input, ByteString.copyFromUtf8("g"));
- verifySplit(rowSet, splitPoints, rowSet);
+ assertThat(split.getLeft()).isEqualTo(parse("-g]"));
+ assertThat(split.getRight()).isEqualTo(parse("(g-"));
}
@Test
- public void splitEmptyTest() {
- RowSet rowSet = RowSet.newBuilder().build();
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("a"))
- .build();
+ public void testSplitAllLeft() {
+ RowSet input = parse("a,c,(a1-c],[a2-c],(a3-c),[a4-c)");
+ RowSetUtil.Split split = RowSetUtil.split(input, ByteString.copyFromUtf8("c"));
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowRanges(RowRange.newBuilder().setEndKeyClosed(ByteString.copyFromUtf8("a")))
- .build(),
- RowSet.newBuilder()
- .addRowRanges(RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("a")))
- .build());
+ assertThat(split.getLeft()).isEqualTo(input);
+ assertThat(split.getRight()).isNull();
}
@Test
- public void splitMultipleKeysTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("1-beforeSplit"))
- .addRowKeys(ByteString.copyFromUtf8("2-onSplit"))
- .addRowKeys(ByteString.copyFromUtf8("3-afterSplit"))
- .build();
+ public void testSplitAllRight() {
+ RowSet input = parse("a1,c,(a-c],[a2-c],(a3-c),[a4-c)");
+ RowSetUtil.Split split = RowSetUtil.split(input, ByteString.copyFromUtf8("a"));
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("2-onSplit"))
- .build();
-
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("1-beforeSplit"))
- .addRowKeys(ByteString.copyFromUtf8("2-onSplit"))
- .build(),
- RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("3-afterSplit")).build());
+ assertThat(split.getLeft()).isNull();
+ assertThat(split.getRight()).isEqualTo(input);
}
@Test
- public void splitKeysEmptyLeft() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("5-test"))
- .addRowKeys(ByteString.copyFromUtf8("8-test"))
- .build();
-
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("0-split"))
- .add(ByteString.copyFromUtf8("6-split"))
- .build();
+ public void testSplit() {
+ RowSet input = parse("a1,c,(a1-c],[a2-c],(a3-c),[a4-c)");
+ RowSetUtil.Split split = RowSetUtil.split(input, ByteString.copyFromUtf8("b"));
- verifySplit(
- rowSet,
- splitPoints,
- null,
- RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("5-test")).build(),
- RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("8-test")).build());
+ assertThat(split.getLeft()).isEqualTo(parse("a1,(a1-b],[a2-b],(a3-b],[a4-b]"));
+ assertThat(split.getRight()).isEqualTo(parse("c,(b-c],(b-c],(b-c),(b-c)"));
}
@Test
- public void splitKeysEmptyRight() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0-test"))
- .addRowKeys(ByteString.copyFromUtf8("2-test"))
- .build();
-
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("1-split"))
- .add(ByteString.copyFromUtf8("5-split"))
- .build();
-
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("0-test")).build(),
- RowSet.newBuilder().addRowKeys(ByteString.copyFromUtf8("2-test")).build(),
- null);
+ public void testShardNoop() {
+ assertShardNoSplit("a,[p-q)");
+ assertShardNoSplit("0_key,[1_range_start-2_range_end)", "3_split");
+ assertShardNoSplit("-1_range_end)", "5_split");
+ assertShardNoSplit("0_key,[1_range_start-2_range_end)", "2_range_end");
+ assertShardNoSplit("9_row_key,(5_range_start-7_range_end)", "3_split");
+ assertShardNoSplit("(5_range_start-", "3_split");
+ assertShardNoSplit("3_split,[3_split-5_split)", "3_split", "5_split");
+ assertShardNoSplit("[3_split-", "3_split");
}
- @Test
- public void rangeLeftOfSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0-key"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("1-range-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("2-range-end")))
- .build();
-
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("3-split"))
- .build();
+ private static void assertShardNoSplit(String rowStr, String... splits) {
+ RowSet input = parse(rowStr);
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0-key"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("1-range-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("2-range-end")))
- .build(),
- null);
+ assertThat(RowSetUtil.shard(input, splitPoints(splits))).containsExactly(input);
}
@Test
- public void unboundedRangeLeftOfSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowRanges(
- RowRange.newBuilder().setEndKeyOpen(ByteString.copyFromUtf8("1-range-end")))
- .build();
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("5-split"))
- .build();
+ public void testShardFullTableScan() {
+ RowSet input = RowSet.getDefaultInstance();
+ SortedSet splitPoints = splitPoints("a");
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowRanges(
- RowRange.newBuilder().setEndKeyOpen(ByteString.copyFromUtf8("1-range-end")))
- .build(),
- null);
+ assertThat(RowSetUtil.shard(input, splitPoints))
+ .containsExactly(parse("-a)"), parse("[a-"))
+ .inOrder();
}
@Test
- public void rangeImmediatelyLeftOfSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0-key"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("1-range-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("2-range-end")))
- .build();
+ public void testShardMultipleKeys() {
+ RowSet input = parse("1_beforeSplit,2_onSplit,3_afterSplit");
+ SortedSet splitPoints = splitPoints("2_onSplit");
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("2-range-end"))
- .build();
-
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0-key"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("1-range-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("2-range-end")))
- .build(),
- null);
+ assertThat(RowSetUtil.shard(input, splitPoints))
+ .containsExactly(parse("1_beforeSplit"), parse("2_onSplit,3_afterSplit"))
+ .inOrder();
}
@Test
- public void rangeRightOfSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("9-row-key"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("5-range-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("7-range-end")))
- .build();
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("3-split"))
- .build();
+ public void testShardKeysEmptyLeft() {
+ RowSet input = parse("5_test,8_test");
+ SortedSet splitPoints = splitPoints("0_split", "6-split");
- verifySplit(
- rowSet,
- splitPoints,
- null,
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("9-row-key"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("5-range-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("7-range-end")))
- .build());
+ assertThat(RowSetUtil.shard(input, splitPoints))
+ .containsExactly(parse("5_test"), parse("8_test"))
+ .inOrder();
}
@Test
- public void unboundedRightOfSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowRanges(
- RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("5-range-start")))
- .build();
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("3-split"))
- .build();
+ public void testShardKeysEmptyRight() {
+ RowSet input = parse("0_test,2_test");
+ SortedSet splitPoints = splitPoints("1_split", "5_split");
- verifySplit(
- rowSet,
- splitPoints,
- null,
- RowSet.newBuilder()
- .addRowRanges(
- RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("5-range-start")))
- .build());
+ assertThat(RowSetUtil.shard(input, splitPoints))
+ .containsExactly(parse("0_test"), parse("2_test"))
+ .inOrder();
}
@Test
- public void rangeExactlyFitsSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("5-split"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("3-split"))
- .setEndKeyClosed(ByteString.copyFromUtf8("5-split")))
- .build();
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("3-split"))
- .add(ByteString.copyFromUtf8("5-split"))
- .build();
-
- verifySplit(
- rowSet,
- splitPoints,
- null,
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("5-split"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("3-split"))
- .setEndKeyClosed(ByteString.copyFromUtf8("5-split")))
- .build(),
- null);
+ public void testShardMixedSplit() {
+ RowSet input = parse("0,a,c,-a],-b],(c-e],(d-f],(m-");
+ SortedSet splitPoints = splitPoints("a", "d", "j", "o");
+
+ assertThat(RowSetUtil.shard(input, splitPoints))
+ .containsExactly(
+ parse("0,-a)"),
+ parse("a,c,[a-a],-b],(c-d)"),
+ parse("[d-e],(d-f]"),
+ parse("(m-o)"),
+ parse("[o-"))
+ .inOrder();
}
@Test
- public void startOnSplitPointTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowRanges(
- RowRange.newBuilder().setStartKeyClosed(ByteString.copyFromUtf8("3-split")))
- .build();
+ public void testShardUnsortedRequest() {
+ RowSet input =
+ parse(
+ "7_row_key_1,2_row_key_2,[8_range_1_start-9_range_1_end),[3_range_2_start-4_range_2_end)");
+ SortedSet splitPoints = splitPoints("5-split");
+
+ assertThat(RowSetUtil.shard(input, splitPoints))
+ .containsExactly(
+ parse("2_row_key_2,[3_range_2_start-4_range_2_end)"),
+ parse("7_row_key_1,[8_range_1_start-9_range_1_end)"))
+ .inOrder();
+ }
- // Inclusive start on a split point should generate 2 segments
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("3-split"))
- .build();
+ private static SortedSet splitPoints(String... s) {
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("3-split"))
- .setEndKeyClosed(ByteString.copyFromUtf8("3-split")))
- .build(),
- RowSet.newBuilder()
- .addRowRanges(RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("3-split")))
- .build());
+ return Arrays.stream(s)
+ .map(ByteString::copyFromUtf8)
+ .collect(Collectors.toCollection(() -> new TreeSet<>(ByteStringComparator.INSTANCE)));
}
- @Test
- public void mixedSplitTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0"))
- .addRowKeys(ByteString.copyFromUtf8("a"))
- .addRowKeys(ByteString.copyFromUtf8("c"))
- // Range 1: fully in "a" segment
- .addRowRanges(RowRange.newBuilder().setEndKeyClosed(ByteString.copyFromUtf8("a")))
- // Range 2: split between segment "a" & "d"
- .addRowRanges(RowRange.newBuilder().setEndKeyClosed(ByteString.copyFromUtf8("b")))
- // Range 3: split between segment "d" & "j"
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("c"))
- .setEndKeyClosed(ByteString.copyFromUtf8("e")))
- // Range 4: fully in "j"
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("d"))
- .setEndKeyClosed(ByteString.copyFromUtf8("f")))
- // Range 5: fully in "j"
- .addRowRanges(RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("m")))
- .build();
-
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- // Split the unbounded
- .add(ByteString.copyFromUtf8("a"))
- .add(ByteString.copyFromUtf8("d"))
- .add(ByteString.copyFromUtf8("j"))
- .add(ByteString.copyFromUtf8("o"))
- .build();
+ private static RowSet parse(String encodedRowSet) {
+ RowSet.Builder builder = RowSet.newBuilder();
- verifySplit(
- rowSet,
- splitPoints,
- // Split "a"
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("0"))
- .addRowKeys(ByteString.copyFromUtf8("a"))
- // Range 1
- .addRowRanges(RowRange.newBuilder().setEndKeyClosed(ByteString.copyFromUtf8("a")))
- // Range 2: part1
- .addRowRanges(RowRange.newBuilder().setEndKeyClosed(ByteString.copyFromUtf8("a")))
- .build(),
- // Split "d"
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("c"))
- // Range 2: part 2
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("a"))
- .setEndKeyClosed(ByteString.copyFromUtf8("b")))
- // Range 3: part 1
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("c"))
- .setEndKeyClosed(ByteString.copyFromUtf8("d")))
- .build(),
- // Split "j"
- RowSet.newBuilder()
- // Range 3: part 2
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("d"))
- .setEndKeyClosed(ByteString.copyFromUtf8("e")))
- // Range 4
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("d"))
- .setEndKeyClosed(ByteString.copyFromUtf8("f")))
- .build(),
- // Split "o"
- RowSet.newBuilder()
- // Range 5: part1
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("m"))
- .setEndKeyClosed(ByteString.copyFromUtf8("o")))
- .build(),
- // Remainder
- RowSet.newBuilder()
- // Range 5: part2
- .addRowRanges(RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("o")))
- .build());
+ for (String s : encodedRowSet.split(",")) {
+ if (s.contains("-")) {
+ builder.addRowRanges(parseRange(s));
+ } else {
+ builder.addRowKeys(ByteString.copyFromUtf8(s));
+ }
+ }
+ return builder.build();
}
- @Test
- public void unsortedRequestTest() {
- RowSet rowSet =
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("7-row-key-1"))
- .addRowKeys(ByteString.copyFromUtf8("2-row-key-2"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("8-range-1-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("9-range-1-end")))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("3-range-2-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("4-range-2-end")))
- .build();
-
- SortedSet splitPoints =
- ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE)
- .add(ByteString.copyFromUtf8("5-split"))
- .build();
+ private static RowRange parseRange(String s) {
+ String[] parts = s.split("-", 2);
+ Preconditions.checkArgument(parts.length == 2, "Ranges must have exactly 2 parts: " + s);
+
+ RowRange.Builder builder = RowRange.newBuilder();
+
+ String encodedStart = parts[0];
+ if ("".equals(encodedStart)) {
+ // noop - start key unset
+ } else if (encodedStart.startsWith("(")) {
+ String value = encodedStart.substring(1);
+ builder.setStartKeyOpen(ByteString.copyFromUtf8(value));
+ } else if (encodedStart.startsWith("[")) {
+ String value = encodedStart.substring(1);
+ builder.setStartKeyClosed(ByteString.copyFromUtf8(value));
+ } else {
+ throw new IllegalArgumentException("unexpected range start format");
+ }
- verifySplit(
- rowSet,
- splitPoints,
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("2-row-key-2"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("3-range-2-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("4-range-2-end")))
- .build(),
- RowSet.newBuilder()
- .addRowKeys(ByteString.copyFromUtf8("7-row-key-1"))
- .addRowRanges(
- RowRange.newBuilder()
- .setStartKeyClosed(ByteString.copyFromUtf8("8-range-1-start"))
- .setEndKeyOpen(ByteString.copyFromUtf8("9-range-1-end")))
- .build());
+ String encodedEnd = parts[1];
+ if (encodedEnd.isEmpty()) {
+ // noop - end key unset
+ } else if (encodedEnd.endsWith(")")) {
+ String value = encodedEnd.substring(0, encodedEnd.length() - 1);
+ builder.setEndKeyOpen(ByteString.copyFromUtf8(value));
+ } else if (encodedEnd.endsWith("]")) {
+ String value = encodedEnd.substring(0, encodedEnd.length() - 1);
+ builder.setEndKeyClosed(ByteString.copyFromUtf8(value));
+ } else {
+ throw new IllegalArgumentException("unexpected range end format");
+ }
+ return builder.build();
}
@Test
@@ -570,17 +328,8 @@ public void multipleRangeBoundTest() {
}
// Helpers
- private static void verifySplit(RowSet input, SortedSet splits, RowSet... expected) {
- List actualWithNull = RowSetUtil.split(input, splits, true);
+ private static void verifyShard(RowSet input, SortedSet splits, RowSet... expected) {
+ List actualWithNull = RowSetUtil.shard(input, splits);
assertThat(actualWithNull).containsExactlyElementsIn(Arrays.asList(expected)).inOrder();
-
- List actualNonnull = RowSetUtil.split(input, splits, false);
- List expectedNonnull = Lists.newArrayList();
- for (RowSet rowSet : expected) {
- if (rowSet != null) {
- expectedNonnull.add(rowSet);
- }
- }
- assertThat(actualNonnull).containsExactlyElementsIn(expectedNonnull).inOrder();
}
}
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java
index a6204890b4..ccb0441c71 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java
@@ -193,7 +193,7 @@ public void shardTestSplitPoints() {
.addRowRanges(
RowRange.newBuilder()
.setStartKeyClosed(ByteString.copyFromUtf8("a"))
- .setEndKeyClosed(ByteString.copyFromUtf8("j"))))
+ .setEndKeyOpen(ByteString.copyFromUtf8("j"))))
.build());
assertThat(subQueries.get(1).toProto(requestContext))
.isEqualTo(
@@ -204,7 +204,7 @@ public void shardTestSplitPoints() {
RowSet.newBuilder()
.addRowRanges(
RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("j"))
+ .setStartKeyClosed(ByteString.copyFromUtf8("j"))
.setEndKeyOpen(ByteString.copyFromUtf8("z"))))
.build());
}
@@ -231,7 +231,7 @@ public void shardTestKeyOffsets() {
.addRowRanges(
RowRange.newBuilder()
.setStartKeyClosed(ByteString.copyFromUtf8("a"))
- .setEndKeyClosed(ByteString.copyFromUtf8("j"))))
+ .setEndKeyOpen(ByteString.copyFromUtf8("j"))))
.build());
assertThat(subQueries.get(1).toProto(requestContext))
.isEqualTo(
@@ -242,7 +242,7 @@ public void shardTestKeyOffsets() {
RowSet.newBuilder()
.addRowRanges(
RowRange.newBuilder()
- .setStartKeyOpen(ByteString.copyFromUtf8("j"))
+ .setStartKeyClosed(ByteString.copyFromUtf8("j"))
.setEndKeyOpen(ByteString.copyFromUtf8("z"))))
.build());
}
From a14de8249d81f01355a87a8bc351bd6bc949c04b Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Fri, 15 Apr 2022 21:36:11 +0200
Subject: [PATCH 7/9] deps: update dependency
com.google.cloud:native-image-support to v0.13.1 (#1222)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.11` -> `0.13.1` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable).
---
samples/native-image-sample/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index 4cfdce75f3..f92984c98d 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -83,7 +83,7 @@
com.google.cloud
native-image-support
- 0.12.11
+ 0.13.1
org.junit.vintage
From acdaa33dbfd91fdf892673ad164016a35e88d695 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Fri, 15 Apr 2022 21:40:20 +0200
Subject: [PATCH 8/9] deps: update dependency
com.google.cloud:google-cloud-shared-dependencies to v2.10.0 (#1221)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.9.0` -> `2.10.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-shared-dependencies
### [`v2.10.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#2100-httpsgithubcomgoogleapisjava-shared-dependenciescomparev290v2100-2022-04-15)
[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.9.0...v2.10.0)
##### Dependencies
- google-cloud-core 2.6.0 ([#668](https://togithub.com/googleapis/java-shared-dependencies/issues/668)) ([22f4d18](https://togithub.com/googleapis/java-shared-dependencies/commit/22f4d1809cbb9848174b3569ab527e4bef00d443))
- reverting protobuf to 3.19.4 ([#657](https://togithub.com/googleapis/java-shared-dependencies/issues/657)) ([8501e6d](https://togithub.com/googleapis/java-shared-dependencies/commit/8501e6d842c10d2370bbd5d5246070134336bddd))
- update dependency com.fasterxml.jackson:jackson-bom to v2.13.2.20220328 ([#646](https://togithub.com/googleapis/java-shared-dependencies/issues/646)) ([7bfd6d7](https://togithub.com/googleapis/java-shared-dependencies/commit/7bfd6d7073859d1955b91b368c6713a72ffa14b6))
- update dependency com.google.api-client:google-api-client-bom to v1.34.0 ([#662](https://togithub.com/googleapis/java-shared-dependencies/issues/662)) ([1b8e378](https://togithub.com/googleapis/java-shared-dependencies/commit/1b8e378fe0ccf2a28c759868caaf5ba593a95728))
- update dependency com.google.errorprone:error_prone_annotations to v2.12.1 ([#652](https://togithub.com/googleapis/java-shared-dependencies/issues/652)) ([1cc80ee](https://togithub.com/googleapis/java-shared-dependencies/commit/1cc80ee984ebcad9bc2a95e2f28c0a49fe924b37))
- update dependency com.google.errorprone:error_prone_annotations to v2.13.0 ([#669](https://togithub.com/googleapis/java-shared-dependencies/issues/669)) ([61b7834](https://togithub.com/googleapis/java-shared-dependencies/commit/61b78341b34a251722be4805a6bdd895cd64836c))
- update dependency com.google.http-client:google-http-client-bom to v1.41.6 ([#654](https://togithub.com/googleapis/java-shared-dependencies/issues/654)) ([140ef40](https://togithub.com/googleapis/java-shared-dependencies/commit/140ef405bc17ed83f5ce177df59affca14fbe49c))
- update dependency com.google.http-client:google-http-client-bom to v1.41.7 ([#658](https://togithub.com/googleapis/java-shared-dependencies/issues/658)) ([f6f93e5](https://togithub.com/googleapis/java-shared-dependencies/commit/f6f93e5b9172c9684623c4c148e4a8fe2fae1e94))
- update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.2 ([#655](https://togithub.com/googleapis/java-shared-dependencies/issues/655)) ([20cd9ed](https://togithub.com/googleapis/java-shared-dependencies/commit/20cd9eda112c96836a5ab7485a4247ed2bc0edb8))
- update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.3 ([#663](https://togithub.com/googleapis/java-shared-dependencies/issues/663)) ([f011a46](https://togithub.com/googleapis/java-shared-dependencies/commit/f011a46c551dba16851b4f8c919c40452fc5d5c3))
- update dependency com.google.protobuf:protobuf-bom to v3.20.0 ([#651](https://togithub.com/googleapis/java-shared-dependencies/issues/651)) ([ad2ff73](https://togithub.com/googleapis/java-shared-dependencies/commit/ad2ff73207dd6493321c77d8eca0022baf13b4ce))
- update dependency io.grpc:grpc-bom to v1.45.1 ([#647](https://togithub.com/googleapis/java-shared-dependencies/issues/647)) ([38e46fc](https://togithub.com/googleapis/java-shared-dependencies/commit/38e46fc4f03af0a02f30ce4a2fa222c71797ae15))
- update dependency org.checkerframework:checker-qual to v3.21.4 ([#650](https://togithub.com/googleapis/java-shared-dependencies/issues/650)) ([125e80a](https://togithub.com/googleapis/java-shared-dependencies/commit/125e80ab2c3225a00c03f5ff5de94872ebb94303))
- update gax.version to v2.15.0 ([#649](https://togithub.com/googleapis/java-shared-dependencies/issues/649)) ([c7f32a6](https://togithub.com/googleapis/java-shared-dependencies/commit/c7f32a68b14520104432282ac9598643700162eb))
- update gax.version to v2.16.0 ([#664](https://togithub.com/googleapis/java-shared-dependencies/issues/664)) ([caaf941](https://togithub.com/googleapis/java-shared-dependencies/commit/caaf941643af04295f5527a0144587d7bf040862))
- update google.common-protos.version to v2.8.1 ([#656](https://togithub.com/googleapis/java-shared-dependencies/issues/656)) ([df4a4a2](https://togithub.com/googleapis/java-shared-dependencies/commit/df4a4a2130a3cdb2965ea42962d1ea6a85506ba7))
- update google.common-protos.version to v2.8.2 ([#659](https://togithub.com/googleapis/java-shared-dependencies/issues/659)) ([b499e2b](https://togithub.com/googleapis/java-shared-dependencies/commit/b499e2bc99506d48d26e35bf6e68c09409ce8b11))
- update google.common-protos.version to v2.8.3 ([#660](https://togithub.com/googleapis/java-shared-dependencies/issues/660)) ([461081c](https://togithub.com/googleapis/java-shared-dependencies/commit/461081c0cf73057c1f6e07fc573453ad467a60ae))
- update iam.version to v1.3.0 ([#648](https://togithub.com/googleapis/java-shared-dependencies/issues/648)) ([6670c4f](https://togithub.com/googleapis/java-shared-dependencies/commit/6670c4f61fcf075c543bfd148eea49796e0662ce))
- update iam.version to v1.3.1 ([#661](https://togithub.com/googleapis/java-shared-dependencies/issues/661)) ([cc8fbe6](https://togithub.com/googleapis/java-shared-dependencies/commit/cc8fbe6eae03341c2ece7d3356febc843a74a812))
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable).
---
google-cloud-bigtable-deps-bom/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml
index 99c7d3fb5c..b003a2c634 100644
--- a/google-cloud-bigtable-deps-bom/pom.xml
+++ b/google-cloud-bigtable-deps-bom/pom.xml
@@ -65,7 +65,7 @@
com.google.cloud
google-cloud-shared-dependencies
- 2.9.0
+ 2.10.0
pom
import
From 6c67dd7c1addf9992da4e2faf931d8a06d766399 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Mon, 18 Apr 2022 15:54:23 +0000
Subject: [PATCH 9/9] chore(main): release 2.6.2 (#1223)
:robot: I have created a release *beep* *boop*
---
### [2.6.2](https://github.com/googleapis/java-bigtable/compare/v2.6.1...v2.6.2) (2022-04-15)
### Dependencies
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#1221](https://github.com/googleapis/java-bigtable/issues/1221)) ([acdaa33](https://github.com/googleapis/java-bigtable/commit/acdaa33dbfd91fdf892673ad164016a35e88d695))
* update dependency com.google.cloud:native-image-support to v0.13.1 ([#1222](https://github.com/googleapis/java-bigtable/issues/1222)) ([a14de82](https://github.com/googleapis/java-bigtable/commit/a14de8249d81f01355a87a8bc351bd6bc949c04b))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 8 ++++++++
google-cloud-bigtable-bom/pom.xml | 14 +++++++-------
google-cloud-bigtable-deps-bom/pom.xml | 2 +-
google-cloud-bigtable-emulator/pom.xml | 8 ++++----
google-cloud-bigtable-stats/pom.xml | 6 +++---
google-cloud-bigtable/pom.xml | 10 +++++-----
.../java/com/google/cloud/bigtable/Version.java | 2 +-
grpc-google-cloud-bigtable-admin-v2/pom.xml | 8 ++++----
grpc-google-cloud-bigtable-v2/pom.xml | 8 ++++----
pom.xml | 12 ++++++------
proto-google-cloud-bigtable-admin-v2/pom.xml | 8 ++++----
proto-google-cloud-bigtable-v2/pom.xml | 8 ++++----
samples/snapshot/pom.xml | 2 +-
versions.txt | 12 ++++++------
14 files changed, 58 insertions(+), 50 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9d543dfae..17d216c8fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+### [2.6.2](https://github.com/googleapis/java-bigtable/compare/v2.6.1...v2.6.2) (2022-04-15)
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#1221](https://github.com/googleapis/java-bigtable/issues/1221)) ([acdaa33](https://github.com/googleapis/java-bigtable/commit/acdaa33dbfd91fdf892673ad164016a35e88d695))
+* update dependency com.google.cloud:native-image-support to v0.13.1 ([#1222](https://github.com/googleapis/java-bigtable/issues/1222)) ([a14de82](https://github.com/googleapis/java-bigtable/commit/a14de8249d81f01355a87a8bc351bd6bc949c04b))
+
### [2.6.1](https://github.com/googleapis/java-bigtable/compare/v2.6.0...v2.6.1) (2022-03-29)
diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml
index b43271c556..052658b805 100644
--- a/google-cloud-bigtable-bom/pom.xml
+++ b/google-cloud-bigtable-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-bigtable-bom
- 2.6.2-SNAPSHOT
+ 2.6.2
pom
com.google.cloud
@@ -62,32 +62,32 @@
com.google.cloud
google-cloud-bigtable
- 2.6.2-SNAPSHOT
+ 2.6.2
com.google.cloud
google-cloud-bigtable-emulator
- 0.143.2-SNAPSHOT
+ 0.143.2
com.google.api.grpc
grpc-google-cloud-bigtable-admin-v2
- 2.6.2-SNAPSHOT
+ 2.6.2
com.google.api.grpc
grpc-google-cloud-bigtable-v2
- 2.6.2-SNAPSHOT
+ 2.6.2
com.google.api.grpc
proto-google-cloud-bigtable-admin-v2
- 2.6.2-SNAPSHOT
+ 2.6.2
com.google.api.grpc
proto-google-cloud-bigtable-v2
- 2.6.2-SNAPSHOT
+ 2.6.2