> On Aug. 9, 2017, 8:23 p.m., Na Li wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryHMSClient.java > > Lines 181 (patched) > > <https://reviews.apache.org/r/61537/diff/1/?file=1794303#file1794303line181> > > > > This function getNotifications first check if there is new entries, and > > then get all changes from input. It has more overhead. > > > > It is sufficient to get changes between eventIdBefore and eventIdAfter > > to apply to full snapshot image. > > > > The changes after eventIdAfter can be processed ad delta changes > > normally. In this way, we can see the changes and sync with policy > > configuration if necessary. > > > > We had discussion that full snapshot lost changes, and does not allow > > us to sync with policy store.
I see you only apply the changes between before and after. So we don't have to have a new function other than "Collection<NotificationEvent> getNotifications(long notificationId)" in SentryHMSClient. The input can be eventbefore and eventIdAfter, and not need to call "client.getCurrentNotificationEventId()" before calling "client.getNextNotification(notificationIdBefore, notificationIdAfter, null);". I am OK if you submit the code as it is. - Na ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61537/#review182523 ----------------------------------------------------------- On Aug. 9, 2017, 7:37 p.m., Alexander Kolbasov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61537/ > ----------------------------------------------------------- > > (Updated Aug. 9, 2017, 7:37 p.m.) > > > Review request for sentry, Brian Towles, kalyan kumar kalvagadda, Na Li, > Sergio Pena, and Vamsee Yarlagadda. > > > Bugs: SENTRY-1874 > https://issues.apache.org/jira/browse/SENTRY-1874 > > > Repository: sentry > > > Description > ------- > > SENTRY-1874 Do not require quiet HMS when taking initial HMS snapshot > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/FullUpdateInitializer.java > 5af1e4ff36d53e399f1f51b023aaf379ebf62b92 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/FullUpdateModifier.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java > b0a202eef391accce3cea5e62374acf37e3d1b38 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryHMSClient.java > 4f76a94c9c97f9ad8ab491f8ad444e80c30e258e > > > Diff: https://reviews.apache.org/r/61537/diff/1/ > > > Testing > ------- > > > Thanks, > > Alexander Kolbasov > >