You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Sergio Pena <se...@cloudera.com> on 2017/06/16 00:02:08 UTC

Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

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

Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.


Bugs: SENTRY-1805
    https://issues.apache.org/jira/browse/SENTRY-1805


Repository: sentry


Description
-------

Define a new schema in package.jdo
Create a MAuthzPathsSnapshotId table
Upgrade all SQL scripts


Diffs
-----

  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java f51894bb7e109c37997e7134e07a82f46c0a3c44 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 8b19c88e52400ce096cf8f38fe2ca0313f7e46e1 
  sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 


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


Testing
-------

TestSentrySchemaTool passed.
Run the rest of the tests manually on each DB.


Thanks,

Sergio Pena


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by kalyan kumar kalvagadda <kk...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60141/#review178402
-----------------------------------------------------------



These are the initial set of comments. I will look closer into the rest of it based on your response.

- kalyan kumar kalvagadda


On June 16, 2017, 12:02 a.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60141/
> -----------------------------------------------------------
> 
> (Updated June 16, 2017, 12:02 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1805
>     https://issues.apache.org/jira/browse/SENTRY-1805
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Define a new schema in package.jdo
> Create a MAuthzPathsSnapshotId table
> Upgrade all SQL scripts
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java f51894bb7e109c37997e7134e07a82f46c0a3c44 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 8b19c88e52400ce096cf8f38fe2ca0313f7e46e1 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 
> 
> 
> Diff: https://reviews.apache.org/r/60141/diff/1/
> 
> 
> Testing
> -------
> 
> TestSentrySchemaTool passed.
> Run the rest of the tests manually on each DB.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by Alexander Kolbasov <ak...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60141/#review178081
-----------------------------------------------------------


Ship it!




Ship It!

- Alexander Kolbasov


On June 16, 2017, 12:02 a.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60141/
> -----------------------------------------------------------
> 
> (Updated June 16, 2017, 12:02 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1805
>     https://issues.apache.org/jira/browse/SENTRY-1805
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Define a new schema in package.jdo
> Create a MAuthzPathsSnapshotId table
> Upgrade all SQL scripts
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java f51894bb7e109c37997e7134e07a82f46c0a3c44 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 8b19c88e52400ce096cf8f38fe2ca0313f7e46e1 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 
> 
> 
> Diff: https://reviews.apache.org/r/60141/diff/1/
> 
> 
> Testing
> -------
> 
> TestSentrySchemaTool passed.
> Run the rest of the tests manually on each DB.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by Sergio Pena <se...@cloudera.com>.

> On June 20, 2017, 5:12 p.m., kalyan kumar kalvagadda wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java
> > Line 36 (original), 39 (patched)
> > <https://reviews.apache.org/r/60141/diff/1/?file=1752165#file1752165line39>
> >
> >     You will not need this constructor any more. You could directly use 
> >       public MAuthzPathsMapping(long authzSnapshotID, String authzObjName, Iterable<String> paths)

I'm trying to avoid that for now as it will require changes on the SentryStore class to pass the new value that is not used yet. I will provide that functionality on another JIRA. This patch only defines the new DB schema and modify the SQL scripts to upgrade to it.


> On June 20, 2017, 5:12 p.m., kalyan kumar kalvagadda wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
> > Lines 240-245 (patched)
> > <https://reviews.apache.org/r/60141/diff/1/?file=1752167#file1752167line240>
> >
> >     What is value, by adding seperete table for authzSnapshotID.

Concurrency. We can use this new table to persist a unique image ID and prevent another thread attempts to persist the same ID. We cannot do that if we use the ID from the MAuthzPathsMapping as that ID is not unique.


- Sergio


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


On June 16, 2017, 12:02 a.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60141/
> -----------------------------------------------------------
> 
> (Updated June 16, 2017, 12:02 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1805
>     https://issues.apache.org/jira/browse/SENTRY-1805
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Define a new schema in package.jdo
> Create a MAuthzPathsSnapshotId table
> Upgrade all SQL scripts
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java f51894bb7e109c37997e7134e07a82f46c0a3c44 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 8b19c88e52400ce096cf8f38fe2ca0313f7e46e1 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 
> 
> 
> Diff: https://reviews.apache.org/r/60141/diff/1/
> 
> 
> Testing
> -------
> 
> TestSentrySchemaTool passed.
> Run the rest of the tests manually on each DB.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by kalyan kumar kalvagadda <kk...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60141/#review178398
-----------------------------------------------------------




sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java
Line 36 (original), 39 (patched)
<https://reviews.apache.org/r/60141/#comment252331>

    You will not need this constructor any more. You could directly use 
      public MAuthzPathsMapping(long authzSnapshotID, String authzObjName, Iterable<String> paths)



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
Lines 240-245 (patched)
<https://reviews.apache.org/r/60141/#comment252334>

    What is value, by adding seperete table for authzSnapshotID.


- kalyan kumar kalvagadda


On June 16, 2017, 12:02 a.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60141/
> -----------------------------------------------------------
> 
> (Updated June 16, 2017, 12:02 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1805
>     https://issues.apache.org/jira/browse/SENTRY-1805
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Define a new schema in package.jdo
> Create a MAuthzPathsSnapshotId table
> Upgrade all SQL scripts
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java f51894bb7e109c37997e7134e07a82f46c0a3c44 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 8b19c88e52400ce096cf8f38fe2ca0313f7e46e1 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 
> 
> 
> Diff: https://reviews.apache.org/r/60141/diff/1/
> 
> 
> Testing
> -------
> 
> TestSentrySchemaTool passed.
> Run the rest of the tests manually on each DB.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by kalyan kumar kalvagadda <kk...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60141/#review178525
-----------------------------------------------------------


Ship it!




Ship It!

- kalyan kumar kalvagadda


On June 21, 2017, 6:34 p.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60141/
> -----------------------------------------------------------
> 
> (Updated June 21, 2017, 6:34 p.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1805
>     https://issues.apache.org/jira/browse/SENTRY-1805
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Define a new schema in package.jdo
> Create a MAuthzPathsSnapshotId table
> Upgrade all SQL scripts
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java 5471a02a1e7136f7f5c01d33d31db02ad4421ea3 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java f088f5c5dbcf15dff086437eef26f947e60aa88c 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.derby.sql 1935ef077d9ee161ba4b2caa03309a8c4183971c 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.oracle.sql 081a369c27a52fbd76319c5cca5c93357e07a703 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.postgres.sql 94569257ddffacd235481e7bb24fb5292fbc06d5 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 
> 
> 
> Diff: https://reviews.apache.org/r/60141/diff/2/
> 
> 
> Testing
> -------
> 
> TestSentrySchemaTool passed.
> Run the rest of the tests manually on each DB.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by Sergio Pena <se...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60141/
-----------------------------------------------------------

(Updated June 21, 2017, 6:34 p.m.)


Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.


Changes
-------

Addressed changes from Kalyan's comments.


Bugs: SENTRY-1805
    https://issues.apache.org/jira/browse/SENTRY-1805


Repository: sentry


Description
-------

Define a new schema in package.jdo
Create a MAuthzPathsSnapshotId table
Upgrade all SQL scripts


Diffs (updated)
-----

  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java 5471a02a1e7136f7f5c01d33d31db02ad4421ea3 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java f088f5c5dbcf15dff086437eef26f947e60aa88c 
  sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.derby.sql 1935ef077d9ee161ba4b2caa03309a8c4183971c 
  sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
  sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.oracle.sql 081a369c27a52fbd76319c5cca5c93357e07a703 
  sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.postgres.sql 94569257ddffacd235481e7bb24fb5292fbc06d5 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
  sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 


Diff: https://reviews.apache.org/r/60141/diff/2/

Changes: https://reviews.apache.org/r/60141/diff/1-2/


Testing
-------

TestSentrySchemaTool passed.
Run the rest of the tests manually on each DB.


Thanks,

Sergio Pena


Re: Review Request 60141: SENTRY-1805: Define a DB schema for HMS generation IDs

Posted by kalyan kumar kalvagadda <kk...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60141/#review178500
-----------------------------------------------------------




sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql
Lines 10 (patched)
<https://reviews.apache.org/r/60141/#comment252514>

    Please change the table schema where the table is created instead of using alter again.
    
    CREATE TABLE AUTHZ_PATHS_MAPPING
    (
        AUTHZ_OBJ_ID NUMBER NOT NULL,
        AUTHZ_OBJ_NAME VARCHAR2(384) NULL,
        CREATE_TIME_MS NUMBER NOT NULL,
        AUTHZ_SNAPSHOT_ID bigint NOT NULL
    );



sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql
Lines 8 (patched)
<https://reviews.apache.org/r/60141/#comment252515>

    Same as above, please change the schame where table is created instead of having seperate alter command.



sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
Lines 250 (patched)
<https://reviews.apache.org/r/60141/#comment252516>

    Same as above, please change the schame where table is created instead of having seperate alter command.



sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
Lines 255 (patched)
<https://reviews.apache.org/r/60141/#comment252517>

    Same as above, please change the schame where table is created instead of having seperate alter command.



sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
Lines 287 (patched)
<https://reviews.apache.org/r/60141/#comment252518>

    Same as above, please change the schame where table is created instead of having seperate alter command.



sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql
Lines 270 (patched)
<https://reviews.apache.org/r/60141/#comment252519>

    Same as above, please change the schame where table is created instead of having seperate alter command.



sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql
Lines 275 (patched)
<https://reviews.apache.org/r/60141/#comment252520>

    Same as above, please change the schame where table is created instead of having seperate alter command.



sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql
Lines 96 (patched)
<https://reviews.apache.org/r/60141/#comment252522>

    Same as above, please change the schame where table is created instead of having seperate alter command.


- kalyan kumar kalvagadda


On June 16, 2017, 12:02 a.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60141/
> -----------------------------------------------------------
> 
> (Updated June 16, 2017, 12:02 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1805
>     https://issues.apache.org/jira/browse/SENTRY-1805
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Define a new schema in package.jdo
> Create a MAuthzPathsSnapshotId table
> Upgrade all SQL scripts
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java f51894bb7e109c37997e7134e07a82f46c0a3c44 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsSnapshotId.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo 459939b7600e05d57c7e11eefe20c2591cac0b34 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java 8b19c88e52400ce096cf8f38fe2ca0313f7e46e1 
>   sentry-provider/sentry-provider-db/src/main/resources/007-SENTRY-1365.mysql.sql 1bcbffb929d8a08e49fcb33b6306580863055e8c 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.derby.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.mysql.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.oracle.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/009-SENTRY-1805.postgres.sql PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql 83cbfe7f8e89daee736f77b27dc3efd8696a45b7 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql 1024e8ed48da720facf156a02a16b0e2884bb5f4 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql 2c7c8b67f93d9e81aa0ad6fbccdba25df29c4c65 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql 590d48c9e7278af0225f28361e0317aeef5934b3 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql 125be9e6f3eec7e10213d10eddde2f8e51c6f303 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql c7d11d37babfc444e7f93d5bb417a826252c01d2 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-derby-1.7.0-to-1.8.0.sql dc3021a57ac9ea8145379c437ae6a94131c9ae5e 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-mysql-1.7.0-to-1.8.0.sql ef1c651da8998eb57b5d0ca3463317d07c1b3a24 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-oracle-1.7.0-to-1.8.0.sql f4a50de14dd0f961befaded394c6a01c2f459317 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-postgres-1.7.0-to-1.8.0.sql db010bcd7792c9370478a2061e22d14bb78e3184 
> 
> 
> Diff: https://reviews.apache.org/r/60141/diff/1/
> 
> 
> Testing
> -------
> 
> TestSentrySchemaTool passed.
> Run the rest of the tests manually on each DB.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>