> On Aug. 25, 2017, 12:05 a.m., Alexander Kolbasov wrote:
> > I think that it is more useful to get SHA1 on the original HMS event (JSON 
> > object). This will allow us to quickly commpare whether the new 
> > notification from HMS is the same as the one we already processed or not. 
> > Otherwise we need to convert it to PathsUpdate first and then do sha1 hash. 
> > WOuld it fit the code structure?

Does the JSONDeserialize() returns the original JSON string sent by HMS?


> On Aug. 25, 2017, 12:05 a.m., Alexander Kolbasov wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPathChange.java
> > Line 69 (original), 73 (patched)
> > <https://reviews.apache.org/r/61889/diff/1/?file=1803007#file1803007line73>
> >
> >     This field should be renamed - it is no longer an ID but hash.

This can be the ID once Hive fixes the issue and we stop calculating the hash. 
I was going to use Lina's suggestion to use 'uniquePathChangeID', but this is 
not the Path change but the notification, so what about just 
'uniqueNotificationID'? In the future, this will be the notification ID and not 
a hash (leaving a comment about this could help to understand why?).


- Sergio


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


On Aug. 24, 2017, 4:59 p.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61889/
> -----------------------------------------------------------
> 
> (Updated Aug. 24, 2017, 4:59 p.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov and Na Li.
> 
> 
> Bugs: sentry-1895
>     https://issues.apache.org/jira/browse/sentry-1895
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Added two indexes to the NOTIFICATION_ID columns on the following tables:
> - SENTRY_HMS_NOTIFICATION_ID   (non-unique index)
> - SENTRY_PATH_CHANGE           (unique index)
> 
> Calculate the sha1 hex string on the MSentryPathChange and persist it.
> 
> 
> Diffs
> -----
> 
>   
> sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/PathsUpdate.java
>  719c1acc18ce627f5228efb0d9cf47a7b5810a1b 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPathChange.java
>  58878e55a23936bc0a2f15fa33883e655b255640 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
>  734ea7fd214cd577bf456cc84d27949ee332a468 
>   
> sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql
>  019b0406291f5143b92aa9b678c528da58db1602 
>   
> sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql
>  a0223dc09046048582f395e8bd8e41cd73f462be 
>   
> sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql
>  733cebfdf78d03c808a2c8ae04476669bd285416 
>   
> sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql
>  cd7afd4e3afb9aededd07506f82b43055abc2254 
>   sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-2.0.0.sql 
> 44124c6d77c2e6c4185e4ef306ff4fbc20b5527b 
>   
> sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-2.0.0.sql 
> 3a7b46ee246d3347d371261a4bf727da4fb163fc 
>   
> sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-2.0.0.sql 
> 7475a5de88abc267b39d7fafa48fd0b14c94d31b 
>   
> sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-2.0.0.sql 
> 20c4cd99b7933f612231afac938fba03632258d2 
>   
> sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-2.0.0.sql
>  794ff1778efb30468a5b7a23471fc71e99d42ab4 
>   
> sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-2.0.0.sql
>  065921e3e637ee78c1a118bf3e05a0af9a1d602e 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
>  8f60b5801b5f481bc3d225a64f411f1867aed141 
> 
> 
> Diff: https://reviews.apache.org/r/61889/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>

Reply via email to