----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61889/#review183797 -----------------------------------------------------------
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? sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/PathsUpdate.java Line 84 (original), 84 (patched) <https://reviews.apache.org/r/61889/#comment259845> Is this a stray change? 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/#comment259870> This field should be renamed - it is no longer an ID but hash. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPathChange.java Lines 82 (patched) <https://reviews.apache.org/r/61889/#comment259871> s/will be/is/ sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo Line 299 (original), 299 (patched) <https://reviews.apache.org/r/61889/#comment259869> Please change the name to reflect the fact that this is not an ID but hash. Also, please add comment explaining what this is and why it is using CHAR(40) - Alexander Kolbasov 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 > >
