> On June 21, 2017, 11:05 p.m., Alexander Kolbasov wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/NotificationProcessor.java > > Line 43 (original), 68 (patched) > > <https://reviews.apache.org/r/59508/diff/4/?file=1754610#file1754610line68> > > > > Why do we handle LOGGER in such a way here rather then creating the > > per-class logger as is done by everyone else? > > kalyan kumar kalvagadda wrote: > I thought for some one trying to debug HMSFolower, they need not enable > logging for a bunch of classes. Instead they can enabled it for HMSFOllower > class and get logging for every thing.
In this case the same model should be followed by HMSClientWrapper. If you think that this is a valid reason, let's be consistent (and add comment). Otherwise just use normall logging as is used everywhere else. > On June 21, 2017, 11:05 p.m., Alexander Kolbasov wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/NotificationProcessor.java > > Lines 111 (patched) > > <https://reviews.apache.org/r/59508/diff/4/?file=1754610#file1754610line111> > > > > Can it return false and not throw an exception? What is the difference > > between returning false and throwing exception? > > kalyan kumar kalvagadda wrote: > Returning false is not complaining. It is just that the event is not > processed to completion what ever reason. Exceptions are thown when there are > issues while processing the exceptions. Different exceptions are dealt > differently. Please document this in javadoc - it isn't clear. > On June 21, 2017, 11:05 p.m., Alexander Kolbasov wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/NotificationProcessor.java > > Lines 131 (patched) > > <https://reviews.apache.org/r/59508/diff/4/?file=1754610#file1754610line131> > > > > There should be INSERT case (which may do nothing) and the default > > should compain because it should never happen. > > kalyan kumar kalvagadda wrote: > Returning false is not complaining. It is just that the event is not > persisted. When we are processing INSERT event type why should we just handle > and return false? We should cover all possible case values. INSERT is one of them. In this case we should never fall in the default clause. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59508/#review178576 ----------------------------------------------------------- On June 22, 2017, 8:28 p.m., kalyan kumar kalvagadda wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59508/ > ----------------------------------------------------------- > > (Updated June 22, 2017, 8:28 p.m.) > > > Review request for sentry, Alexander Kolbasov, Brian Towles, Hao Hao, Na Li, > Sergio Pena, Vamsee Yarlagadda, and Vadim Spector. > > > Bugs: SENTRY-1769 > https://issues.apache.org/jira/browse/SENTRY-1769 > > > Repository: sentry > > > Description > ------- > > Things included in refactoring. > 1. Moved the complete notification processing logic to notificationProcessor. > 2. Added new class HMSFollowerHelper class which does > HMS Client creation > HMS Client closure > Creating and persisting the HMS snapshot > 3. Misc cleanup > > > Diffs > ----- > > > sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryPlugin.java > 0bd0833 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryHmsNotification.java > 0d54548 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > 8b19c88 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/FullSnapshotInfo.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSClientWrapper.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java > 1f7eb18 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollowerPersistenceException.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/NotificationProcessor.java > 6762de7 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceUtil.java > 215f7d5 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SnapshotCreationException.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/TestHMSClientWrapper.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/TestHMSFollower.java > 66ad2a1 > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/TestNotificationProcessor.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/59508/diff/5/ > > > Testing > ------- > > Made sure that all the tests around HMSFollower and SentryStore passed. Added > new classes to test new classes added. > > > Thanks, > > kalyan kumar kalvagadda > >
