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




agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptExecutionContext.java
Lines 43 (patched)
<https://reviews.apache.org/r/59296/#comment248500>

    USE_DEFAULT_ATLAS_TAG_ATTRIBUTE_DATE_FORMAT ==> 
DEFAULT_ATLAS_TAG_ATTRIBUTE_DATE_FORMAT_NAME



agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptExecutionContext.java
Lines 230 (patched)
<https://reviews.apache.org/r/59296/#comment248512>

    Instead of creating a SimpleDateFormat in every call, consider receiving 
SimpleDateFormat as argument to this method. getAsDate(String value) should be 
updated to create a thread-local array of SimpleDateFormat objects and pass 
each to this method.



agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptExecutionContext.java
Lines 233 (patched)
<https://reviews.apache.org/r/59296/#comment248505>

    This warn log should be generated only after all formats have been tried, 
in getAsDate(String value). Else this might generate excessive, unnecessary 
warning messages.


- Madhan Neethiraj


On May 15, 2017, 9:25 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59296/
> -----------------------------------------------------------
> 
> (Updated May 15, 2017, 9:25 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-1581
>     https://issues.apache.org/jira/browse/RANGER-1581
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Ranger plugins interpret tag attributes of type 'date' using an internal 
> Ranger date-format string. Now, in addition to the internal Ranger 
> date-format string ("yyyy/MM/dd"), plugins also support a comma-separated 
> list of data-format strings, based on the value of the plugin configuration 
> parameter "ranger.plugin.tag.attr.additional.date.formats". A special value 
> string "ATLAS_DATE_FORMAT" is supported to refer to default date-format used 
> by Atlas.
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptExecutionContext.java
>  923c188 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyEngine.java
>  5948a74 
>   
> agents-common/src/test/resources/policyengine/test_policyengine_tag_hive.json 
> 1c7662d 
> 
> 
> Diff: https://reviews.apache.org/r/59296/diff/1/
> 
> 
> Testing
> -------
> 
> Developed a unit test for testing specification and use of 
> "ranger.plugin.tag.attr.additional.date.formats" configuration variable.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>

Reply via email to