> On April 6, 2017, 7:04 p.m., Hao Hao wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java > > Lines 310 (patched) > > <https://reviews.apache.org/r/58221/diff/1/?file=1685541#file1685541line325> > > > > Why not directly shutdown and make it null? > > Na Li wrote: > I checked the behavior of shutdown(): "Initiates an orderly shutdown in > which previously submitted tasks are executed, but no new tasks will be > accepted. Invocation has no additional effect if already shut down." It may > take some time before shutdown() returns and could throw "SecurityException". > > It is safer to set the hmsFollowerExecutor null before calling the > shutdown(). If someone calls startHMSFollower() during this time, it would > work properly, i.e., it can be started and HmsFollower work can be scheduled. > > Na Li wrote: > I changed it. Now, the HMSFollower is directly shut down and set to null
I have updated the code to reuse the HMSFollower instance - Na ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58221/#review171238 ----------------------------------------------------------- On April 12, 2017, 3:47 a.m., Na Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58221/ > ----------------------------------------------------------- > > (Updated April 12, 2017, 3:47 a.m.) > > > Review request for sentry, Alexander Kolbasov, Hao Hao, kalyan kumar > kalvagadda, and Sergio Pena. > > > Repository: sentry > > > Description > ------- > > SENTRY-1649 move HMS follower to runServer > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java > 6c14f5e > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java > 132db63 > > > Diff: https://reviews.apache.org/r/58221/diff/5/ > > > Testing > ------- > > > Thanks, > > Na Li > >
