Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Transform an ExtensionPoint #9319

Merged
merged 3 commits into from Mar 4, 2020

Conversation

mitchlloyd
Copy link
Contributor

@mitchlloyd mitchlloyd commented Feb 6, 2020

Fixes #9311.

Description

Transform is a useful place for 3rd party developers to add their own extensions. Informally this has been an available extension point since 2017. This PR proposes adding the compatibility guarantees of @ExtensionPoint.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.

ToDo:

It makes sense to me to add a new item in the list of 15 items under "Writing your own extensions" for completeness sake. I'd be happy to write a dedicated section of these docs, although I think this page seems destined to be split into many pages: one describing the approach for each kind of extension.

Copy link
Contributor

@suneet-s suneet-s left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion and contribution!

@@ -46,6 +46,7 @@ Druid's extensions leverage Guice in order to add things at runtime. Basically,
1. Add new Jersey resources by calling `Jerseys.addResource(binder, clazz)`.
1. Add new Jetty filters by extending `org.apache.druid.server.initialization.jetty.ServletFilterHolder`.
1. Add new secret providers by extending `org.apache.druid.metadata.PasswordProvider`.
1. Add new ingest transform by implementing the `org.apache.druid.segment.transform.Transform` interface from the `druid-processing` package.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

It makes sense to me to add a new item in the list of 15 items under "Writing your own extensions" for completeness sake. I'd be happy to write a dedicated section of these docs, although I think this page seems destined to be split into many pages: one describing the approach for each kind of extension.

Hi @mitchlloyd, I assume you are interested in writing docs what @suneet-s mentioned based on your comment above. Do you want to add them in this PR? I think that could be done in a follow-up PR if you want.

@mitchlloyd
Copy link
Contributor Author

mitchlloyd commented Feb 11, 2020 via email

@jihoonson
Copy link
Contributor

@mitchlloyd great, thanks!

@mitchlloyd
Copy link
Contributor Author

@suneet-s, @jihoonson I added an example implementation for a Transform extension. I realize this is a little more verbose than the other sections, but the full implementation with imports would have helped me out. Happy to trim it down by removing imports, class declarations or anything else.

Copy link
Contributor

@jihoonson jihoonson left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you @mitchlloyd!

@jihoonson
Copy link
Contributor

@suneet-s do you have more comments?

@suneet-s
Copy link
Contributor

suneet-s commented Mar 4, 2020

@suneet-s do you have more comments?

lgtm !

@jihoonson jihoonson merged commit 3016057 into apache:master Mar 4, 2020
@jihoonson jihoonson added this to the 0.18.0 milestone Mar 26, 2020
@mitchlloyd mitchlloyd deleted the transform-extension-point branch May 1, 2021 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark Tranform interface with @extensionPoint
3 participants