You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by zi...@apache.org on 2022/08/19 09:18:21 UTC
[inlong] branch master updated: [INLONG-5601][Agent] Update the default triggering policy for file collection is FULL (#5602)
This is an automated email from the ASF dual-hosted git repository.
zirui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new c6de3bcde [INLONG-5601][Agent] Update the default triggering policy for file collection is FULL (#5602)
c6de3bcde is described below
commit c6de3bcde8b111ce628816eac56f7d14bee3a6e3
Author: ganfengtan <Ga...@users.noreply.github.com>
AuthorDate: Fri Aug 19 17:18:16 2022 +0800
[INLONG-5601][Agent] Update the default triggering policy for file collection is FULL (#5602)
---
.../apache/inlong/agent/core/trigger/TriggerManager.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/trigger/TriggerManager.java b/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/trigger/TriggerManager.java
index 4ede279ea..4b3b3b304 100755
--- a/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/trigger/TriggerManager.java
+++ b/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/trigger/TriggerManager.java
@@ -116,14 +116,18 @@ public class TriggerManager extends AbstractDaemon {
}
/**
- * Preprocessing before adding trigger
+ * Preprocessing before adding trigger, default value FULL
+ *
+ * FULL: All directory by regex
+ * INCREMENT: Directory entry created
*/
public void preprocessTrigger(TriggerProfile profile) {
- String syncType = profile.get(JobConstants.JOB_FILE_COLLECT_TYPE, "");
- if (FileCollectType.FULL.equals(syncType)) {
- LOGGER.info("Initialize submit full path. trigger {} ", profile.getTriggerId());
- manager.getJobManager().submitFileJobProfile(profile);
+ String syncType = profile.get(JobConstants.JOB_FILE_COLLECT_TYPE, FileCollectType.FULL);
+ if (FileCollectType.INCREMENT.equals(syncType)) {
+ return;
}
+ LOGGER.info("initialize submit full path. trigger {} ", profile.getTriggerId());
+ manager.getJobManager().submitFileJobProfile(profile);
}
private Runnable jobFetchThread() {