ranger审核日志轮换管理

ars1skjm  于 2021-06-24  发布在  Hive
关注(0)|答案(0)|浏览(411)

我正在开发一个有2个主机和4个节点的集群,hdp版本是hdp-3.1.0.0。我注意到由于ranger审核日志,hdfs占用了大量内存。特别是,对于hiveserver2,自2019年起每天都有一个文件夹,其中包含25/30个日志:

hdfs dfs -ls /ranger/audit/hiveServer2/20191211
 Found 26 items
 -rw-r--r--   3 hive hive 4686037522 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.1.log
 -rw-r--r--   3 hive hive   51296529 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.10.log
 -rw-r--r--   3 hive hive   34733943 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.11.log
 -rw-r--r--   3 hive hive   41985457 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.12.log
 -rw-r--r--   3 hive hive   41610863 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.13.log
 -rw-r--r--   3 hive hive   52317140 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.14.log
 -rw-r--r--   3 hive hive   28625266 2019-12-11 11:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.15.log
 -rw-r--r--   3 hive hive 5502165954 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.16.log
 -rw-r--r--   3 hive hive   85395980 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.17.log
 -rw-r--r--   3 hive hive   56801808 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.18.log
 -rw-r--r--   3 hive hive   36125152 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.19.log
 -rw-r--r--   3 hive hive  343622234 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.2.log
 -rw-r--r--   3 hive hive   35022393 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.20.log
 -rw-r--r--   3 hive hive   42096987 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.21.log
 -rw-r--r--   3 hive hive   67246479 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.22.log
 -rw-r--r--   3 hive hive   50916458 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.23.log
 -rw-r--r--   3 hive hive   42885408 2019-12-12 00:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.24.log
 -rw-r--r--   3 hive hive   30207523 2019-12-11 23:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.25.log
 -rw-r--r--   3 hive hive   66623851 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.3.log
 -rw-r--r--   3 hive hive   65309585 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.4.log
 -rw-r--r--   3 hive hive   89205403 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.5.log
 -rw-r--r--   3 hive hive  240566249 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.6.log
 -rw-r--r--   3 hive hive   30555945 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.7.log
 -rw-r--r--   3 hive hive   49192289 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.8.log
 -rw-r--r--   3 hive hive   49147310 2019-12-11 12:50 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.9.log
 -rw-r--r--   3 hive hive        595 2019-12-11 00:00 /ranger/audit/hiveServer2/20191211/hiveServer2_ranger_audit_bordimaster1.log

我可以删除这些日志,而不给集群带来任何问题吗?
有办法管理这些日志吗?我希望日志保留期不超过一周。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题