You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ajay Kumar (JIRA)" <ji...@apache.org> on 2018/06/29 21:00:00 UTC

[jira] [Comment Edited] (HDDS-198) Create AuditLogger mechanism to be used by OM, SCM and Datanode

    [ https://issues.apache.org/jira/browse/HDDS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528222#comment-16528222 ] 

Ajay Kumar edited comment on HDDS-198 at 6/29/18 8:59 PM:
----------------------------------------------------------

[~dineshchitlangia] thanks for working on this important functionality. Overall patch LGTM. Few comments:
 * AuditLogger
 ** Change default logging level from All to INFO
 ** We can wrap SUCCESS and FAILURE in a inner ENUM as well.
 * package-info
 ** L48-49: simplify
{code:java}
This interface must be implemented by entities whose members will need to be logged in the audits.{code}
to
{code:java}
This interface must be implemented by entities requiring audit logging. {code}
L109: typo "log4j3"

 * TestAuditLogger
 ** There are bunch of {{stackTrace}} (L55,124) and {{System.out.println}} statements, we can replace them with sl4j logger.
 ** L51 Replace {{file.delete()}} with \{{ FileUtils.deleteQuietly(file.delete())}}.
 ** L38 AUDIT is not static,final; checkstyle will probably flag it for camelcase.
 ** L43 rename tearUp to setup. (just a convention i guess)
 ** L23,27,30 unused imports.
 ** VerifyLog L108: We can get rid of try catch and throw any exception.
 ** There is TestAuditLogger class in Hdfs as well, shall we rename this one to TestOzoneAuditLogger or TestHddsAuditLogger to avoid confusion.
 * DummyAction and OMAction looks pretty identicle. Either we can use OMAction for test cases as well or just extend it in inner class inside related TestClass.


was (Author: ajayydv):
[~dineshchitlangia] thanks for working on this important functionality. Overall patch LGTM. Few comments:
 * AuditLogger
 ** Change default logging level from All to INFO
 ** We can wrap SUCCESS and FAILURE in a inner ENUM as well.
 * package-info
 ** L48-49: simplify
{code:java}
This interface must be implemented by entities whose members will need to be logged in the audits.{code}
to
{code:java}
This interface must be implemented by entities requiring audit logging. {code}
L109: typo "log4j3"

 * TestAuditLogger
 ** There are bunch of {{stackTrace}} (L55,124) and {{System.out.println}} statements, we can replace them with sl4j logger.
 ** L51 Replace {{file.delete()}} with \{{ FileUtils.deleteQuietly(file.delete())}}.
 ** L38 AUDIT is not static,final; checkstyle will probably flag it for camelcase.
 ** L43 rename tearUp to setup. (just a convention i guess)
 ** L23,27,30 unused imports.
 ** There is TestAuditLogger class in Hdfs as well, shall we rename this one to TestOzoneAuditLogger or TestHddsAuditLogger to avoid confusion.
 * DummyAction and OMAction looks pretty identicle. Either we can use OMAction for test cases as well or just extend it in inner class inside related TestClass.

> Create AuditLogger mechanism to be used by OM, SCM and Datanode
> ---------------------------------------------------------------
>
>                 Key: HDDS-198
>                 URL: https://issues.apache.org/jira/browse/HDDS-198
>             Project: Hadoop Distributed Data Store
>          Issue Type: New Feature
>            Reporter: Dinesh Chitlangia
>            Assignee: Dinesh Chitlangia
>            Priority: Major
>              Labels: audit, log4j2
>             Fix For: 0.2.1
>
>         Attachments: HDDS-198.001.patch, HDDS-198.002.patch, HDDS-198.003.patch
>
>
> This Jira tracks the work to create a custom AuditLogger which can be used by OM, SCM, Datanode for auditing read/write events.
> The AuditLogger will be designed using log4j2 and leveraging the MarkerFilter approach to be able to turn on/off audit of read/write events by simply changing the log config.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org