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




sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/SentryTransportFactory.java
Line 77 (original), 77 (patched)
<https://reviews.apache.org/r/59317/#comment248879>

    Could you, please, elaborate on why you ended up placing UGI initialization 
here, as opposed to SentryGenericServiceClientDefaultImpl ctor, as in the 
previous revision?



sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/UserGroupInformationInitializer.java
Lines 34 (patched)
<https://reviews.apache.org/r/59317/#comment248878>

    The idea is right, but the implementation also needs to be thread-safe.
    
    Standard solution would be using AtomicBoolean instead of boolean:
    
    private static final AtomicBoolean isInitialized = new AtomicBoolean(false);
    
    and do checking as this:
    
    if (isInitialized.compareAndSet(false, true)) {
    // existing initialization logic goes here
    }
    
    This is supposedly faster than just declaring the entire initialize() 
method synchronized (which would be another solution).



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java
Line 66 (original), 64 (patched)
<https://reviews.apache.org/r/59317/#comment248875>

    "this.conf" is only initialized on the next line; should use "conf" instead 
of "this.conf" - or swap these two lines.


- Vadim Spector


On May 18, 2017, 8:57 p.m., kalyan kumar kalvagadda wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59317/
> -----------------------------------------------------------
> 
> (Updated May 18, 2017, 8:57 p.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, Brian Towles, Hao Hao, Na Li, 
> Sergio Pena, Vamsee Yarlagadda, and Vadim Spector.
> 
> 
> Bugs: SENTRY-1736
>     https://issues.apache.org/jira/browse/SENTRY-1736
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> 1. Update the UserGroupInformation with HADOOP_SECURITY_AUTHENTICATION for 
> the client when kerberos is enabled.
> 2. Make sure that the update is not done for every connection towards sentry 
> server.
> 3. Don't update the configuration object that we passed. Instead use a local 
> version to update.
> 
> 
> Diffs
> -----
> 
>   
> sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/SentryTransportFactory.java
>  9b9f9e8 
>   
> sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/transport/UserGroupInformationInitializer.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java
>  b7ac640 
> 
> 
> Diff: https://reviews.apache.org/r/59317/diff/3/
> 
> 
> Testing
> -------
> 
> Made sure that Solr client is able to talk to sentry with kerberos enabled.
> 
> 
> Thanks,
> 
> kalyan kumar kalvagadda
> 
>

Reply via email to