From 1d4e36696966a5d25680cc8cbbbbe169d4ba72a7 Mon Sep 17 00:00:00 2001 From: Xin Gong Date: Fri, 22 Nov 2024 16:02:24 +0800 Subject: [PATCH] [FLINK-36772][mysql][cdc-base] Fix error placeholder for errorMessageTemplate of Preconditions This closes #3754 --- .../base/source/assigner/SnapshotSplitAssigner.java | 4 ++-- .../mysql/source/assigners/MySqlSnapshotSplitAssigner.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/assigner/SnapshotSplitAssigner.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/assigner/SnapshotSplitAssigner.java index a3a234b732b..d534aef632a 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/assigner/SnapshotSplitAssigner.java +++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/assigner/SnapshotSplitAssigner.java @@ -428,7 +428,7 @@ public AssignerStatus getAssignerStatus() { @Override public void startAssignNewlyAddedTables() { Preconditions.checkState( - isAssigningFinished(assignerStatus), "Invalid assigner status {}", assignerStatus); + isAssigningFinished(assignerStatus), "Invalid assigner status %s", assignerStatus); assignerStatus = assignerStatus.startAssignNewlyTables(); } @@ -436,7 +436,7 @@ public void startAssignNewlyAddedTables() { public void onStreamSplitUpdated() { Preconditions.checkState( isNewlyAddedAssigningSnapshotFinished(assignerStatus), - "Invalid assigner status {}", + "Invalid assigner status %s", assignerStatus); assignerStatus = assignerStatus.onStreamSplitUpdated(); } diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java index 89985ae2f5b..0382cf6e7d7 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java +++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java @@ -471,7 +471,7 @@ public AssignerStatus getAssignerStatus() { public void startAssignNewlyAddedTables() { Preconditions.checkState( AssignerStatus.isAssigningFinished(assignerStatus), - "Invalid assigner status {}", + "Invalid assigner status %s", assignerStatus); assignerStatus = assignerStatus.startAssignNewlyTables(); } @@ -480,7 +480,7 @@ public void startAssignNewlyAddedTables() { public void onBinlogSplitUpdated() { Preconditions.checkState( AssignerStatus.isNewlyAddedAssigningSnapshotFinished(assignerStatus), - "Invalid assigner status {}", + "Invalid assigner status %s", assignerStatus); assignerStatus = assignerStatus.onBinlogSplitUpdated(); }