use rm_rf to delete dir and shutdown pipeline after run
avoid the use of rescue nil, bad practice
do not mock close as it prevents closing the file an prevents removing it on Windows
cleanup temporary files and relax file name check for Windows
fix paths handling for Windows
flag the read file string as UTF-8 which is what we expect
fix Windows issues
ignore load_average on windows
windows safe URI
cleanup and fix file handling for windows
wait for pipeline shutdown to complete
revert to original puts
cleanups
use environment for windows platform check
fix hash path
wait for pipeline thread to complete after shutdown
* Use IdentityHashMap since we intern all possible keys anyways and can look them up more efficiently than `String.intern()` from our PathCache
* Use the PathCache to never have to instantiate new `String` when converting a RubyHash
Fixes#8104
* Turn Enum into HashMap for direct lookup
* Use stateless Lambdas instead of named classes as converter functions for better performance
* Remove redundant instanceof checks by splitting existing converter functions between Java and Ruby version
* Use most restrictive instanceof check possible for Ruby converters for performance improvements
Fixes#8087
* add newlines to generated json
* Implement cloud.id and cloud.auth settings merge to module settings
* Fixes from review plus convert to using Password for any Module Setting
* Review changes
* update modules.asciidoc to include a section on Cloud
* Capitalize Id
* remove unnecessesary require lines
With IntelliJ 2017.02 the gradle output changed from 'build/classes' to 'out/production/classes'. See https://youtrack.jetbrains.com/issue/IDEA-175172 for additional information.
This PR changes the local developement behavior to prefer the classes build with IntelliJ (if they exist) over the classes built directly with gradle.
Fixes#8056
Remove LongGauge and DoubleGauge and Replace with NumberGauge
- This is an unecessary distiction for Gauges and can complicate the serialization. Double/Float should serialize with decimal precision, and Jackson handles this by default.
Add custom witness to match existing Ruby API, such that existing Ruby plugins should not need changes
Remove namespace from LazyDelegatingGauge
- It was only there for logging, but newer versions (not here) will completely remove the concept of namespace.
Part of #7788Fixes#8053
Fixes an issue where if the DLQ is actively being read and written to, the consumeBlock method would
write data to the position where the data was last read from, rather than written to, leading to
plugin crashes.
Fixes#8024
This change allows for the serialized output of the metrics to be consistent w/r/t the un-initialized values. Note - the code presented here is not the current code in use, rather it is the code staged, but unused to replace the metrics store / namespace implementation.
Fixes#7885 (for a future release)
Fixes#8009
This commit broke the plugin contract with plugins like xpack and caused many issues there. Reverted until it can be better handled.
This reverts commit 92cdbe2dbd.
Fixes#7995
Change DeadLetterQueueReader, so that if a missing segment file is
encountered at startup, the next valid entry will be used instead
Fixes#7433Fixes#7457
The role of Witness is to provide an API record state of what is happening inside of Logstash, and provide means to serialize the data for consumption (not included in the commit). The Witness is implemented by chaining methods with a singleton root. For example:
Witness.instance().pipeline("main").inputs("foo").events().in(1)
Can be used to express that for the foo input in the main pipeline, 1 new event has been seen.
Witnesses may also have a snitch method, which allows the witness to snitch (tell others) the discrete values of the metrics. A snitch method is basically the getter. For example:
Witness.instance().pipeline("main").inputs("foo").events().snitch().in()
Tells you you how many events have been witnessed for the foo input in the main pipeline. In practice this the snitch is really only used for testing, but may be useful as just a standard set/get type operations. Serialization to JSON (not included in this commit) is the primary means to get data out of a Witness.
Some workflows require that a Witness forgets what it saw, for example during a pipeline reload. In these cases the Witness may completely or partially forget the data they have seen. This is implemented with a forget method. For example:
Witness.instance().pipeline("main").inputs("foo").events().forget().all();
Fixes#7947
The fixes in this commit combine to fix#7855
Fixes 3 bugs:
seekToNextEventPosition:
handles the case where a null event is encountered during the search for a matching event
handle restoration of buffer position when the next event consumed goes across block
boundaries
seekToStartOfEventInBlock:
handles the case where the only event in a block is an 'end' event
Also:
Adds new RecordIOReaderTest, and moves tests over from RecordIOWriterTest that seem to fit
that better
Fixes#7948
* Add --setup phase for modules
Without the `--setup` flag, the index template for elasticsearch, and the index-pattern, saved searches, visualizations, and dashboards for Kibana will not be published.
fixes#7959
In this patch we unify the IDs reported by LIR with those generated using config_ast.rb
This is a temporary fix until LIR execution is built. It relies on the fact that currently both LIR and config_ast.rb only operate on a single concatenated string of configurations. In the future LIR will compile different files separately, then merge their IRs. For now, however, this solution will hold.
This change also exposes the :id attribute of FilterDelegator to bring it to parity with OutputDelegator and InputDelegator which is required for testing purposes.
Fixes#7930