HDFS audit destination file writer configuration properties
This topic defines audit file format options and custom writer parameters for Apache Ranger HDFS destinations, highlighting performance differences between JSON and ORC and integration guidelines for custom log writers.
File writer type
- batch.filequeue.filetype
-
-
Property:
xasecure.audit.destination.hdfs.batch.filequeue.filetype -
Default:
json -
Description: Format of audit files written to HDFS.
-
Supported Values:
-
json- JSON format (default, human-readable) -
orc- ORC format (optimized for Hive/Spark processing)
# JSON format (default) xasecure.audit.destination.hdfs.batch.filequeue.filetype=json # ORC format xasecure.audit.destination.hdfs.batch.filequeue.filetype=orc -
- Format Comparison:
Feature JSON ORC Human-readable ✅ Yes ❌ No File size Larger Smaller (compressed) Query performance Slower Faster Tools support Any text tool Hive, Spark, ORC tools Use case Debugging, small-scale Big data, analytics - File Extension:
-
JSON:
.log -
ORC: Determined by ORC writer implementation
-
-
Custom file writer implementation
- filewriter.impl
-
-
Property:
xasecure.audit.destination.hdfs.filewriter.impl -
Default: None (auto-selected based on
filetype) -
Description: Fully qualified class name of custom audit writer implementation.
# Custom writer implementation xasecure.audit.destination.hdfs.filewriter.impl=com.mycompany.audit.CustomAuditWriter - Default Implementations:
-
JSON:
org.apache.ranger.audit.utils.RangerJSONAuditWriter -
ORC:
org.apache.ranger.audit.utils.RangerORCAuditWriter
-
- Custom Implementation Requirements:
-
Implement
org.apache.ranger.audit.utils.RangerAuditWriterinterface -
Provide default constructor
-
Be available in the classpath
-
-
