> On May 8, 2016, 4:35 a.m., Gregory Chanan wrote: > > sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/CacheProvider.java, > > line 23 > > <https://reviews.apache.org/r/46909/diff/6/?file=1375790#file1375790line23> > > > > Shouldn't this be CacheProviderBackend and extend ProviderBackend? > > Just have it skip validation or maybe even better throw an exception if > > someone tries to validate e.g. "Cache itself does not validate, that is the > > responsibility of the builder of the cache." > > Ashish Singh wrote: > This is not an issue right, if we need to do this, we can do it in a > follow up JIRA.
Sure, please file a jira and reply to it here so we don't forget. > On May 8, 2016, 4:35 a.m., Gregory Chanan wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/UpdatableCache.java, > > line 115 > > <https://reviews.apache.org/r/46909/diff/6/?file=1375793#file1375793line115> > > > > did you want to deal with the fact that the privilege convertor are > > probably validating? Maybe the nicest way to do that is to take a factory > > in the generic provider backend with a boolean for validation or whatever. > > Ashish Singh wrote: > I think we can have this in a follow up JIRA. If that sounds OK to you I > will file a JIRA. Sure, please create the jira and link it here. > On May 8, 2016, 4:35 a.m., Gregory Chanan wrote: > > sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java, > > line 61 > > <https://reviews.apache.org/r/46909/diff/6/?file=1375797#file1375797line61> > > > > I think it's cleaner if you just use the CacheProvider(Backend) instead > > of deriving. Prefer composition over inheritance. > > Ashish Singh wrote: > Similar to somewhere above, not an issue, we can deal this refactoring in > a follow up JIRA. Sounds good, same as my comment above, file a jira now and link it. > On May 8, 2016, 4:35 a.m., Gregory Chanan wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/SentryGenericProviderBackend.java, > > line 49 > > <https://reviews.apache.org/r/46909/diff/6/?file=1375792#file1375792line49> > > > > you shouldn't need direct access to the cache here. Use a > > CacheProviderBackend. > > Ashish Singh wrote: > Required to make sure we block on first cache loading. Is this still true? I suggested a different way of handling the blocking below. - Gregory ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46909/#review132161 ----------------------------------------------------------- On May 12, 2016, 9:03 a.m., Ashish Singh wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46909/ > ----------------------------------------------------------- > > (Updated May 12, 2016, 9:03 a.m.) > > > Review request for sentry, Dapeng Sun, Gregory Chanan, Hao Hao, and Sravya > Tirukkovalur. > > > Bugs: SENTRY-1229 > https://issues.apache.org/jira/browse/SENTRY-1229 > > > Repository: sentry > > > Description > ------- > > SENTRY-1229: Add caching to SentryGenericProviderBackend. > > > Diffs > ----- > > > sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/CacheProvider.java > PRE-CREATION > > sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/ProviderBackend.java > ffd3af4903dd59f37ea1ff4a55138742fdfa74da > > sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/TableCache.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/SentryGenericProviderBackend.java > 222b6fd530a0e26ea625d1be0fd68b0828558316 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/UpdatableCache.java > PRE-CREATION > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClient.java > 76ff15b91fddad6b5aa429d2439eb2a5086544d7 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java > 74b6963ab4015521462fb3c25559d0d12292424f > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java > 00e3fbde76ebf84704ee110adfca30869845a7b8 > > sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java > 3c0e349443e3917812b46aa4547c3cab14dab052 > > sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/AbstractKafkaSentryTestBase.java > a2cfa28da2af548a872ec0d2e5620ae1c27041b3 > > sentry-tests/sentry-tests-kafka/src/test/java/org/apache/sentry/tests/e2e/kafka/TestAuthorize.java > 250522ed33394a667b1a0d6c47c68b210e0214a3 > > Diff: https://reviews.apache.org/r/46909/diff/ > > > Testing > ------- > > Extended Kafka e2e tests. Will be running perf tests for Kafka-Sentry > integration with caching turned on. > > > Thanks, > > Ashish Singh > >