-----------------------------------------------------------
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
>
>
|