> 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.
I changed it. Now, the HMSFollower is directly shut down and set to null - Na ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58221/#review171238 ----------------------------------------------------------- On April 7, 2017, 5:23 p.m., Na Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58221/ > ----------------------------------------------------------- > > (Updated April 7, 2017, 5:23 p.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 > 6c14f5e46aad4223347d8d057188d31efbb68ed8 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java > 132db635f639cef91ce675d34d717e6125a0a4d1 > > > Diff: https://reviews.apache.org/r/58221/diff/3/ > > > Testing > ------- > > > Thanks, > > Na Li > >