> On Feb. 7, 2017, 1:01 a.m., Misha Dmitriev wrote:
> > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java,
> >  line 247
> > <https://reviews.apache.org/r/56356/diff/2/?file=1625810#file1625810line247>
> >
> >     Just for a record: if you really care about memory/performance, you can 
> > check in advance what this set's size is going to be, and use the 
> > HashSet(int size) constructor. The default size is 16, which is sometimes 
> > too big and sometimes too small. Hopefully that's not a big issue here.

Thanks for the comment. I don't think it matters much here.


> On Feb. 7, 2017, 1:01 a.m., Misha Dmitriev wrote:
> > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java,
> >  line 20
> > <https://reviews.apache.org/r/56356/diff/2/?file=1625810#file1625810line20>
> >
> >     In principle, a "star import" is not a good thing, since it makes it 
> > more difficult to figure out the full name of some random class Foo being 
> > used in the code.

Fixed.


> On Feb. 7, 2017, 1:01 a.m., Misha Dmitriev wrote:
> > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java,
> >  line 728
> > <https://reviews.apache.org/r/56356/diff/2/?file=1625811#file1625811line728>
> >
> >     Just a note: Google invented things like Sets.newHashSet() etc. in the 
> > old days of JDK5/6 I think mainly to avoid long lines like 
> > 'Set<MyLongClass> = new HashSet<MyLongClass>();' With the diamond notation 
> > in JDK7 there is no such problem anymore, and "native" constructors give 
> > you more flexibility, like 'new HashSet<>(exactSize)' etc.

The reason I changed it was for consistency - I can change it all to diamond 
notation instead.


- Alexander


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


On Feb. 7, 2017, 12:47 a.m., Alexander Kolbasov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56356/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2017, 12:47 a.m.)
> 
> 
> Review request for sentry, Misha Dmitriev, Hao Hao, kalyan kumar kalvagadda, 
> Vamsee Yarlagadda, and Vadim Spector.
> 
> 
> Bugs: SENTRY-1615
>     https://issues.apache.org/jira/browse/SENTRY-1615
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> SENTRY-1615 SentryStore should not allocate empty objects that are 
> immediately returned
> 
> 
> Diffs
> -----
> 
>   
> sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/generic/service/persistent/DelegateSentryStore.java
>  145808c04c1564eee624f3da2276852e26342c9f 
>   
> sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
>  321c094366caa2b4a56758781e5fc5a2fc9218d0 
> 
> Diff: https://reviews.apache.org/r/56356/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Kolbasov
> 
>

Reply via email to