You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by pengjianhua <pe...@zte.com.cn> on 2017/08/07 09:20:25 UTC

Review Request 61452: RANGER-1725: It is incorrect to judge whether you need to create a RangerServiceDef object for a given service

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

Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.


Bugs: RANGER-1725
    https://issues.apache.org/jira/browse/RANGER-1725


Repository: ranger


Description
-------

It is incorrect to judge whether you need to create a RangerServiceDef object for a given service.
The current judgment condition is as follows
boolean createServiceDef = (CollectionUtils.isEmpty(supportedServiceDefs) || supportedServiceDefs.contains(serviceDefName));
It means When the supportedServiceDefs is empty, the RangerServiceDef object for the specified service will be created, but I think this judge is incorrect.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java 0bc09f6 


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


Testing
-------


Thanks,

pengjianhua


Re: Review Request 61452: RANGER-1725: It is incorrect to judge whether you need to create a RangerServiceDef object for a given service

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



Looks fine. Could you remove the try/catch statement in "getSupportedServiceDef" as well - it's not needed. You could also move the "supportedServiceDefs" definition down from the static variable declarations down to the instance variable declarations.

- Colm O hEigeartaigh


On Aug. 7, 2017, 11:30 a.m., pengjianhua wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61452/
> -----------------------------------------------------------
> 
> (Updated Aug. 7, 2017, 11:30 a.m.)
> 
> 
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
> 
> 
> Bugs: RANGER-1725
>     https://issues.apache.org/jira/browse/RANGER-1725
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> It is incorrect to judge whether you need to create a RangerServiceDef object for a given service.
> The current judgment condition is in the org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil#getOrCreateServiceDef, as follows
> boolean createServiceDef = (CollectionUtils.isEmpty(supportedServiceDefs) || supportedServiceDefs.contains(serviceDefName));
> It means When the supportedServiceDefs is empty, the RangerServiceDef object for the specified service will be created, but I think this judge is incorrect.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java 0bc09f6 
> 
> 
> Diff: https://reviews.apache.org/r/61452/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengjianhua
> 
>


Re: Review Request 61452: RANGER-1725: It is incorrect to judge whether you need to create a RangerServiceDef object for a given service

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


Ship it!




Ship It!

- Colm O hEigeartaigh


On Aug. 9, 2017, 5:33 a.m., pengjianhua wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61452/
> -----------------------------------------------------------
> 
> (Updated Aug. 9, 2017, 5:33 a.m.)
> 
> 
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
> 
> 
> Bugs: RANGER-1725
>     https://issues.apache.org/jira/browse/RANGER-1725
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> It is incorrect to judge whether you need to create a RangerServiceDef object for a given service.
> The current judgment condition is in the org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil#getOrCreateServiceDef, as follows
> boolean createServiceDef = (CollectionUtils.isEmpty(supportedServiceDefs) || supportedServiceDefs.contains(serviceDefName));
> It means When the supportedServiceDefs is empty, the RangerServiceDef object for the specified service will be created, but I think this judge is incorrect.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java 0bc09f6 
> 
> 
> Diff: https://reviews.apache.org/r/61452/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengjianhua
> 
>


Re: Review Request 61452: RANGER-1725: It is incorrect to judge whether you need to create a RangerServiceDef object for a given service

Posted by pengjianhua <pe...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61452/
-----------------------------------------------------------

(Updated 八月 9, 2017, 5:33 a.m.)


Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.


Changes
-------

add two changes, one is to remove the try/catch statement in "getSupportedServiceDef" , the other is to move the "supportedServiceDefs" definition down from the static variable declarations down to the instance variable declarations.


Bugs: RANGER-1725
    https://issues.apache.org/jira/browse/RANGER-1725


Repository: ranger


Description
-------

It is incorrect to judge whether you need to create a RangerServiceDef object for a given service.
The current judgment condition is in the org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil#getOrCreateServiceDef, as follows
boolean createServiceDef = (CollectionUtils.isEmpty(supportedServiceDefs) || supportedServiceDefs.contains(serviceDefName));
It means When the supportedServiceDefs is empty, the RangerServiceDef object for the specified service will be created, but I think this judge is incorrect.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java 0bc09f6 


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

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


Testing
-------


Thanks,

pengjianhua


Re: Review Request 61452: RANGER-1725: It is incorrect to judge whether you need to create a RangerServiceDef object for a given service

Posted by pengjianhua <pe...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61452/
-----------------------------------------------------------

(Updated 八月 7, 2017, 11:30 a.m.)


Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.


Bugs: RANGER-1725
    https://issues.apache.org/jira/browse/RANGER-1725


Repository: ranger


Description (updated)
-------

It is incorrect to judge whether you need to create a RangerServiceDef object for a given service.
The current judgment condition is in the org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil#getOrCreateServiceDef, as follows
boolean createServiceDef = (CollectionUtils.isEmpty(supportedServiceDefs) || supportedServiceDefs.contains(serviceDefName));
It means When the supportedServiceDefs is empty, the RangerServiceDef object for the specified service will be created, but I think this judge is incorrect.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/store/EmbeddedServiceDefsUtil.java 0bc09f6 


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


Testing
-------


Thanks,

pengjianhua