You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhay Kulkarni <ak...@hortonworks.com> on 2020/04/01 17:50:26 UTC
Review Request 72302: RANGER-2773: Enhanced logging messages for
RangerScriptConditionEvaluator class
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72302/
-----------------------------------------------------------
Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
Bugs: RANGER-2773
https://issues.apache.org/jira/browse/RANGER-2773
Repository: ranger
Description
-------
Failure during initialization of RangerScriptConditionEvaluator is not reported. Such failure should be clearly reported as an error. Any methods called on incorrectly initialized RangerScriptConditionEvaluator also need to report error.
Note that this fix only logs an error.
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java 5b6653901
Diff: https://reviews.apache.org/r/72302/diff/1/
Testing
-------
Tested in a live cluster.
Thanks,
Abhay Kulkarni
Re: Review Request 72302: RANGER-2773: Enhanced logging messages for
RangerScriptConditionEvaluator class
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72302/#review220175
-----------------------------------------------------------
Fix it, then Ship it!
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java
Lines 76 (patched)
<https://reviews.apache.org/r/72302/#comment308494>
String conditionType = condition != null ? condition.getType() : null;
"failed to initialize condition " + conditionType + ": script engine '" + engineName + "' was not created"
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java
Lines 131 (patched)
<https://reviews.apache.org/r/72302/#comment308495>
String conditionType = condition != null ? condition.getType() : null;
"failed to evaluate condition " + conditionType + ": script is empty"
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java
Lines 135 (patched)
<https://reviews.apache.org/r/72302/#comment308496>
String conditionType = condition != null ? condition.getType() : null;
"failed to evaluate condition " + conditionType + ": script engine not found"
- Madhan Neethiraj
On April 1, 2020, 5:50 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72302/
> -----------------------------------------------------------
>
> (Updated April 1, 2020, 5:50 p.m.)
>
>
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2773
> https://issues.apache.org/jira/browse/RANGER-2773
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Failure during initialization of RangerScriptConditionEvaluator is not reported. Such failure should be clearly reported as an error. Any methods called on incorrectly initialized RangerScriptConditionEvaluator also need to report error.
>
> Note that this fix only logs an error.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java 5b6653901
>
>
> Diff: https://reviews.apache.org/r/72302/diff/1/
>
>
> Testing
> -------
>
> Tested in a live cluster.
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 72302: RANGER-2773: Enhanced logging messages for
RangerScriptConditionEvaluator class
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72302/#review220176
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On April 1, 2020, 9:48 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72302/
> -----------------------------------------------------------
>
> (Updated April 1, 2020, 9:48 p.m.)
>
>
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2773
> https://issues.apache.org/jira/browse/RANGER-2773
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Failure during initialization of RangerScriptConditionEvaluator is not reported. Such failure should be clearly reported as an error. Any methods called on incorrectly initialized RangerScriptConditionEvaluator also need to report error.
>
> Note that this fix only logs an error.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java 5b6653901
>
>
> Diff: https://reviews.apache.org/r/72302/diff/2/
>
>
> Testing
> -------
>
> Tested in a live cluster.
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 72302: RANGER-2773: Enhanced logging messages for
RangerScriptConditionEvaluator class
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72302/#review220184
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java
Lines 77 (patched)
<https://reviews.apache.org/r/72302/#comment308504>
It will be helpful to log list of available script engines:
List<ScriptEngineFactory> engineFactories = manager.getEngineFactories();
List<String> engineNames = new ArrayList<>();
if (engineFactories != null) {
for (ScriptEngineFactory engineFactory : engineFactories) {
engineNames.add(engineFactory.getEngineName());
}
}
LOG.error("failed to initialize condition '" + conditionType + "': script engine '" + engineName + "' was not created. Available script engines: " + engineNames);
- Madhan Neethiraj
On April 1, 2020, 9:48 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72302/
> -----------------------------------------------------------
>
> (Updated April 1, 2020, 9:48 p.m.)
>
>
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
>
>
> Bugs: RANGER-2773
> https://issues.apache.org/jira/browse/RANGER-2773
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Failure during initialization of RangerScriptConditionEvaluator is not reported. Such failure should be clearly reported as an error. Any methods called on incorrectly initialized RangerScriptConditionEvaluator also need to report error.
>
> Note that this fix only logs an error.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java 5b6653901
>
>
> Diff: https://reviews.apache.org/r/72302/diff/2/
>
>
> Testing
> -------
>
> Tested in a live cluster.
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 72302: RANGER-2773: Enhanced logging messages for
RangerScriptConditionEvaluator class
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72302/
-----------------------------------------------------------
(Updated April 1, 2020, 9:48 p.m.)
Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
Changes
-------
Fixed review comments
Bugs: RANGER-2773
https://issues.apache.org/jira/browse/RANGER-2773
Repository: ranger
Description
-------
Failure during initialization of RangerScriptConditionEvaluator is not reported. Such failure should be clearly reported as an error. Any methods called on incorrectly initialized RangerScriptConditionEvaluator also need to report error.
Note that this fix only logs an error.
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerScriptConditionEvaluator.java 5b6653901
Diff: https://reviews.apache.org/r/72302/diff/2/
Changes: https://reviews.apache.org/r/72302/diff/1-2/
Testing
-------
Tested in a live cluster.
Thanks,
Abhay Kulkarni