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

Remove ruby execution engine #12517

Merged
merged 3 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docker/data/logstash/env2yaml/env2yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func normalizeSetting(setting string) (string, error) {
"pipeline.batch.size",
"pipeline.batch.delay",
"pipeline.unsafe_shutdown",
"pipeline.java_execution",
"pipeline.ecs_compatibility",
"pipeline.plugin_classloaders",
"path.config",
Expand Down
2 changes: 0 additions & 2 deletions docs/static/java-codec.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ To test the plugin, start Logstash with:
echo "foo,bar" | bin/logstash -e 'input { java_stdin { codec => java_codec_example } }'
-----

NOTE: The Java execution engine, the default execution engine since Logstash 7.0, is required
as Java plugins are not supported in the Ruby execution engine.

The expected Logstash output (excluding initialization) with the configuration above is:

Expand Down
2 changes: 0 additions & 2 deletions docs/static/java-filter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ Start Logstash with:
bin/logstash -f /path/to/java_filter.conf
-----

NOTE: The Java execution engine, the default execution engine since Logstash 7.0, is required
as Java plugins are not supported in the Ruby execution engine.

The expected Logstash output (excluding initialization) with the configuration
above is:
Expand Down
2 changes: 0 additions & 2 deletions docs/static/java-input.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,6 @@ Start {ls} with:
bin/logstash -f /path/to/java_input.conf
-----

NOTE: The Java execution engine, the default execution engine since Logstash 7.0, is required
as Java plugins are not supported in the Ruby execution engine.

The expected Logstash output (excluding initialization) with the configuration above is:

Expand Down
2 changes: 0 additions & 2 deletions docs/static/java-output.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ Logstash should then be started with:
bin/logstash -f /path/to/java_output.conf
-----

NOTE: The Java execution engine, the default execution engine since Logstash 7.0, is required
as Java plugins are not supported in the Ruby execution engine.

The expected Logstash output (excluding initialization) with the configuration
above is:
Expand Down
4 changes: 0 additions & 4 deletions docs/static/running-logstash-command-line.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ With this command, Logstash concatenates three config files, `/tmp/one`, `/tmp/t
If you wish to use both defaults, please use the empty string for the `-e` flag.
The default is nil.

*`--java-execution`*::
Copy link
Member

Choose a reason for hiding this comment

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

Latergram:

I think we can do to make this transition easier for our users, especially for those who opt for explicit configuration or who control their configuration with environment variables.

  • 7.x: the false value for --java-execution or java.execution is deprecated. We emit a deprecation log that REE is deprecated and will be removed in "a future major release of Logstash". To solve this deprecation warning, the user can either remove the flag or set its value to true.
  • 8.x: the --java-execution or java.execution option itself is deprecated, and only accepts the true value. When this is specified, we emit a deprecation log about the option being removed in "a future major release of Logstash"

The primary goal that this path accomplishes is that explicit configuration from Logstash 7.$last that contains no deprecations works without modification in 8.0.0. It allows our users to be explicit in their configuration of 7.x and does not require an intermediate step where they are required to remove settings from their config that are meaningful in Logstash 7 prior to upgrading to Logstash 8.

The other transition option is to fast-track the removal of the setting, but I think that may be less clear to the user.

  • 7.x: the --java-execution or java.execution option itself is deprecated.
    • When this option is specified as true, we emit a deprecation log indicating that it is not needed and the option will be removed in "a future major release of Logstash".
    • When the option is specified as false, we emit a different deprecation log indicating that both REE and the option will be removed in "a future major release of Logstash".

Note that the fast-track will make environment variable control of the config file not possible.

Specify `false` for this option to revert to the legacy Ruby execution engine instead
of the default Java execution engine.

*`--plugin-classloaders`*::
(Beta) Load Java plugins in independent classloaders to isolate their dependencies.

Expand Down
4 changes: 0 additions & 4 deletions docs/static/settings-file.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ The `logstash.yml` file includes the following settings.
| The ID of the pipeline.
| `main`

| `pipeline.java_execution`
| Use the Java execution engine.
| true

| `pipeline.workers`
| The number of workers that will, in parallel, execute the filter and output
stages of the pipeline. This setting uses the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "logstash/devutils/rspec/spec_helper"
require "logstash/outputs/<%= plugin_name %>"
require "logstash/codecs/plain"
require "logstash/event"


describe LogStash::Outputs::<%= classify(plugin_name) %> do
let(:sample_event) { LogStash::Event.new }
Expand Down
1 change: 0 additions & 1 deletion logstash-core/lib/logstash/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
require "logstash/config/cpu_core_strategy"
require "logstash/instrument/collector"
require "logstash/instrument/periodic_pollers"
require "logstash/pipeline"
require "logstash/webserver"
require "logstash/config/source_loader"
require "logstash/config/pipeline_config"
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/codecs/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

require "logstash/event"

require "logstash/plugin"

# This is the base class for logstash codecs.
Expand Down
1 change: 0 additions & 1 deletion logstash-core/lib/logstash/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module Environment
Setting::PositiveInteger.new("pipeline.batch.size", 125),
Setting::Numeric.new("pipeline.batch.delay", 50), # in milliseconds
Setting::Boolean.new("pipeline.unsafe_shutdown", false),
Setting::Boolean.new("pipeline.java_execution", true),
Setting::Boolean.new("pipeline.reloadable", true),
Setting::Boolean.new("pipeline.plugin_classloaders", false),
Setting::Boolean.new("pipeline.separate_logs", false),
Expand Down
26 changes: 1 addition & 25 deletions logstash-core/lib/logstash/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,4 @@
# under the License.

# used only in the Ruby execution engine
module LogStash
class SignalEvent
def flush?; raise "abstract method"; end;
def shutdown?; raise "abstract method"; end;
end

class ShutdownEvent < SignalEvent
def flush?; false; end;
def shutdown?; true; end;
end

class FlushEvent < SignalEvent
def flush?; true; end;
def shutdown?; false; end;
end

class NoSignal < SignalEvent
def flush?; false; end;
def shutdown?; false; end;
end

FLUSH = FlushEvent.new
SHUTDOWN = ShutdownEvent.new
NO_SIGNAL = NoSignal.new
end
# for backward compatibility
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/filters/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

require "logstash/event"

require "logstash/plugin"
require "logstash/config/mixin"
require "logstash/util/decorators"
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/inputs/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

require "logstash/event"

require "logstash/plugin"
require "logstash/config/mixin"
require "logstash/codecs/base"
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/outputs/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

require "logstash/event"

require "logstash/plugin"
require "logstash/config/mixin"
require "concurrent/atomic/atomic_fixnum"
Expand Down
Loading