You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "kumaab (via GitHub)" <gi...@apache.org> on 2023/09/08 20:34:44 UTC
[GitHub] [ranger] kumaab commented on a diff in pull request #277: RANGER-4342: Fix new log file creation every time there is an error/exception writing audits to HDFS as Json
kumaab commented on code in PR #277:
URL: https://github.com/apache/ranger/pull/277#discussion_r1320314348
##########
agents-audit/src/main/java/org/apache/ranger/audit/utils/AbstractRangerAuditWriter.java:
##########
@@ -262,10 +263,14 @@ public PrintWriter createWriter() throws Exception {
}
if (logWriter == null) {
- // Create the file to write
- logger.info("Creating new log file. auditPath=" + fullPath);
- createFileSystemFolders();
- ostream = fileSystem.create(auditPath);
+ if (reUseLastLogFile){
+ ostream = fileSystem.append(auditPath);
Review Comment:
@bhavikpatel9977 Spool is used as a backup when destination is not reachable, if spool is not able to store it is expected to fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org