Configuring auditing
In this recipe, we will touch base upon auditing in Hadoop, which is important to keep track of who did what and at what time. All users must hold accountability for their actions, and to make that possible, we need to track the activities of users by enabling audit logs. There are two audit logs, one for users and the other for services, which help to answer important questions such as Who touched my files? Is data accessed from protected IPs?
Getting ready
For this recipe, you will again need a running cluster with HDFS and YARN. Users must have completed the Configuring multi-node cluster recipe.
How to do it...
- Connect to the
nn1.cluster1.com
master node and switch to userhadoop
. - The file where these changes will be made is
log4j.properties
. - The categories which control audit logging are
log4j.category.SecurityLogger
for service, and for each of HDFS, Mapred, and YARN, we have audit log handlers categories implementinglog4j.logger.org.apache.hadoop
. - To enable audits...