Hisoka-X commented on code in PR #5914: URL: https://github.com/apache/seatunnel/pull/5914#discussion_r1404703407
########## seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/log4j2.properties: ########## @@ -16,10 +16,10 @@ # limitations under the License. ################################################################################ -rootLogger.level = WARN +rootLogger.level = INFO logger.zeta.name=org.apache.seatunnel.engine -logger.zeta.level=WARN +logger.zeta.level=INFO Review Comment: The log file is too much. Please revert it. You can only set single class like `CheckpointCoordinator` log level to `INFO`. Just like https://github.com/apache/seatunnel/blob/a6bd041dccb5e0442131d94c3715fea3a33d8c35/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/log4j2.properties#L25 ########## seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java: ########## @@ -274,6 +275,11 @@ private CheckpointConfig createJobCheckpointConfig( jobCheckpointConfig.setCheckpointInterval( Long.parseLong( jobEnv.get(EnvCommonOptions.CHECKPOINT_INTERVAL.key()).toString())); + } else if (jobEnv.containsKey(EnvCommonOptions.JOB_MODE.key()) + && jobEnv.get(EnvCommonOptions.JOB_MODE.key()).equals(JobMode.BATCH.name())) { + LOGGER.warning( Review Comment: change to `INFO` level too. ########## seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java: ########## @@ -327,7 +327,13 @@ private void allTaskReady() { InvocationFuture<?>[] futures = notifyTaskStart(); CompletableFuture.allOf(futures).join(); notifyCompleted(latestCompletedCheckpoint); - scheduleTriggerPendingCheckpoint(coordinatorConfig.getCheckpointInterval()); + if (coordinatorConfig.isCheckpointEnable()) { + LOG.info("checkpoint is enabled, start schedule trigger pending checkpoint."); + scheduleTriggerPendingCheckpoint(coordinatorConfig.getCheckpointInterval()); + } else { + LOG.warn( Review Comment: ```suggestion LOG.info( ``` ########## seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/CheckpointEnableIT.java: ########## @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.e2e; + +import org.apache.seatunnel.common.utils.JsonUtils; +import org.apache.seatunnel.e2e.common.TestSuiteBase; +import org.apache.seatunnel.e2e.common.container.EngineType; +import org.apache.seatunnel.e2e.common.container.TestContainer; +import org.apache.seatunnel.e2e.common.container.flink.AbstractTestFlinkContainer; +import org.apache.seatunnel.e2e.common.junit.DisabledOnContainer; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.TestTemplate; +import org.testcontainers.containers.Container; + +import lombok.extern.slf4j.Slf4j; + +import java.io.IOException; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@Slf4j +public class CheckpointEnableIT extends TestSuiteBase { Review Comment: The test case too simple. I think we should add a case of `read for local file and write to local file`, it will contains committer logic, we should make sure it work fine too. You can refer https://github.com/apache/seatunnel/blob/a6bd041dccb5e0442131d94c3715fea3a33d8c35/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-local-e2e/src/test/java/org/apache/seatunnel/e2e/connector/file/local/LocalFileIT.java#L44 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
