Using Ambari Core Services
Also available as:
PDF
loading table of contents...

Example HDFS audit logs

A working example of creating an external table of HDFS audit logs.

CREATE EXTERNAL TABLE audit_logs_hdfs
(
evtTime string,
level string,
logger_name string,
log_message string,
resource string,
result int,
action string,
cliType string,
req_caller_id string,
ugi string,
reqUser string,
proxyUsers array<string>,
authType string,
proxyAuthType string,
dst string,
perm string,
cluster string,
type string,
path string,
logfile_line_number int,
host string,
ip string,
cliIP string,
id string,
event_md5 string,
message_md5 string,
seq_num int
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
LOCATION '[SOME_DIRECTORY_PATH]';