> On 十一月 18, 2014, 11:15 a.m., Prasad Mujumdar wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java, > > line 70 > > <https://reviews.apache.org/r/25980/diff/2/?file=733885#file733885line70> > > > > should it be INFO ? After all we are handling the failure seamlessly, > > so this does'n have to be a warning ...
Good suggestion, thank you for your review. - Dapeng ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25980/#review61864 ----------------------------------------------------------- On 十月 27, 2014, 3:15 p.m., Dapeng Sun wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25980/ > ----------------------------------------------------------- > > (Updated 十月 27, 2014, 3:15 p.m.) > > > Review request for sentry, Arun Suresh, Lenni Kuff, Prasad Mujumdar, and > Sravya Tirukkovalur. > > > Bugs: SENTRY-464 > https://issues.apache.org/jira/browse/SENTRY-464 > > > Repository: sentry > > > Description > ------- > > * Add service register in **SentryPolicyStoreProcessor** > * Add **HASentryPolicyServiceClientImpl** as a HA implementation for > SentryPolicyServiceClient, it can select active node which registered in > Zookeeper > * Add **doOperationAndRetry** , use **SentryPolicyServiceClientDefaultImpl** > as a field, this make all HA method can reuse the same logic for retry. > ````java > private <T> T doOperationAndRetry(SentryOperation<T> sentryOption) throws > SentryUserException { > while (true) { > try { > return sentryOption.doOperation(); > } catch (SentryUserException e) { > throw e; > } catch (Exception e) { > LOGGER.warn(THRIFT_EXCEPTION_MESSAGE > + ": Error in connect current service, will retry other > service.", e); > try { > renewSentryClient(); > } catch (IOException e1) { > throw new SentryUserException(e1.getMessage(),e1.getCause()); > } > } > } > } > ```` > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java > b54e12e > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java > 40e8a0e > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java > 11545a5 > > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/AbstractTestWithDbProvider.java > 47e01a7 > > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithHAGrantOption.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/25980/diff/ > > > Testing > ------- > > The addition UnitTest is used for test client reconnect, other UnitTest > passed in local > > > Thanks, > > Dapeng Sun > >
