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



I would suggest a simple approach:

1) Remove all knowledge about the priv cleaner from SentryStore itself.
2) Priv cleaner needs SentryStore for DB operations, so we should create one in 
SentryService - it will be shared between the cleaner and HMSFollower and later 
we can remove one from the service register() method as well.
3) Start the periodic process in SentryService itself. That's where we start 
other things like HMSFollower.

I think this will make things quite simple and minimize the number of files 
that are touched by this change.

- Alexander Kolbasov


On Feb. 22, 2017, 9:20 p.m., Lei Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56952/
> -----------------------------------------------------------
> 
> (Updated Feb. 22, 2017, 9:20 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-1637
>     https://issues.apache.org/jira/browse/SENTRY-1637
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> * Add configuration keys: SENTRY_STORE_DELTA_REMOVAL_PERIOD_SECONDS to enable 
> the background clean thread.
> * Use ```ScheduledExecutorSerivce``` to periodically involke 
> ```SentryStore.purgeDeltaChanges()```
> 
> 
> Diffs
> -----
> 
>   
> sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryHDFSServiceProcessorFactory.java
>  db55b5aa33cebbef235cceca6ccda48603da2a26 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessorFactory.java
>  1cce1fc4b9157c76c68b35a292263c5e96270bd2 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
>  2ae9f3bda9f495b29dde0bd34c814a4cd31ae066 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
>  7fc3ca8bc2444f6cfcbcbabaebf0d3e18ef3d209 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessorFactory.java
>  691c1fb81cd50b6bf671576b3bba69aff291c008 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
>  c91051db70a5f606980fb29f780fbc199945e4f3 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/LeaderStatusMonitor.java
>  d1999b25b5f2c3e82d206e6f97cb195d0d527bab 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ProcessorFactory.java
>  a3bb6ab19de35d3018f1e9a938936b22d5aecb48 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
>  e6021f182e26f7b15773d64d84263c6da586d7a9 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
>  806d03e81a3660a30c6513efbddd2a1610359fc1 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
>  d9fce6939a86870e6d4ac308e3fb281534c871de 
> 
> Diff: https://reviews.apache.org/r/56952/diff/
> 
> 
> Testing
> -------
> 
> mvn test -Dtest=TestSentryStore
> 
> 
> Thanks,
> 
> Lei Xu
> 
>

Reply via email to