Skip to content

Commit abcfb2b

Browse files
author
gituser
committed
Merge branch '1.8_test_3.10.x_oom' into 1.8_test_3.10.x
2 parents 1e23fe6 + 1d2e206 commit abcfb2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rdb/rdb-sink/src/main/java/com/dtstack/flink/sql/sink/rdb/table/RdbTableInfo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
*/
3232
public class RdbTableInfo extends AbstractTargetTableInfo {
3333

34+
public static final int MAX_BATCH_SIZE = 10000;
35+
3436
public static final String URL_KEY = "url";
3537

3638
public static final String TABLE_NAME_KEY = "tableName";
@@ -170,6 +172,10 @@ public boolean check() {
170172
Preconditions.checkNotNull(userName, "rdb field of userName is required");
171173
Preconditions.checkNotNull(password, "rdb field of password is required");
172174

175+
if (null != batchSize) {
176+
Preconditions.checkArgument(batchSize <= MAX_BATCH_SIZE, "batchSize must be less than " + MAX_BATCH_SIZE);
177+
}
178+
173179
if (StringUtils.equalsIgnoreCase(updateMode, EUpdateMode.UPSERT.name())) {
174180
Preconditions.checkArgument(null != getPrimaryKeys() && getPrimaryKeys().size() > 0, "updateMode mode primary is required");
175181
}

0 commit comments

Comments
 (0)