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

Manoj Govindassamy commented on HDFS-10793:
-------------------------------------------

Had a chat with [~andrew.wang] and here is the proposal:

{{HdfsAuditLogger.java}}
-- Retain the old abstract method {{logAuditEvent}}, the one with no 
{{CallerContext}} in the args
-- Change the type of current method {{logAuditEvent}} (the one with 
{{CallerContext}} arg) to non-abstract and its default method body will be a 
simple call delegation to the older method (by dropping the {{CallerContext}} 
info). This will make the older AuditLogger class work without any changes and 
rebuild against new code
-- So, any AuditLogger wanting to make use of {{CallerContext}} info, has to 
override the newer {{logAuditEvent}} method with custom implementation

{{FSNamesystem.java}} 
-- In {{DefaultAuditLogger}}, implement the abstract method {{logAuditEvent}} 
with no {{CallerContext}} arg with the method body simply delegating the call 
to the current version of {{logAuditEvent}} by passing null for the 
{{CallerContext}}

Tested the above with Class implementing HdfsAuditLogger the older way and 
Client operations are logged as expected without any method signature errors.





> Fix HdfsAuditLogger binary incompatibility introduced by HDFS-9184
> ------------------------------------------------------------------
>
>                 Key: HDFS-10793
>                 URL: https://issues.apache.org/jira/browse/HDFS-10793
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Andrew Wang
>            Assignee: Manoj Govindassamy
>            Priority: Blocker
>
> HDFS-9184 added a new parameter to an existing method signature in 
> HdfsAuditLogger, which is a Public/Evolving class. This breaks binary 
> compatibility with implementing subclasses.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to