org.apache.hadoop.mapreduce.v2.hs

## Class HSAuditLogger

- java.lang.Object
- - org.apache.hadoop.mapreduce.v2.hs.HSAuditLogger

-     @InterfaceAudience.Private
      public class HSAuditLogger
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HSAuditLogger.AuditConstants`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HSAuditLogger()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `logFailure(String user, String operation, String perm, String target, String description)` Create a readable and parseable audit log string for a failed event.
    `static void` | `logSuccess(String user, String operation, String target)` Create a readable and parseable audit log string for a successful event.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HSAuditLogger

          public HSAuditLogger()

  - ### Method Detail

    - #### logSuccess

          public static void logSuccess(String user,
                                        String operation,
                                        String target)

      Create a readable and parseable audit log string for a successful event.
      Parameters:
        `user` - User who made the service request.
        `operation` - Operation requested by the user.
        `target` - The target on which the operation is being performed.
        Note that the `HSAuditLogger` uses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').

    - #### logFailure

          public static void logFailure(String user,
                                        String operation,
                                        String perm,
                                        String target,
                                        String description)

      Create a readable and parseable audit log string for a failed event.
      Parameters:
        `user` - User who made the service request.
        `operation` - Operation requested by the user.
        `perm` - Target permissions.
        `target` - The target on which the operation is being performed.
        `description` - Some additional information as to why the operation failed.
        Note that the `HSAuditLogger` uses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.