Skip to content

Conversation

dugujiujiang
Copy link

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix. Create an issue in ASF JIRA before opening a pull request and
set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. RANGER-XXXX: Fix a typo in YYY))

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-api.version}</version>
<scope>runtime</scope>
<groupId>org.apache.logging.log4j</groupId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ranger-elasticsearch-plugin-shim.jar shouldn't require log4j implementation libraries; Sources in this library only refer to org.slf4j.Logger and org.slf4j.LoggerFactory; so depdency on slf4j-api should be the enough. The implementation libraries, log4j for Elasticsearch, should be picked up at runtime from Elasticsearch classpath. It shouldn't be necessary to package them with Ranger plugin.

Also, looking at the stack trace in RANGER-3696, it seems Elastisearch already has class isolation in place for plugins (so that libraries used in the plugin are not visible to Elasticsearch). If this is true, then I suggest getting rid of ranger-elasticsearch-plugin-shim library altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants