Repository navigation
Discover core components through ServiceLoader providers - #528
Merged
Merged
Conversation
`flume-core` hard-codes the class names of components that live in other modules and repositories, so moving a component requires a change in core. Each module can now register short `type` aliases through the `org.apache.flume.spi` provider interfaces. The `*Type` enums remain as a fallback until all modules register their providers. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration filter modules should only depend on the API module, not on `flume-core`. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
rgoers
approved these changes
Nov 9, 2026
ppkarwasz
added a commit
that referenced
this pull request
Nov 9, 2026
…529) * Register the components of the other modules through `ServiceLoader` Each module now registers its own `type` aliases, so `flume-core` no longer needs to know their class names. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com> * Export the `org.apache.flume.spi` package The exported component packages reference it, so bnd rejects the build since #528 and #532 were both merged. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flume-corehard-codes, in the*Typeenums, the class names of components that live in other modules and repositories: e.g.SourceType.AVROhad to change for apache/logging-flume-rpc#24. This PR is the first step of replacing those enums withServiceLoaderproviders, following theRpcClientProviderSPI offlume-sdk.org.apache.flume.spipackage:ComponentProvider,AbstractComponentProvider,ComponentRegistryand one provider interface per component kind (SourceProvider,SinkProvider,ChannelProvider,ChannelSelectorProvider,SinkProcessorProvider,ConfigFilterProvider,InterceptorProvider,EventSerializerProvider,EventDeserializerProvider,PathManagerProvider).flume-corethrough nestedProviderclasses annotated with@ServiceProvider.typein this order: registered alias (case-insensitive), legacy enum alias, fully qualified class name of the component. Conflicting registrations only fail when the ambiguous type is used, and a broken provider is skipped.The enums stay as a fallback, so existing configurations keep working.
Next steps
logging-flume-rpcand the other component repositories.*Typeenums, the legacy-alias constructor and the unused*ConfigurationTypelayer, whose configuration classes do not exist.🤖 Generated with Claude Code