[ https://issues.apache.org/jira/browse/RANGER-4809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj resolved RANGER-4809. -------------------------------------- Resolution: Fixed {noformat} commit c1aaffb63fc8690d3d194f8c4d7074b1b508d067 (HEAD -> master, origin/master, origin/HEAD) Author: Rakesh Gupta <rakesh.gupta.dev...@gmail.com> Date: Fri Oct 4 18:22:47 2024 +0530 RANGER-4809: Utility to migrate admin audit logs in x_trx_log table x_trx_log_v2 table Signed-off-by: Madhan Neethiraj <mad...@apache.org> {noformat} {noformat} commit d06b18607415cf49e2737e36d64243c43542a931 (HEAD -> ranger-2.6, origin/ranger-2.6) Author: Rakesh Gupta <rakesh.gupta.dev...@gmail.com> Date: Fri Oct 4 18:22:47 2024 +0530 RANGER-4809: Utility to migrate admin audit logs in x_trx_log table x_trx_log_v2 table Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit c1aaffb63fc8690d3d194f8c4d7074b1b508d067) {noformat} > Utility to migrate admin audit logs in x_trx_log table x_trx_log_v2 table > ------------------------------------------------------------------------- > > Key: RANGER-4809 > URL: https://issues.apache.org/jira/browse/RANGER-4809 > Project: Ranger > Issue Type: Improvement > Components: admin > Reporter: Madhan Neethiraj > Assignee: Rakesh Gupta > Priority: Major > Fix For: 3.0.0, 2.6.0 > > > With updates in RANGER-4803, Ranger will store admin audit records in > {{x_trx_log_v2}} table. Prior to this, {{x_trx_log}} table was used to store > these records. To make earlier admin audits available to updated Ranger, > existing entries in {{x_trx_log}} should be migrated to {{x_trx_log_v2}} > table. Here are few notes to take into account: > # For a given admin action, like create/update/delete of a policy, multiple > rows are created in {{x_trx_log}} table - one row for each updated attribute. > # For a given admin action, a single row is created in {{x_trx_log_v2}} > table. This row captures details of all updated attributes in json format. > # Migration utility should merge all rows for a given admin action, > identified by column {{x_trx_log.trx_id}}, into a single record in > {{x_trx_log_v2}} table. {{x_trx_log_v2.change_info}} column should be > populated with contents of following columns in multiple {{x_trx_log}} rows: > {{attr_name}}, {{prev_val}}, {{new_val}}. > # The utility should provide an option to migrate only a subset of entries in > {{x_trx_log}} table - for example, for a given time period (last 3 months, > last 1 year). This will help avoid migrating older records that are of no > interest to the customer. -- This message was sent by Atlassian Jira (v8.20.10#820010)