You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/23 02:47:25 UTC

[GitHub] [incubator-inlong] kipshi commented on a change in pull request #3319: [INLONG-3317][Agent] Change the default heartbeat and report interval to 10s

kipshi commented on a change in pull request #3319:
URL: https://github.com/apache/incubator-inlong/pull/3319#discussion_r832797228



##########
File path: inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/task/TaskPositionManager.java
##########
@@ -91,13 +97,15 @@ private Runnable taskPositionFlushThread() {
                         JobProfile jobProfile = jobConfDb.getJobById(jobId);
                         if (jobProfile == null) {
                             LOGGER.warn("jobProfile {} cannot be found in db, "
-                                + "might be deleted by standalone mode, now delete job position in memory", jobId);
+                                    + "might be deleted by standalone mode, now delete job position in memory", jobId);
                             deleteJobPosition(jobId);
                             continue;
                         }
                         flushJobProfile(jobId, jobProfile);
                     }
-                    TimeUnit.SECONDS.sleep(DEFAULT_FLUSH_TIMEOUT);
+                    int flushTime = conf.getInt(AGENT_HEARTBEAT_INTERVAL,
+                            DEFAULT_AGENT_FETCHER_INTERVAL);

Review comment:
       In old cold, HeartBeatManager use the same constant(DEFAULT_FLUSH_TIMEOUT) with TaskPositionManager, so i use HEART_BEAT_INTERVAL instead  




-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org