Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. AuditListener Interface - Contains the method to be implemented for auditing purpose.
  2. HBaseStorageAudit Class - Implements the AuditListener interface. Register the implementation class for callback and override the above method with the custom logic, which builds up the audit data and persists it to a audit table in HBase. Here we enforce the condition which audits only in case of HBase operations related to entities used for Policy/Datasource.
  3. HBaseStorage Class - From the create/update/delete methods call the method in HBaseStorageAudit that triggers the listener method.
  4. AuditSupport Class - Used for maintaining AuditListener implementations and calling.

 


Image RemovedImage Added

 

Adding to the audit columns mentioned in Approach #2, we can also persist the columns available in the @Tags annotation of an entity, so that we can model the audit retrieval service based on the data retrieval service of different entities.

We can also have a configuration parameter which lets us decide whether to use the audit feature or not if required.