-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Native support for Java plugins (GA) #10620
Conversation
c24d64c
to
0c47fbd
Compare
@karenzone, could you review the doc updates for the GA release of Java plugins in this commit? fd425b4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs build cleanly and LGTM
8bec2df
to
09ff4bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic.
I've left a few comments in-line. My primary concerns are:
- upgrade pain for those using the Beta API already, since this does include breaking changes
- continued use of
CharsetEncoder
andCharsetDecoder
in our example codecs, since they are stateful and we require that implementations ofCodec
be stateless. - can users still get themselves into a tight spot with silent failures by enabling the deprecated ruby execution engine, or do we provide helpful feedback?
logstash-core/src/main/java/org/logstash/plugins/PluginFactoryExt.java
Outdated
Show resolved
Hide resolved
logstash-core/src/main/java/org/logstash/plugins/inputs/Generator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick about a final
, otherwise this looks good to go.
LGTM.
private String id; | ||
private long threads; | ||
private volatile boolean stopRequested = false; | ||
private CountDownLatch countDownLatch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: can now be final
… adds float config type * Breaking change to codec.encode method * Sink output for discarding events * URI and password config types * Utility methods for packaging Java plugins * Plugin API validation, fix gemspec generation * Plugin Jar validation * Update developer documentation * Update codec metrics for new encode method * Beta: Isolated classloaders for Java plugins * Address code review comments
… adds float config type * Breaking change to codec.encode method * Sink output for discarding events * URI and password config types * Utility methods for packaging Java plugins * Plugin API validation, fix gemspec generation * Plugin Jar validation * Update developer documentation * Update codec metrics for new encode method * Beta: Isolated classloaders for Java plugins * Address code review comments Fixes #10620
Thanks again for the review, @yaauie! |
Changes to Java plugins for GA include:
codec.encode()
method was changed to make the codec API easier to use correctly in pipelines with multiple concurrent workers.pipeline.plugin_classloaders
flag, each Java plugin will be loaded with its own parent-last classloader. All dependencies for the Java plugin, with the exception of any classes inorg.logstash.*
orco.elastic.logstash.*
packages, will be loaded first from the plugin's jar file delegating to the main Logstash classloader only if the dependency is not found within the plugin's jar. This allows Java plugins to use dependencies that might clash with the dependencies for other Java plugins or Logstash core itself.gem
task will bootstrap all JRuby dependencies, automatically generateGemfile
and thegemspec
file for the plugin as well as the two "glue" Ruby source files for triggering the loading of the Java class files during Logstash startup, and then invoke the necessary commands to create the gem file itself. Thegem
task also performs a number of validation checks to proactively identify common problems with the packaging of Java plugins. Theclean
task will remove all of those generated artifacts.eps
option to generate events at a given event-per-second rate for situations where as-fast-as-possible event generation is too much.jdots
codec that mirrors the Rubydots
codec.sink
output that discards any events received. Analogous to the Rubynull
plugin though much faster.