From 5da50e90e6c78700d48d7468849d4a1599a249b3 Mon Sep 17 00:00:00 2001 From: EmmettCox Date: Tue, 5 Feb 2019 16:16:40 +0000 Subject: adding FILENAME value to LOG_RECORDS table. Change-Id: Iea49d196f324b3a03a18d3d2084e5f6c7ad226ea Issue-ID: DMAAP-1022 Signed-off-by: EmmettCox --- .../src/main/java/org/onap/dmaap/datarouter/node/LogManager.java | 2 +- .../java/org/onap/dmaap/datarouter/node/NodeConfigManager.java | 8 ++++---- .../src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'datarouter-node/src/main/java/org') diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/LogManager.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/LogManager.java index ee81a321..1d5f76f6 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/LogManager.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/LogManager.java @@ -188,7 +188,7 @@ public class LogManager extends TimerTask { uploaddir = logdir + "/.spool"; (new File(uploaddir)).mkdirs(); long now = System.currentTimeMillis(); - long intvl = StatusLog.parseInterval(config.getEventLogInterval(), 300000); + long intvl = StatusLog.parseInterval(config.getEventLogInterval(), 30000); long when = now - now % intvl + intvl + 20000L; config.getTimer().scheduleAtFixedRate(this, when - now, intvl); worker = new Uploader(); diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java index 50baef5c..474f5dde 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeConfigManager.java @@ -185,7 +185,7 @@ public class NodeConfigManager implements DeliveryQueueHelper { private void localconfig() { followredirects = Boolean.parseBoolean(getProvParam("FOLLOW_REDIRECTS", "false")); - eventloginterval = getProvParam("LOGROLL_INTERVAL", "5m"); + eventloginterval = getProvParam("LOGROLL_INTERVAL", "30s"); initfailuretimer = 10000; maxfailuretimer = 3600000; expirationtimer = 86400000; @@ -365,13 +365,13 @@ public class NodeConfigManager implements DeliveryQueueHelper { * Get a provisioned configuration parameter (from the provisioning server configuration) * * @param name The name of the parameter - * @param deflt The value to use if the parameter is not defined + * @param defaultValue The value to use if the parameter is not defined * @return The value of the parameter or deflt if it is not defined. */ - public String getProvParam(String name, String deflt) { + public String getProvParam(String name, String defaultValue) { name = config.getProvParam(name); if (name == null) { - name = deflt; + name = defaultValue; } return (name); } diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java index 43c4fda4..c8a7bd0c 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java @@ -53,7 +53,7 @@ public class StatusLog { } /** - * Parse an interval of the form xxhyymzzs and round it to the nearest whole fraction of 24 hours. If no units are specified, assume seconds. + * Parse an interval of the form xxhyymzzs and round it to the nearest whole fraction of 24 hours.If no units are specified, assume seconds. */ public static long parseInterval(String interval, int def) { try { -- cgit 1.2.3-korg