You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by zu...@apache.org on 2024/05/28 03:19:47 UTC
(incubator-uniffle) branch master updated: [#1711][FOLLOWUP] fix(server): Avoid outputing too much incorrect non-update logs (#1737)
This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 59b899eb1 [#1711][FOLLOWUP] fix(server): Avoid outputing too much incorrect non-update logs (#1737)
59b899eb1 is described below
commit 59b899eb19e3dbca32b6a81251ec17fc21671a52
Author: Junfan Zhang <zu...@apache.org>
AuthorDate: Tue May 28 11:19:42 2024 +0800
[#1711][FOLLOWUP] fix(server): Avoid outputing too much incorrect non-update logs (#1737)
### What changes were proposed in this pull request?
Avoid outputing too much incorrect non-update logs
### Why are the changes needed?
follow up #1711
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Yes
---
.../uniffle/common/ReconfigurableConfManager.java | 27 +++++++++++++---------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/common/src/main/java/org/apache/uniffle/common/ReconfigurableConfManager.java b/common/src/main/java/org/apache/uniffle/common/ReconfigurableConfManager.java
index 7365a0ef6..9a4cdd6b2 100644
--- a/common/src/main/java/org/apache/uniffle/common/ReconfigurableConfManager.java
+++ b/common/src/main/java/org/apache/uniffle/common/ReconfigurableConfManager.java
@@ -82,16 +82,21 @@ public class ReconfigurableConfManager<T> {
private Supplier<RssConf> getConfFromFile(String rssConfFilePath, Class confCls) {
return () -> {
File confFile = new File(rssConfFilePath);
- if (confFile.exists() && confFile.isFile()) {
- long lastModified = confFile.lastModified();
- if (lastModified > latestModificationTimestamp) {
- latestModificationTimestamp = lastModified;
- RssBaseConf conf = new RssBaseConf();
- conf.loadConfFromFile(rssConfFilePath, ConfigUtils.getAllConfigOptions(confCls));
- return conf;
- }
+ if (!confFile.exists()) {
+ LOGGER.warn("Rss conf file: {} don't exist. Ignore updating", rssConfFilePath);
+ return null;
+ }
+ if (!confFile.isFile()) {
+ LOGGER.warn("Rss conf file: {} is not file. Ignore updating", rssConfFilePath);
+ return null;
+ }
+ long lastModified = confFile.lastModified();
+ if (lastModified > latestModificationTimestamp) {
+ latestModificationTimestamp = lastModified;
+ RssBaseConf conf = new RssBaseConf();
+ conf.loadConfFromFile(rssConfFilePath, ConfigUtils.getAllConfigOptions(confCls));
+ return conf;
}
- LOGGER.info("Rss conf file:{} is invalid. Ignore updating.", rssConfFilePath);
return null;
};
}
@@ -106,8 +111,8 @@ public class ReconfigurableConfManager<T> {
LOGGER.info(
"Update the config option: {} from {} -> {}",
configOption.key(),
- val,
- rssConf.get(configOption));
+ rssConf.get(configOption),
+ val);
rssConf.set(configOption, val);
}
}