This is an automated email from the ASF dual-hosted git repository. jiafengzheng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-flink-connector.git
The following commit(s) were added to refs/heads/master by this push: new 9e68239 [improve] commit message compatible (#220) 9e68239 is described below commit 9e682392d79aa607b68856cc93f761aedeb32dd4 Author: wudi <676366...@qq.com> AuthorDate: Fri Nov 3 10:15:25 2023 +0800 [improve] commit message compatible (#220) --- .../src/main/java/org/apache/doris/flink/sink/ResponseUtil.java | 8 +++----- .../main/java/org/apache/doris/flink/sink/writer/DorisWriter.java | 3 +-- .../org/apache/doris/flink/table/DorisDynamicTableFactory.java | 1 + 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/ResponseUtil.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/ResponseUtil.java index 1e9a9c0..8839a1a 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/ResponseUtil.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/ResponseUtil.java @@ -24,13 +24,11 @@ import java.util.regex.Pattern; */ public class ResponseUtil { public static final Pattern LABEL_EXIST_PATTERN = - Pattern.compile("errCode = 2, detailMessage = Label \\[(.*)\\] " + - "has already been used, relate to txn \\[(\\d+)\\]"); + Pattern.compile("Label \\[(.*)\\] has already been used, relate to txn \\[(\\d+)\\]"); public static final Pattern COMMITTED_PATTERN = - Pattern.compile("errCode = 2, detailMessage = transaction \\[(\\d+)\\] " + - "is already \\b(COMMITTED|committed|VISIBLE|visible)\\b, not pre-committed."); + Pattern.compile("transaction \\[(\\d+)\\] is already \\b(COMMITTED|committed|VISIBLE|visible)\\b, not pre-committed."); public static boolean isCommitted(String msg) { - return COMMITTED_PATTERN.matcher(msg).matches(); + return COMMITTED_PATTERN.matcher(msg).find(); } } diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java index 295a0be..b61d174 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java @@ -33,7 +33,6 @@ import org.apache.flink.api.connector.sink2.Sink; import org.apache.flink.api.connector.sink2.StatefulSink; import org.apache.flink.api.connector.sink2.TwoPhaseCommittingSink; import org.apache.flink.runtime.checkpoint.CheckpointIDCounter; -import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableList; import org.apache.flink.util.Preconditions; import org.apache.flink.util.concurrent.ExecutorThreadFactory; import org.slf4j.Logger; @@ -171,7 +170,7 @@ public class DorisWriter<IN> implements StatefulSink.StatefulSinkWriter<IN, Dori return Collections.emptyList(); } long txnId = respContent.getTxnId(); - return ImmutableList.of(new DorisCommittable(dorisStreamLoad.getHostPort(), dorisStreamLoad.getDb(), txnId)); + return Collections.singletonList(new DorisCommittable(dorisStreamLoad.getHostPort(), dorisStreamLoad.getDb(), txnId)); } @Override diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicTableFactory.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicTableFactory.java index 978fa27..bccb8b7 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicTableFactory.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicTableFactory.java @@ -111,6 +111,7 @@ public final class DorisDynamicTableFactory implements DynamicTableSourceFactory options.add(USERNAME); options.add(PASSWORD); options.add(JDBC_URL); + options.add(AUTO_REDIRECT); options.add(DORIS_READ_FIELD); options.add(DORIS_FILTER_QUERY); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org