----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58481/#review172144 -----------------------------------------------------------
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java Lines 73 (patched) <https://reviews.apache.org/r/58481/#comment245243> Please add comment explaining what this is sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java Lines 258 (patched) <https://reviews.apache.org/r/58481/#comment245244> size() may be expensive operation for some collection - it is better to use isEmpty(). Also, if there are no events we are not going to process any new ones, so does it make sense to log? I would suggest if ((currentEventID != lastLoggedEventId) && response.getEvents().isEmpty()) { sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java Line 257 (original), 261 (patched) <https://reviews.apache.org/r/58481/#comment245245> I think this should be debug() - there is no need to log every update. - Alexander Kolbasov On April 17, 2017, 5:56 p.m., Na Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58481/ > ----------------------------------------------------------- > > (Updated April 17, 2017, 5:56 p.m.) > > > Review request for sentry. > > > Bugs: SENTRY-1674 > https://issues.apache.org/jira/browse/SENTRY-1674 > > > Repository: sentry > > > Description > ------- > > Do not log message when CurrentEventID does not change and there is no > updates for HMSFollower > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java > 16676fb > > > Diff: https://reviews.apache.org/r/58481/diff/2/ > > > Testing > ------- > > > Thanks, > > Na Li > >
