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




sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
Lines 108 (patched)
<https://reviews.apache.org/r/58221/#comment244662>

    No need to return at the end of the function.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
Line 376 (original), 383 (patched)
<https://reviews.apache.org/r/58221/#comment244663>

    As you are fixing this, can you fix this line as well - we know that dbNam 
== null so we shouldn't try to convert it to string.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 77 (patched)
<https://reviews.apache.org/r/58221/#comment244666>

    Style - it is better to have field declarations first, followed by methods. 
The close() method is usually somewhere closer to the end but we don't have any 
specific policy on that.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 78 (patched)
<https://reviews.apache.org/r/58221/#comment244665>

    Do you ever expect concurrent calls to close() or not?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 81 (patched)
<https://reviews.apache.org/r/58221/#comment244664>

    Note that you need to stop the executor first. Otherwise while you are 
calling close() it may run HMSFOllower which isn't good.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 92 (patched)
<https://reviews.apache.org/r/58221/#comment244667>

    Can you call awaitTermination() before you called shutdown()?
    
    The doc says:
    
    Blocks until all tasks have completed execution after a shutdown request, 
or the timeout occurs, or the current thread is interrupted, whichever happens 
first.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 96 (patched)
<https://reviews.apache.org/r/58221/#comment244668>

    I think this should never happen.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 99 (patched)
<https://reviews.apache.org/r/58221/#comment244670>

    Should we call shutdownNow() in this case?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 145 (patched)
<https://reviews.apache.org/r/58221/#comment244673>

    Why do you need this?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 160 (patched)
<https://reviews.apache.org/r/58221/#comment244674>

    Why do you need this?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
Lines 350 (patched)
<https://reviews.apache.org/r/58221/#comment244675>

    This is most likely wrong. What does the cancel of the future do? What task 
does it actually cancel given that this is periodic executor? U think you 
should just use shutdown on the executor instead of this.


- Alexander Kolbasov


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

Reply via email to