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
Copy file name to clipboardExpand all lines: v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/source/reader/io/jdbc/uniformsplitter/UniformSplitterDBAdapter.java
Copy file name to clipboardExpand all lines: v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/source/reader/io/jdbc/uniformsplitter/range/Range.java
+48-3Lines changed: 48 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,15 @@ public abstract class Range implements Serializable, Comparable<Range> {
49
49
*/
50
50
publicabstractlongcount();
51
51
52
+
/**
53
+
* Approximate count (e.g., from EXPLAIN query) of a given range. Defaults to {@link
54
+
* Range#INDETERMINATE_COUNT}. If not explicitly assigned, defaults to whatever {@link #count()}
55
+
* is set to.
56
+
*
57
+
* @return approximate count of rows represented by the range.
58
+
*/
59
+
publicabstractlongapproxCount();
60
+
52
61
/**
53
62
* Height for this range. The leaf child always has a height of 0. Defaults to 0.
54
63
*
@@ -103,6 +112,7 @@ public TableIdentifier tableIdentifier() {
Copy file name to clipboardExpand all lines: v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/source/reader/io/jdbc/uniformsplitter/range/TableSplitSpecification.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -150,10 +150,13 @@ public TableSplitSpecification build() {
150
150
}
151
151
152
152
if (!splitStagesCount().isPresent()) {
153
-
setSplitStagesCount(
153
+
longbaseStages =
154
154
logToBaseTwo(maxPartitionsHint)
155
155
+ partitionColumns().size()
156
-
+ 1/* For initial counts */);
156
+
+ 1/* For initial counts */;
157
+
// We add 1/4th more stages to the total count to accommodate for the initial phase
158
+
// of the pipeline where only approximate counts are performed.
Copy file name to clipboardExpand all lines: v2/sourcedb-to-spanner/src/main/java/com/google/cloud/teleport/v2/source/reader/io/jdbc/uniformsplitter/transforms/RangeClassifierDoFn.java
+43-9Lines changed: 43 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,8 @@
53
53
* <li><b>Multi-Column Splitting</b>: When a range on a single column becomes too large but cannot
54
54
* be split further (e.g., all rows have the same value for that column), it triggers the
55
55
* addition of the next configured partition column.
56
+
* <li><b>Multi-Round Adaptive Memory Halving</b>: For extremely large ranges (hotspots), multiple
57
+
* rounds of memory splitting are performed in a single stage to accelerate convergence.
0 commit comments