Fang-Yu Rao created IMPALA-14704:
------------------------------------
Summary: RangerBasePlugin#refreshPoliciesAndTags() could throw a
NullPointerException
Key: IMPALA-14704
URL: https://issues.apache.org/jira/browse/IMPALA-14704
Project: IMPALA
Issue Type: Improvement
Reporter: Fang-Yu Rao
Assignee: Fang-Yu Rao
We found that during the call to
\{{RangerAuthorizationChecker#invalidateAuthorizationCache()}} in
[RangerAuthorizationChecker.java|https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java],
a {{NullPointerException}} could be thrown during runtime.
{code}
I20260119 10:54:44.627986 838 jni-util.cc:321] java.lang.NullPointerException
at
org.apache.ranger.plugin.service.RangerBasePlugin.refreshPoliciesAndTags(RangerBasePlugin.java:971)
at
org.apache.impala.authorization.ranger.RangerAuthorizationChecker.invalidateAuthorizationCache(RangerAuthorizatio
nChecker.java:250)
at
org.apache.impala.catalog.local.CatalogdMetaProvider.updateAuthPolicy(CatalogdMetaProvider.java:1625)
at
org.apache.impala.catalog.local.CatalogdMetaProvider.updateCatalogCache(CatalogdMetaProvider.java:1530)
at
org.apache.impala.service.FeCatalogManager$LocalImpl.updateCatalogCache(FeCatalogManager.java:169)
at org.apache.impala.service.Frontend.updateCatalogCache(Frontend.java:613)
at
org.apache.impala.service.JniFrontend.updateCatalogCache(JniFrontend.java:204)
I20260119 10:54:44.628031 838 status.cc:129] NullPointerException: null
@ 0xf7ebc4
@ 0x1ac4e98
@ 0x16891d4
@ 0x17e353c
@ 0x1a2b09c
@ 0x1a2b724
@ 0x1a3a3b8
@ 0x1a425d8
@ 0x1a3dd48
@ 0xe66478
@ 0x137683c
@ 0x1b9a70c
@ 0x2463b78
@ 0xffff9116d1cc
@ 0xffff911d942c
@ (nil)
E20260119 10:54:44.628089 838 impala-server.cc:2309] There was an error
processing the impalad catalog update. Request
ing a full topic update to recover: NullPointerException: null
{code}
{{refreshPoliciesAndTags()}} in
[RangerBasePlugin.java|https://github.com/apache/ranger/blob/master/agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java]
does not catch this.
{code}
public void refreshPoliciesAndTags() {
LOG.debug("==> refreshPoliciesAndTags(): synchronousPolicyRefresh={}",
synchronousPolicyRefresh);
try {
long oldPolicyVersion = getPoliciesVersion();
// Synch-up policies
if (refresher != null) {
refresher.syncPoliciesWithAdmin(accessTrigger);
}
long newPolicyVersion = getPoliciesVersion();
if (oldPolicyVersion == newPolicyVersion) {
// Synch-up tags
RangerTagEnricher tagEnricher = getTagEnricher();
if (tagEnricher != null) {
tagEnricher.syncTagsWithAdmin(accessTrigger);
}
}
} catch (InterruptedException exception) {
LOG.error("Failed to update policy-engine, continuing to use old
policy-engine and/or tags", exception);
}
LOG.debug("<== refreshPoliciesAndTags()");
}
{code}
We should catch this on the Impala side and log a warning message.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]