8000 已经配置了Mongodb来存储日志,为什么server端的online_log目录中依然有文件 · Issue #1079 · PowerJob/PowerJob · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

已经配置了Mongodb来存储日志,为什么server端的online_log目录中依然有文件 #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
magicgw0928 opened this issue Mar 20, 2025 · 3 comments
Labels
question Further information is requested

Comments

@magicgw0928
Copy link

Question

已经按照文档配置了--oms.storage.dfs.mongodb.uri=mongodb://192.168.56.101:27017/powerjob,而且我也确实看到任务实例的执行日志成功写入到Mongodb中了,但是我发现在powerjob-server上有个online_log目录里依然会写入和Mongodb中一模一样的文件内容。这是为什么?
按道理日志文件如果写入Mongodb了,就没必要再写入到online_log目录里了。这样有点浪费存储空间,而且清理起来也很麻烦

@magicgw0928 magicgw0928 added the question Further information is requested label Mar 20, 2025
@q710245300
Copy link

我也发现了,任务量大的时候会有很多小文件,直接在sync后删除下本地文件是不就行了

@magicgw0928
Copy link
Author

@KFCFans 能否帮忙看一下这个疑问,是特意为之吗?
我后来还尝试在控制台中将任务的日志配置改为LOCAL(本地日志)、STDOUT(系统输出)、NULL(空实现),但是在server端的online_log目录中依然会生成很多小文件,文件里面只有一行内容:SYSTEM: There is no online log for this job instance. 感觉完全没必要去存储这些文件。Linux系统中如果单个目录下的文件超过了inode规定的数量就无法创建新文件了,如果任务量大的话会有问题。

@Zdanquxunhuan
Copy link

日志是先持久化到本地,然后再根据配置选择是否存储以及存储到哪个分布式组件中。
或者可以给“File stableLogFile = genStableLogFile(instanceId);”那里加个配置判断

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants
0