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




agents-common/src/main/java/org/apache/ranger/plugin/model/RangerServiceResource.java
Lines 90 (patched)
<https://reviews.apache.org/r/72997/#comment311217>

    Is it critical to return null when map is empty? If not, I suggest to 
return the value as is.



agents-common/src/main/java/org/apache/ranger/plugin/model/RangerServiceResource.java
Lines 110 (patched)
<https://reviews.apache.org/r/72997/#comment311218>

    Is it critical to assign null when incoming map is empty? If not, I suggest 
to assign the value as is.



security-admin/src/main/java/org/apache/ranger/db/XXRMSServiceResourceDao.java
Line 158 (original), 158 (patched)
<https://reviews.apache.org/r/72997/#comment311219>

    Only resourceElements is currently handled by 
serializtation/deserialization; 'ownerName' field is not handled:-(
    
    I suggest to consider a DB patch, to update existing values in 
XXRMSServiceResource.serviceResourceElements column to hold following structure 
(instead of directly Map<String, RangerPolicyResource>):
    
      public static StoredServiceResource implements java.io.Serializable {
        private Map<String, RangerPolicyResource> resourceElements;
        private String                            ownerName;
        private Map<String, String>               additonalInfo;
      }
    
    This will help avoid parsing for 
SERVICE_RESOURCE_ADDITIONAL_INFO_DELIMITER_STRING during every read here after.


- Madhan Neethiraj


On Oct. 31, 2020, 12:42 a.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72997/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2020, 12:42 a.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-3065
>     https://issues.apache.org/jira/browse/RANGER-3065
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> RangerServiceResource model class represents, in Ranger, an entity that may 
> be authorized by Ranger. It is useful to have it store, in a generic way, any 
> additional information that may be useful during authorization.
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/RangerServiceResource.java
>  bdd3e544c 
>   
> security-admin/src/main/java/org/apache/ranger/db/XXRMSServiceResourceDao.java
>  8938e6df2 
> 
> 
> Diff: https://reviews.apache.org/r/72997/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>

Reply via email to