[
https://issues.apache.org/jira/browse/RANGER-3637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496822#comment-17496822
]
kirby zhou commented on RANGER-3637:
------------------------------------
And your patch is buggy, it even cannot be compiled.
Please check line like "order = 0;" without var definition.
Another question, Why NullPointerException happens? It should be inited in
somewhere, you should given the reason why we need to ignore the
NullPointerException here instead of fix the root reason why something is null.
> setpolicies failed because of NullPointerException
> --------------------------------------------------
>
> Key: RANGER-3637
> URL: https://issues.apache.org/jira/browse/RANGER-3637
> Project: Ranger
> Issue Type: Bug
> Components: plugins
> Affects Versions: 2.2.0
> Environment: centos7 java1.8
> Reporter: wangzhongwei
> Priority: Major
> Attachments: RANGER-3637.001.patch
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> when use ranger hdfs plugins ,update policies and save the policies
> ,sometimes failed because of the NullPointerException,like the same issue as
> RANGER-3108,but we should
> make a non-empty judgment on all 3
> lists:dataMaskPolicyEvaluators,rowFilterPolicyEvaluators,auditPolicyEvaluators
>
> issue log:
> 2022-02-22 16:32:06,200 INFO
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: This policy
> engine contains 4 policy evaluators
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: policy
> evaluation order: 4 policies
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: policy
> evaluation order: #1 - policy id=1; name=all - path; evalOrder=9933
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: policy
> evaluation order: #2 - policy id=2; name=kms-audit-path; evalOrder=9944
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: policy
> evaluation order: #3 - policy id=3; name=hbase-archive; evalOrder=9944
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: policy
> evaluation order: #4 - policy id=5; name=test11112; evalOrder=9952
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: dataMask policy
> evaluation order: 0 policies
> 2022-02-22 16:32:06,200 DEBUG
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository: rowFilter
> policy evaluation order: 0 policies
> 2022-02-22 16:32:06,200 ERROR
> org.apache.ranger.plugin.service.RangerBasePlugin: setPolicies: policy engine
> initialization failed! Leaving current policy engine as-is. Exception :
> java.lang.NullPointerException
> at
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository.init(RangerPolicyRepository.java:991)
> at
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository.<init>(RangerPolicyRepository.java:229)
> at
> org.apache.ranger.plugin.policyengine.RangerPolicyRepository.<init>(RangerPolicyRepository.java:180)
> at
> org.apache.ranger.plugin.policyengine.PolicyEngine.<init>(PolicyEngine.java:212)
> at
> org.apache.ranger.plugin.policyengine.RangerPolicyEngineImpl.<init>(RangerPolicyEngineImpl.java:104)
> at
> org.apache.ranger.plugin.service.RangerBasePlugin.setPolicies(RangerBasePlugin.java:325)
> at
> org.apache.ranger.plugin.util.PolicyRefresher.loadPolicy(PolicyRefresher.java:263)
> at
> org.apache.ranger.plugin.util.PolicyRefresher.run(PolicyRefresher.java:209)
> @
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)