-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58221/#review171517
-----------------------------------------------------------



Why do you want to actually recreate a new instance of HMSFollower every time 
you start a service? The only thing that's actually needed is to manage 
execution of the service, not the instance.

IMO HMSFollower should just be a singleton which is created once and can get 
scheduled or not depending on the need. You don't have to make it a singleton 
as part of this change (this would be nice though) but actually creating a new 
one every time seems to be not needed.

Since HMSFollower doesn't actually keep state - it is all stored in DB it 
doesn't make much sense to have multiple instances. And since it is runnable, 
adding start/stop methods to it doesn't seem right.

- Alexander Kolbasov


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
> 
>

Reply via email to