logstash-core 2.0.1.snapshot1-java → 2.1.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/logstash/agent.rb +21 -6
- data/lib/logstash/config/mixin.rb +0 -6
- data/lib/logstash/event.rb +1 -1
- data/lib/logstash/filters/base.rb +1 -2
- data/lib/logstash/inputs/base.rb +0 -5
- data/lib/logstash/outputs/base.rb +7 -5
- data/lib/logstash/pipeline.rb +85 -15
- data/lib/logstash/plugin.rb +5 -0
- data/lib/logstash/shutdown_controller.rb +127 -0
- data/lib/logstash/util.rb +35 -0
- data/lib/logstash/util/defaults_printer.rb +1 -1
- data/lib/logstash/util/worker_threads_default_printer.rb +14 -2
- data/lib/logstash/version.rb +1 -1
- data/locales/en.yml +5 -0
- data/logstash-core.gemspec +2 -1
- data/spec/core/event_spec.rb +19 -0
- data/spec/core/pipeline_spec.rb +113 -7
- data/spec/core/shutdown_controller_spec.rb +107 -0
- data/spec/license_spec.rb +1 -0
- data/spec/plugin_manager/install_spec.rb +28 -0
- data/spec/plugin_manager/update_spec.rb +39 -0
- data/spec/plugin_manager/util_spec.rb +71 -0
- data/spec/util/compress_spec.rb +121 -0
- data/spec/util/defaults_printer_spec.rb +3 -2
- data/spec/util/worker_threads_default_printer_spec.rb +30 -11
- metadata +76 -54
- data/lib/logstash/util/reporter.rb +0 -28
- data/spec/pluginmanager/util_spec.rb +0 -42
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
class InflightEventsReporter
|
|
3
|
-
def self.logger=(logger)
|
|
4
|
-
@logger = logger
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
def self.start(input_to_filter, filter_to_output, outputs)
|
|
8
|
-
Thread.new do
|
|
9
|
-
loop do
|
|
10
|
-
sleep 5
|
|
11
|
-
report(input_to_filter, filter_to_output, outputs)
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def self.report(input_to_filter, filter_to_output, outputs)
|
|
17
|
-
report = {
|
|
18
|
-
"input_to_filter" => input_to_filter.size,
|
|
19
|
-
"filter_to_output" => filter_to_output.size,
|
|
20
|
-
"outputs" => []
|
|
21
|
-
}
|
|
22
|
-
outputs.each do |output|
|
|
23
|
-
next unless output.worker_queue && output.worker_queue.size > 0
|
|
24
|
-
report["outputs"] << [output.inspect, output.worker_queue.size]
|
|
25
|
-
end
|
|
26
|
-
@logger.warn ["INFLIGHT_EVENTS_REPORT", Time.now.iso8601, report]
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
require "spec_helper"
|
|
3
|
-
require "pluginmanager/util"
|
|
4
|
-
require "gems"
|
|
5
|
-
|
|
6
|
-
describe LogStash::PluginManager do
|
|
7
|
-
|
|
8
|
-
let(:plugin_name) { "logstash-output-elasticsearch" }
|
|
9
|
-
|
|
10
|
-
let(:version_data) do
|
|
11
|
-
[ { "authors"=>"Elastic", "built_at"=>"2015-08-11T00:00:00.000Z", "description"=>"Output events to elasticsearch",
|
|
12
|
-
"downloads_count"=>1638, "metadata"=>{"logstash_group"=>"output", "logstash_plugin"=>"true"}, "number"=>"2.0.0.pre",
|
|
13
|
-
"summary"=>"Logstash Output to Elasticsearch", "platform"=>"java", "ruby_version"=>">= 0", "prerelease"=>true,
|
|
14
|
-
"licenses"=>["apache-2.0"], "requirements"=>[], "sha"=>"194b27099c13605a882a3669e2363fdecccaab1de48dd44b0cda648dd5516799"},
|
|
15
|
-
{ "authors"=>"Elastic", "built_at"=>"2015-08-10T00:00:00.000Z", "description"=>"Output events to elasticsearch",
|
|
16
|
-
"downloads_count"=>1638, "metadata"=>{"logstash_group"=>"output", "logstash_plugin"=>"true"}, "number"=>"1.0.7",
|
|
17
|
-
"summary"=>"Logstash Output to Elasticsearch", "platform"=>"java", "ruby_version"=>">= 0", "prerelease"=>false,
|
|
18
|
-
"licenses"=>["apache-2.0"], "requirements"=>[], "sha"=>"194b27099c13605a882a3669e2363fdecccaab1de48dd44b0cda648dd5516799"},
|
|
19
|
-
{ "authors"=>"Elastic", "built_at"=>"2015-08-09T00:00:00.000Z", "description"=>"Output events to elasticsearch",
|
|
20
|
-
"downloads_count"=>1638, "metadata"=>{"logstash_group"=>"output", "logstash_plugin"=>"true"}, "number"=>"1.0.4",
|
|
21
|
-
"summary"=>"Logstash Output to Elasticsearch", "platform"=>"java", "ruby_version"=>">= 0", "prerelease"=>false,
|
|
22
|
-
"licenses"=>["apache-2.0"], "requirements"=>[], "sha"=>"194b27099c13605a882a3669e2363fdecccaab1de48dd44b0cda648dd5516799"} ]
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
before(:each) do
|
|
26
|
-
allow(Gems).to receive(:versions).with(plugin_name).and_return(version_data)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
context "fetch plugin info" do
|
|
30
|
-
|
|
31
|
-
it "should search for the last version infomation non prerelease" do
|
|
32
|
-
version_info = LogStash::PluginManager.fetch_latest_version_info(plugin_name)
|
|
33
|
-
expect(version_info["number"]).to eq("1.0.7")
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
it "should search for the last version infomation with prerelease" do
|
|
38
|
-
version_info = LogStash::PluginManager.fetch_latest_version_info(plugin_name, :pre => true)
|
|
39
|
-
expect(version_info["number"]).to eq("2.0.0.pre")
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|