> On Nov. 24, 2015, 11 p.m., Anne Yu wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java,
> >  line 342
> > <https://reviews.apache.org/r/40677/diff/1/?file=1139258#file1139258line342>
> >
> >     Possibly use "sentryClient != null && sentryClient.open() " ?
> 
> Hao Hao wrote:
>     Thanks Anne for the review. I don't think the open is needed here, the 
> connection is already opened when creating 
> SentryPolicyServiceClientDefaultImpl.

We double checked close api, seems it fine not to validate open status:

public void close() {
    super.close();
    if(this.socket_ != null) {
      try {
        this.socket_.close();
      } catch (IOException var2) {
        LOGGER.warn("Could not close socket.", var2);
      }

      this.socket_ = null;
    }

  }


- Anne


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


On Nov. 24, 2015, 11:31 p.m., Hao Hao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40677/
> -----------------------------------------------------------
> 
> (Updated Nov. 24, 2015, 11:31 p.m.)
> 
> 
> Review request for sentry, Anne Yu, Lenni Kuff, and Sravya Tirukkovalur.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Change-Id: I4b31ff944da604bf416239ed7cb3f147dffa8cb9
> 
> Found the issue is caused by the connection is not properly closed after drop 
> table/database event occurs on metastore. Fix it and modified the test.
> 
> 
> Diffs
> -----
> 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
>  49246697b8b301205e705a268b2d75dba3bad3be 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbConnections.java
>  ae790f07f79d5f4c57a08971788a85af2708c0d5 
> 
> Diff: https://reviews.apache.org/r/40677/diff/
> 
> 
> Testing
> -------
> 
> Tested on TestDbConnections.
> 
> 
> Thanks,
> 
> Hao Hao
> 
>

Reply via email to