You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@freestoneinfotech.com> on 2018/03/23 08:59:00 UTC

Review Request 66241: RANGER-2032: Use consolidated and optimized DB schema script for fresh install of Ranger

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66241/
-----------------------------------------------------------

Review request for ranger.


Bugs: RANGER-2032
    https://issues.apache.org/jira/browse/RANGER-2032


Repository: ranger


Description
-------

**Problem Statement:**
Ranger installation may fail due to network latency or may take time to install as db and java patches are also executed in fresh install.
**Proposed Solution:** 
We can use available consolidated sql schema script to improve ranger install time. Please refer diff of the install.properties for the location of optmized sql script of each db flavour.


**Other changes:**

I found few inconsistency in the old db schema script and the optimized script so I have included those small changes in this patch.

**Note:** I Request other developers to test and validate the script in their environment.


Diffs
-----

  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 7892a6a 
  security-admin/db/mysql/patches/032-add-options-to-policy-and-tag-for-time-based-processing.sql f8bedc4 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1f03978 
  security-admin/db/oracle/patches/032-add-options-to-policy-and-tag-for-time-based-processing.sql 4183572 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 5b3f4be 
  security-admin/db/postgres/patches/032-add-options-to-policy-and-tag-for-time-based-processing.sql 53ddacc 
  security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 42a8704 
  security-admin/db/sqlanywhere/patches/032-add-options-to-policy-and-tag-for-time-based-processing.sql 1314ecb 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 7421d4d 
  security-admin/db/sqlserver/patches/032-add-options-to-policy-and-tag-for-time-based-processing.sql 932861c 
  security-admin/scripts/install.properties 9941733 
  security-admin/src/main/java/org/apache/ranger/entity/XXPolicyBase.java 2616594 


Diff: https://reviews.apache.org/r/66241/diff/1/


Testing
-------

**Steps performed(with patch):** Below steps have been tested for all db flavor.
1. Created Build with patch and untar the build.
2. Opened install.properties and provided db configuration in install.properties file
3. Called setup.sh file.

**Expected behavior :**  
1) Ranger installation should complete successfully.
2) Ranger installation script should skip the db and java patches if already applied.
3) Ranger should start and after login to ranger admin , Ranger should allow user and policy creation.

**Actual behavior :**
1) Ranger installation completed successfully.
2) Ranger installation script skipped the db and java patches as patches entry were found in x_db_version_h table.
3) Ranger started successfully and I was able to login to ranger admin UI. Able to create users and HDFS policy from admin login.


Tried re-run of the setup.sh script and for all supported db flavours.


Thanks,

Pradeep Agrawal