-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mysql] Improve the dynamic chunk size calculation for table with dense distribution #599
Conversation
...sql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/assigners/ChunkSplitter.java
Outdated
Show resolved
Hide resolved
...sql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/assigners/ChunkSplitter.java
Outdated
Show resolved
Hide resolved
...sql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/assigners/ChunkSplitter.java
Outdated
Show resolved
Hide resolved
...sql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/assigners/ChunkSplitter.java
Outdated
Show resolved
Hide resolved
...sql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/assigners/ChunkSplitter.java
Outdated
Show resolved
Hide resolved
...java/com/ververica/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssignerTest.java
Outdated
Show resolved
Hide resolved
...tor-mysql-cdc/src/test/java/com/ververica/cdc/connectors/mysql/source/MySqlSourceITCase.java
Outdated
Show resolved
Hide resolved
.../src/test/java/com/ververica/cdc/connectors/mysql/debezium/reader/BinlogSplitReaderTest.java
Outdated
Show resolved
Hide resolved
* @return -1, 0, or 1 as this {@code arg1} is numerically less than, equal to, or greater than | ||
* {@code arg2}. | ||
*/ | ||
public static int doubleCompare(Double arg1, Double arg2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameters should never be null, use double
instead.
...or-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/MySqlSourceBuilder.java
Outdated
Show resolved
Hide resolved
...or-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/MySqlSourceBuilder.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/ververica/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/ververica/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java
Outdated
Show resolved
Hide resolved
@@ -254,11 +257,12 @@ private void testMySqlParallelSource( | |||
} | |||
|
|||
private String getTableName(String[] captureCustomerTables) { | |||
checkState(captureCustomerTables.length > 0); | |||
if (captureCustomerTables.length == 1) { | |||
return "customers"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return captureCustomerTables[0]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
No description provided.