> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > Thanks Dapeng for this update.
> > For the test part, the e2e test is replaced with V2, is it possible to keep 
> > the tests for V1? 
> > I can't find the source for SentryHiveAuthorizationValidator and 
> > SentryHiveAccessController.

Thank you for your comments.
For the e2e test, I'm agree with you. I think we should not commit e2e part to 
master. How about commit the binding part only.
For SentryHiveAuthorizationValidator and SentryHiveAccessController, these 
parts have been committed to branch, I will reupload the patch for master.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java,
> >  line 120
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123195#file1123195line120>
> >
> >     This should be removed.

Thanks for pointing this.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryAuthorizerFactory.java,
> >  line 176
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123193#file1123193line176>
> >
> >     conf.getClass(name,
> >             SentryHiveAuthorizationValidator.class, 
> > SentryHiveAuthorizationValidator.class);?
> >     
> >     Maybe conf.getClass(name,
> >             DefaultSentryValidator.class, 
> > SentryHiveAuthorizationValidator.class); ?

Thanks for pointing this.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryAuthorizerFactory.java,
> >  line 175
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123193#file1123193line175>
> >
> >     Unnecessary variable name.

Thanks for pointing this.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/HiveAuthzBindingHook.java,
> >  line 61
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123191#file1123191line61>
> >
> >     Currently, we'll call this method if we want to get the sentry 
> > configuration.
> >     I think a better way is to load the configuration only once, and we 
> > don't need to read file everytime, just like what hadoop do.

Good suggestion, Colin. Since in current ticket, I will reuse loadAuthzConf at 
HiveAuthzBindingHook(v1), and I will file another jira to fix it in v1.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/HiveAuthzBindingHook.java,
> >  line 65
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123191#file1123191line65>
> >
> >     How about using StringUtils.isEmpty(hiveAuthzConf )?

Same: I will reuse loadAuthzConf at HiveAuthzBindingHook(v1), file another jira 
to fix it.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/HiveAuthzBindingHook.java,
> >  line 70
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123191#file1123191line70>
> >
> >     The same as above, StringUtils.isEmpty()?

Same: I will reuse loadAuthzConf at HiveAuthzBindingHook(v1), file another jira 
to fix it.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryAuthorizerFactory.java,
> >  line 68
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123193#file1123193line68>
> >
> >     The duplicated method, I think the refactor of load configuration can 
> > be a sub-task for the V2.

I will reuse loadAuthzConf at HiveAuthzBindingHook


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryAuthorizerFactory.java,
> >  line 145
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123193#file1123193line145>
> >
> >     Unnecessary variable name.

Good suggestion, I will fix it.


> On 十一月 17, 2015, 1:40 p.m., Colin Ma wrote:
> > sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryAuthorizerFactory.java,
> >  line 146
> > <https://reviews.apache.org/r/39801/diff/2/?file=1123193#file1123193line146>
> >
> >     Class<? extends SentryHiveAccessController> clazz = conf.getClass(name,
> >             SentryHiveAccessController.class, 
> > SentryHiveAccessController.class);?
> >     
> >     Maybe Class<? extends SentryHiveAccessController> clazz = 
> > conf.getClass(name,
> >             DefaultSentryAccessController.class, 
> > SentryHiveAccessController.class);?

Thanks for pointing this.


- Dapeng


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


On 十一月 11, 2015, 3:47 p.m., Dapeng Sun wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39801/
> -----------------------------------------------------------
> 
> (Updated 十一月 11, 2015, 3:47 p.m.)
> 
> 
> Review request for sentry, Colin Ma, shen guoquan, Lenni Kuff, and Sravya 
> Tirukkovalur.
> 
> 
> Bugs: SENTRY-498
>     https://issues.apache.org/jira/browse/SENTRY-498
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> This patch is based on Hive authorization V2 framework.
> Through this framework, we will change more less code to integrate with Hive 
> version in future.
> We add the new module hive-binding-v2, the previous binding will not change, 
> it will still work.
> Currently the patch change the base class of Hive E2E tests, I do this just 
> to show what changes need to add E2E test, we should separate a E2E module 
> for binding V2 in future.
> 
> 
> Diffs
> -----
> 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/HiveAuthzBindingHook.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/HiveAuthzBindingSessionHookV2.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryAuthorizerFactory.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/SentryHiveAuthorizationTaskFactoryImplV2.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/SentryHiveAuthorizer.java
>  4aa6948 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/metastore/AuthorizingObjectStoreV2.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/metastore/MetastoreAuthzBindingV2.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/metastore/SentryMetastorePostEventListenerV2.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SentryAuthorizerUtil.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SimpleSemanticAnalyzer.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive-v2/src/test/java/org/apache/sentry/binding/hive/v2/DummyHiveAuthenticationProvider.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java
>  d9bb42d 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/AuthorizingObjectStore.java
>  5a0c950 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java
>  5375f6a 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetaStoreFilterHook.java
>  e8f21e5 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java
>  4924669 
>   
> sentry-core/sentry-core-model-db/src/main/java/org/apache/sentry/core/model/db/Column.java
>  89aabfc 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
>  fbb611e 
>   sentry-tests/sentry-tests-hive/pom.xml b70fe60 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/AbstractTestWithDbProvider.java
>  17a2d1e 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java
>  343048d 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java
>  98de57d 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbComplexView.java
>  ef70050 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java
>  208c93b 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java
>  dc8c1eb 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestMetadataObjectRetrieval.java
>  1415647 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java
>  cfaf7c3 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java
>  18fc5d9 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/hiveserver/HiveServerFactory.java
>  1014361 
> 
> Diff: https://reviews.apache.org/r/39801/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dapeng Sun
> 
>

Reply via email to