in src/main/java/org/apache/doris/kafka/connector/utils/ConfigCheckUtils.java [333:361]
public static boolean validateGroupCommitMode(DorisOptions dorisOptions) {
Properties streamLoadProp = dorisOptions.getStreamLoadProp();
boolean enable2PC = dorisOptions.enable2PC();
boolean force2PC = dorisOptions.force2PC();
if (!streamLoadProp.containsKey(LoadConstants.GROUP_COMMIT)) {
return false;
}
Object value = streamLoadProp.get(LoadConstants.GROUP_COMMIT);
String normalizedValue = value.toString().trim().toLowerCase();
if (!GroupCommitMode.instances().contains(normalizedValue)) {
throw new DorisException(
"The value of group commit mode is an illegal parameter, illegal value="
+ value);
} else if (enable2PC && force2PC) {
throw new DorisException(
"When group commit is enabled, you should disable two phase commit! Please set 'enable.2pc':'false'");
} else if (streamLoadProp.containsKey(PARTIAL_COLUMNS)
&& streamLoadProp.get(PARTIAL_COLUMNS).equals("true")) {
throw new DorisException(
"When group commit is enabled,you can not load data with partial column update.");
} else if (enable2PC) {
// The default enable2PC is true, in the scenario of group commit, it needs to be closed
LOG.info(
"The Group Commit mode is on, the two phase commit default value should be disabled.");
dorisOptions.setEnable2PC(false);
}
return true;
}