You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2018/02/27 14:45:45 UTC

Review Request 65816: SENTRY-2145 - Some misc code cleanups

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

Review request for sentry.


Bugs: SENTRY-2145
    https://issues.apache.org/jira/browse/SENTRY-2145


Repository: sentry


Description
-------

This task is to implement some misc code cleanups:

a) Use StringBuilder instead of looping and using "+" with a String

b) Use EntrySet instead of KeySet when the value is also required

c) Make sure constants are static final.


Diffs
-----

  sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java 6c2410b0 
  sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java 319a1be5 
  sentry-binding/sentry-binding-kafka/src/main/java/org/apache/sentry/kafka/binding/KafkaAuthBinding.java 908c80f1 
  sentry-core/sentry-core-model-solr/src/main/java/org/apache/sentry/core/model/solr/AdminOperation.java c054b7dc 
  sentry-dist/src/license/THIRD-PARTY.properties 7226acdf 


Diff: https://reviews.apache.org/r/65816/diff/1/


Testing
-------


Thanks,

Colm O hEigeartaigh


Re: Review Request 65816: SENTRY-2145 - Some misc code cleanups

Posted by Sergio Pena via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65816/#review200047
-----------------------------------------------------------


Ship it!




Changes look good to me.

- Sergio Pena


On Feb. 28, 2018, 12:09 p.m., Colm O hEigeartaigh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65816/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2018, 12:09 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-2145
>     https://issues.apache.org/jira/browse/SENTRY-2145
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> This task is to implement some misc code cleanups:
> 
> a) Use StringBuilder instead of looping and using "+" with a String
> 
> b) Use EntrySet instead of KeySet when the value is also required
> 
> c) Make sure constants are static final.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java 319a1be5 
>   sentry-binding/sentry-binding-kafka/src/main/java/org/apache/sentry/kafka/binding/KafkaAuthBinding.java 908c80f1 
>   sentry-core/sentry-core-model-solr/src/main/java/org/apache/sentry/core/model/solr/AdminOperation.java c054b7dc 
> 
> 
> Diff: https://reviews.apache.org/r/65816/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colm O hEigeartaigh
> 
>


Re: Review Request 65816: SENTRY-2145 - Some misc code cleanups

Posted by Colm O hEigeartaigh <co...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65816/
-----------------------------------------------------------

(Updated Feb. 28, 2018, 12:09 p.m.)


Review request for sentry.


Bugs: SENTRY-2145
    https://issues.apache.org/jira/browse/SENTRY-2145


Repository: sentry


Description
-------

This task is to implement some misc code cleanups:

a) Use StringBuilder instead of looping and using "+" with a String

b) Use EntrySet instead of KeySet when the value is also required

c) Make sure constants are static final.


Diffs (updated)
-----

  sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java 319a1be5 
  sentry-binding/sentry-binding-kafka/src/main/java/org/apache/sentry/kafka/binding/KafkaAuthBinding.java 908c80f1 
  sentry-core/sentry-core-model-solr/src/main/java/org/apache/sentry/core/model/solr/AdminOperation.java c054b7dc 


Diff: https://reviews.apache.org/r/65816/diff/2/

Changes: https://reviews.apache.org/r/65816/diff/1-2/


Testing
-------


Thanks,

Colm O hEigeartaigh


Re: Review Request 65816: SENTRY-2145 - Some misc code cleanups

Posted by Steve Moist via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65816/#review198354
-----------------------------------------------------------




sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
Line 217 (original), 217 (patched)
<https://reviews.apache.org/r/65816/#comment278500>

    Insert String permsRequired = permsRequired.toString(); here.  The toString() creates a new string everytime this is called.


- Steve Moist


On Feb. 27, 2018, 2:45 p.m., Colm O hEigeartaigh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65816/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2018, 2:45 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-2145
>     https://issues.apache.org/jira/browse/SENTRY-2145
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> This task is to implement some misc code cleanups:
> 
> a) Use StringBuilder instead of looping and using "+" with a String
> 
> b) Use EntrySet instead of KeySet when the value is also required
> 
> c) Make sure constants are static final.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java 6c2410b0 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java 319a1be5 
>   sentry-binding/sentry-binding-kafka/src/main/java/org/apache/sentry/kafka/binding/KafkaAuthBinding.java 908c80f1 
>   sentry-core/sentry-core-model-solr/src/main/java/org/apache/sentry/core/model/solr/AdminOperation.java c054b7dc 
>   sentry-dist/src/license/THIRD-PARTY.properties 7226acdf 
> 
> 
> Diff: https://reviews.apache.org/r/65816/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colm O hEigeartaigh
> 
>


Re: Review Request 65816: SENTRY-2145 - Some misc code cleanups

Posted by Na Li via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65816/#review198331
-----------------------------------------------------------




sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java
Lines 213 (patched)
<https://reviews.apache.org/r/65816/#comment278469>

    I think sentry-binding-hive-v2 is no longer used. All things we need are in sentry-binding-hive



sentry-dist/src/license/THIRD-PARTY.properties
Line 22 (original), 23 (patched)
<https://reviews.apache.org/r/65816/#comment278470>

    should we commit this file?


- Na Li


On Feb. 27, 2018, 2:45 p.m., Colm O hEigeartaigh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65816/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2018, 2:45 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-2145
>     https://issues.apache.org/jira/browse/SENTRY-2145
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> This task is to implement some misc code cleanups:
> 
> a) Use StringBuilder instead of looping and using "+" with a String
> 
> b) Use EntrySet instead of KeySet when the value is also required
> 
> c) Make sure constants are static final.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java 6c2410b0 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/DefaultSentryValidator.java 319a1be5 
>   sentry-binding/sentry-binding-kafka/src/main/java/org/apache/sentry/kafka/binding/KafkaAuthBinding.java 908c80f1 
>   sentry-core/sentry-core-model-solr/src/main/java/org/apache/sentry/core/model/solr/AdminOperation.java c054b7dc 
>   sentry-dist/src/license/THIRD-PARTY.properties 7226acdf 
> 
> 
> Diff: https://reviews.apache.org/r/65816/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colm O hEigeartaigh
> 
>