You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Ramesh Mani (Jira)" <ji...@apache.org> on 2022/04/16 05:42:00 UTC
[jira] [Updated] (RANGER-3504) Create framework to execute DB patch dependent on Java patch.
[ https://issues.apache.org/jira/browse/RANGER-3504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramesh Mani updated RANGER-3504:
--------------------------------
Fix Version/s: 2.3.0
> Create framework to execute DB patch dependent on Java patch.
> -------------------------------------------------------------
>
> Key: RANGER-3504
> URL: https://issues.apache.org/jira/browse/RANGER-3504
> Project: Ranger
> Issue Type: Improvement
> Components: Ranger
> Affects Versions: 2.2.0
> Reporter: Dineshkumar Yadav
> Assignee: Dineshkumar Yadav
> Priority: Major
> Fix For: 3.0.0, 2.3.0
>
>
> Problem Statement
> Currently we have two sets of patches in Ranger (DB & Java patches).
> During Ranger setup, DB patches get executed first then Java patches get executed in an orderly manner based on their sequence.
> We don't have any mechanism where we can execute Java Patch first and it's dependent DB patch afterwards.
>
> Please find the below approach to handle such scenarios.
> Approach:
> # While executing DB patches, first check if any pre java patches are present by name starting with {*}PatchPreSql_<DB_version>{*}.
> # If a Pre Java patch is found then execute that java patch first.
> # Execute DB patch.
> # Check again if there are any post java patches present by name starting with {*}PatchPostSql_<DB_version>{*}.
> # If Post Java patches are found, execute them.
> # While naming the dependent Java patches we need to follow the below convention.
> # Currently we follow convention: *Patch<custom_name>_J<5 digit sequence number>.java*
> # Proposed naming convention for dependent Java Patch. *Patch<Post or Pre>Sql_<dependent DB patch version number>_<custom_name>_J<5 digit sequence number>.java*
> Use Case:
> Suppose we have a DB patch (050-uniqueindex.sql) and there are two Java patches one needs to execute before and another immediately after DB patch.
> In that scenario we should use the following convention for naming java patches.
> Pre Java Patch : PatchPreSql_050_CleanData_J10050.java
> Post Java Patch : PatchPostSql_050_UpdateData_J10051.java
> Note: File to be changed : db_setup.py
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)