Skip to content

Conversation

@CalvinKirs
Copy link
Member

Proposed changes

  • Use a Child-First ClassLoader to isolate plugins from the kernel, giving priority to plugin classes to prevent conflicts between the plugin and kernel classes.
  • Allow users to place plugins in a specified directory, such as auth-lib, to avoid classpath conflicts by default.
  • Support developers in debugging plugins by allowing them to bring in plugins via Maven, making the debugging process more convenient.

Use a Child-First ClassLoader to isolate plugins from the kernel, giving priority to plugin classes to prevent conflicts between the plugin and kernel classes.
Allow users to place plugins in a specified directory, such as auth-lib, to avoid classpath conflicts by default.
Support developers in debugging plugins by allowing them to bring in plugins via Maven, making the debugging process more convenient.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

private static final Map<String, String> pluginDirMapping = new HashedMap();

static {
pluginDirMapping.put(AuthenticatorFactory.class.getSimpleName(), "auth-lib");
Copy link
Member Author

Choose a reason for hiding this comment

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

This directory might not be ideal; perhaps we should use plugin/auth instead?

@CalvinKirs CalvinKirs force-pushed the master-auth-classloader branch from eec5517 to b6c9474 Compare September 24, 2024 11:00
@CalvinKirs
Copy link
Member Author

run buildall

@CalvinKirs
Copy link
Member Author

run buildall

morningman
morningman previously approved these changes Sep 25, 2024
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 25, 2024
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

…er-auth-classloader

# Conflicts:
#	fe/fe-common/src/main/java/org/apache/doris/common/Config.java
@CalvinKirs
Copy link
Member Author

run buildall

@CalvinKirs CalvinKirs merged commit c34e86b into apache:master Sep 25, 2024
@CalvinKirs CalvinKirs deleted the master-auth-classloader branch September 25, 2024 09:45
CalvinKirs added a commit that referenced this pull request Oct 9, 2024
… loading plugins (#41574)

## Proposed changes
in #41100 An exception will be thrown if the user creates the plugin
directory but it is empty.
When loading plugins, it's acceptable for the plugin directory to be
empty. Users might create the directory without placing any plugins
inside, but since some plugins are still located on the classpath, this
doesn’t cause any issues. If users specify a particular plugin but don’t
place it in the directory, the business logic should handle that
situation. The general-purpose class shouldn’t be concerned with this.
eldenmoon pushed a commit to eldenmoon/incubator-doris that referenced this pull request Oct 10, 2024
… loading plugins (apache#41574)

## Proposed changes
in apache#41100 An exception will be thrown if the user creates the plugin
directory but it is empty.
When loading plugins, it's acceptable for the plugin directory to be
empty. Users might create the directory without placing any plugins
inside, but since some plugins are still located on the classpath, this
doesn’t cause any issues. If users specify a particular plugin but don’t
place it in the directory, the business logic should handle that
situation. The general-purpose class shouldn’t be concerned with this.
cjj2010 pushed a commit to cjj2010/doris that referenced this pull request Oct 12, 2024
… loading plugins (apache#41574)

## Proposed changes
in apache#41100 An exception will be thrown if the user creates the plugin
directory but it is empty.
When loading plugins, it's acceptable for the plugin directory to be
empty. Users might create the directory without placing any plugins
inside, but since some plugins are still located on the classpath, this
doesn’t cause any issues. If users specify a particular plugin but don’t
place it in the directory, the business logic should handle that
situation. The general-purpose class shouldn’t be concerned with this.
amorynan pushed a commit to amorynan/doris that referenced this pull request Oct 12, 2024
… loading plugins (apache#41574)

## Proposed changes
in apache#41100 An exception will be thrown if the user creates the plugin
directory but it is empty.
When loading plugins, it's acceptable for the plugin directory to be
empty. Users might create the directory without placing any plugins
inside, but since some plugins are still located on the classpath, this
doesn’t cause any issues. If users specify a particular plugin but don’t
place it in the directory, the business logic should handle that
situation. The general-purpose class shouldn’t be concerned with this.
bobhan1 pushed a commit to bobhan1/doris that referenced this pull request Oct 23, 2024
…olation (apache#41100)

## Proposed changes
- Use a Child-First ClassLoader to isolate plugins from the kernel,
giving priority to plugin classes to prevent conflicts between the
plugin and kernel classes.
- Allow users to place plugins in a specified directory, such as
auth-lib, to avoid classpath conflicts by default.
- Support developers in debugging plugins by allowing them to bring in
plugins via Maven, making the debugging process more convenient.

(cherry picked from commit c34e86b)
bobhan1 pushed a commit to bobhan1/doris that referenced this pull request Nov 14, 2024
… loading plugins (apache#41574) (apache#209)

## Proposed changes
in apache#41100 An exception will be thrown if the user creates the plugin
directory but it is empty.
When loading plugins, it's acceptable for the plugin directory to be
empty. Users might create the directory without placing any plugins
inside, but since some plugins are still located on the classpath, this
doesn’t cause any issues. If users specify a particular plugin but don’t
place it in the directory, the business logic should handle that
situation. The general-purpose class shouldn’t be concerned with this.

(cherry picked from commit 9b25a83)
morningman pushed a commit to morningman/doris that referenced this pull request Nov 21, 2024
…olation (apache#41100)

- Use a Child-First ClassLoader to isolate plugins from the kernel,
giving priority to plugin classes to prevent conflicts between the
plugin and kernel classes.
- Allow users to place plugins in a specified directory, such as
auth-lib, to avoid classpath conflicts by default.
- Support developers in debugging plugins by allowing them to bring in
plugins via Maven, making the debugging process more convenient.
CalvinKirs added a commit to CalvinKirs/incubator-doris that referenced this pull request Jul 1, 2025
…olation (apache#41100)

## Proposed changes
- Use a Child-First ClassLoader to isolate plugins from the kernel,
giving priority to plugin classes to prevent conflicts between the
plugin and kernel classes.
- Allow users to place plugins in a specified directory, such as
auth-lib, to avoid classpath conflicts by default.
- Support developers in debugging plugins by allowing them to bring in
plugins via Maven, making the debugging process more convenient.

(cherry picked from commit c34e86b)
CalvinKirs added a commit to CalvinKirs/incubator-doris that referenced this pull request Jul 1, 2025
… loading plugins (apache#41574)

## Proposed changes
in apache#41100 An exception will be thrown if the user creates the plugin
directory but it is empty.
When loading plugins, it's acceptable for the plugin directory to be
empty. Users might create the directory without placing any plugins
inside, but since some plugins are still located on the classpath, this
doesn’t cause any issues. If users specify a particular plugin but don’t
place it in the directory, the business logic should handle that
situation. The general-purpose class shouldn’t be concerned with this.

(cherry picked from commit 9b25a83)
morrySnow pushed a commit that referenced this pull request Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.1.x-experimental dev/3.1.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants