> On Jan. 8, 2019, 11:48 a.m., Zsombor Gegesy wrote:
> > It's great news, that you could delete thousands of lines of repetitive code, however
you could achieve more, if instead of putting everything into one class, and put
> > '''
> > if self.XA_DB_FLAVOR == DB_MYSQL:
> > ...
> > elif self.XA_DB_FLAVOR == DB_POSTGRES:
> > ...
> > '''
> >
> > You can write
> > self.do_something(...)
> >
> > and implement do_something differently in the MySQL/PostgreSQL/Oracle specific adapter
class
There shall be too many self.do_something(...) function I have to write which shall look like
the previous code. Can you review it once again and let me know with few examples.
- Pradeep
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69677/#review211760
-----------------------------------------------------------
On Jan. 7, 2019, 6:37 a.m., Pradeep Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69677/
> -----------------------------------------------------------
>
> (Updated Jan. 7, 2019, 6:37 a.m.)
>
>
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Nikhil P,
Ramesh Mani, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2287
> https://issues.apache.org/jira/browse/RANGER-2287
>
>
> Repository: ranger
>
>
> Description
> -------
>
> **Problem Statement:** There are lot of repeated code in db_setup.py which can be removed
which shall help developers to make any changes in db_setup.py in future.
>
> **Proposed Solution:** Proposed patch shall remove the db setup methods of each db flavor
and shall use a single method for a specific work for each db flavor. Based on the db flavor,
config values shall be populated and handled in the code after this patch.
>
>
> Diffs
> -----
>
> security-admin/scripts/db_setup.py f1223b38c
>
>
> Diff: https://reviews.apache.org/r/69677/diff/1/
>
>
> Testing
> -------
>
> **Use Cases covered for all the db flavors:**
> *1. Fresh installation(Ranger 2.0):* Tested patch with fresh installation of ranger admin.
> *2. Upgrade(from 0.7 to 2.0):* Installed Ranger from 0.7 branch and used same db config
on Ranger 2.0 installation config and run the setup.sh. Ranger was upgraded successfully.
>
>
> Thanks,
>
> Pradeep Agrawal
>
>
|