----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40677/#review107931 -----------------------------------------------------------
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java (line 330) <https://reviews.apache.org/r/40677/#comment167266> Sorry if the previous comment wasn't clear - I think it's best to still call close() in the finally block. My thinking was that you could have something like: SentryClinet sentryClient = getSentryServiceClient(); try { ... } finally { // Here you would know that sentryClient was initialized (not null). sentryClient.close(); } - Lenni Kuff 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 > >
