Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22435
Change subject: IMPALA-13722: Ranger request should have no null values in the resources map ...................................................................... IMPALA-13722: Ranger request should have no null values in the resources map Each Ranger privilege grant/revoke request has a resources map to describe the target resource, e.g. db, table, url, etc. The keys of the resources map are predefined strings like "database", "table", "column", "url", etc. The values are the actual resource name or "*" as a wildcard for all such kinds of resources. Our FE tests unintentionally set null values on "url" when the resources map doesn't have such a key. See AuthorizationTestBase#updateUri(). Using null as the value is an undefined behavior and it causes NullPointerException in newer versions of Ranger when granting/revoking privileges (might due to RANGER-4638 that adds a code to split the string value). This patch fixes AuthorizationTestBase#updateUri() to only update the URL when it's not null and starts with "/". Tests: - Verified the fix in a downstream build with a newer Ranger version that hits the issue. Change-Id: Ibed929bcd25ffdf54fa5f0fc848a0cc13c1fb0a2 --- M fe/src/test/java/org/apache/impala/authorization/AuthorizationTestBase.java 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/35/22435/1 -- To view, visit http://gerrit.cloudera.org:8080/22435 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibed929bcd25ffdf54fa5f0fc848a0cc13c1fb0a2 Gerrit-Change-Number: 22435 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
