Commit Graph

314 Commits

Author SHA1 Message Date
Przemyslaw Gomulka 71e05838a6
[Rest Api Compatibility] Enable tests after types and cat api fixed (#75179)
Some tests are fixed after typed api is available with compatible api.
Also cat api returning text fixed some tests
relates #51816
2021-07-14 08:37:38 +02:00
Felix Barnsteiner 0a8f725647
Support for wildcards and override option for dot_expander processor (#74601) 2021-07-08 14:39:27 +02:00
Felix Barnsteiner 404e9865b6
Json processor: add_to_root_conflict_strategy option (#74967) 2021-07-08 14:36:22 +02:00
Felix Barnsteiner 67fbc337ea
Json processor: allow duplicate keys (#74956) 2021-07-06 15:02:32 +02:00
bellengao 307b82c474
Fix ignore_missing takes no effect in Rename Ingest Processor (#74248) 2021-06-25 07:48:03 -05:00
bellengao 42c0be4c67
Add template snippets support for KV ingest processor (#73758) 2021-06-22 16:32:11 -05:00
Dan Hermann bad29e1bf4
Expose Community ID processor in Painless (#73963) 2021-06-17 14:29:46 -05:00
Dan Hermann 57846495e9
Expose URI parts processor in Painless (#73634) 2021-06-15 17:19:59 -05:00
Ryan Ernst 68817d7ca2
Rename o.e.common in libs/core to o.e.core (#73909)
When libs/core was created, several classes were moved from server's
o.e.common package, but they were not moved to a new package. Split
packages need to go away long term, so that Elasticsearch can even think
about modularization. This commit moves all the classes under o.e.common
in core to o.e.core.

relates #73784
2021-06-08 09:53:28 -07:00
Dan Hermann bb5fea160b
Refactor uri_parts processor so it can be exposed in Painless (#73344) 2021-05-28 08:41:20 -05:00
Dan Hermann 43bd3f273a
Javadocs for Painless processor methods (#72766) 2021-05-06 07:21:08 -05:00
Nhat Nguyen 46ada227dc
Expose dynamic_templates parameter in Ingest (#71716)
This change exposes the newly introduced parameter `dynamic_templates`
in ingest. This parameter can be set by a set processor or a script processor.

Relates #69948
2021-04-19 11:34:13 -04:00
Andrew Stucki c102566a64
Network direction processor supports dynamic internal networks specification (#68712) 2021-04-14 08:13:42 -05:00
Andrew Stucki f491af65c0
Registered domain processor (#67611) 2021-04-14 07:18:03 -05:00
Dan Hermann 502ff027a8
URI parts processor handles URLs containing spaces (#71559) 2021-04-13 07:35:37 -05:00
Jake Landis 279fde375e
Apply REST API compatibility testing for the :modules (#71137) 2021-04-02 11:20:54 -05:00
Jason Tedor a5a5278954
Remove legacy role settings (#71163)
This commit removes the previously deprecated legacy role
settings. These settings have been replaced by node.roles.
2021-04-01 19:31:55 -04:00
Dan Hermann 370ce5d516
Exclude invalid url-encoded strings from randomized tests (#71085) 2021-04-01 11:11:55 -05:00
Mark Vieira 6339691fe3
Consolidate REST API specifications and publish under Apache 2.0 license (#70036) 2021-03-26 16:20:14 -07:00
Dan Hermann eb7d8beb0c
Fix typo in validation for destination port (#70883) 2021-03-26 07:27:03 -05:00
Dan Hermann 1117915a9d
Remove obsolete BWC checks for ingest (#70779) 2021-03-24 07:23:21 -05:00
Dan Hermann 2be24f0bb7
MurmurHash3 support for fingerprint processor (#70632) 2021-03-23 08:17:29 -05:00
Dan Hermann 2c3f297090
Convert processor supports validation of IPv4/IPv6 addresses (#69989) 2021-03-18 01:19:14 -05:00
Dan Hermann 79689fd899
Fix failing SetProcessorTests.testCopyFromOtherField test (#70150) 2021-03-12 06:19:07 -06:00
Dan Hermann 32739ce2dc
Fix handling of non-integer port values in community_id processor (#70148) 2021-03-10 07:57:22 -06:00
Dan Hermann be917d4a09
Test for final pipelines when target index is changed (#69457) 2021-03-04 10:40:50 -06:00
Dan Hermann 0c7e9d891d
Mute failing SetProcessorTests.testCopyFromOtherField (#69877) 2021-03-03 08:18:05 -06:00
Dan Hermann 926dc4f65b
Set processor's copy_from should deep copy non-primitive mutable types (#69349) 2021-03-03 07:09:32 -06:00
Dan Hermann e52d60f848
Add missing tests for ingest processors (#69438) 2021-02-24 08:30:05 -06:00
Dan Hermann adf012b847
Consolidate ingest processors into single module (#69121) 2021-02-23 07:35:50 -06:00
Mark Vieira a92a647b9f Update sources with new SSPL+Elastic-2.0 license headers
As per the new licensing change for Elasticsearch and Kibana this commit
moves existing Apache 2.0 licensed source code to the new dual license
SSPL+Elastic license 2.0. In addition, existing x-pack code now uses
the new version 2.0 of the Elastic license. Full changes include:

 - Updating LICENSE and NOTICE files throughout the code base, as well
   as those packaged in our published artifacts
 - Update IDE integration to now use the new license header on newly
   created source files
 - Remove references to the "OSS" distribution from our documentation
 - Update build time verification checks to no longer allow Apache 2.0
   license header in Elasticsearch source code
 - Replace all existing Apache 2.0 license headers for non-xpack code
   with updated header (vendored code with Apache 2.0 headers obviously
   remains the same).
 - Replace all Elastic license 1.0 headers with new 2.0 header in xpack.
2021-02-02 16:10:53 -08:00
Nik Everett 419ce10989
Add grok and dissect methods to runtime fields (#68088)
This adds a `grok` and a `dissect` method to runtime fields which
returns a `Matcher` style object you can use to get the matched
patterns. A fairly simple script to extract the "verb" from an apache
log line with `grok` would look like this:
```
String verb = grok('%{COMMONAPACHELOG}').extract(doc["message"].value)?.verb;
if (verb != null) {
  emit(verb);
}
```

And `dissect` would look like:
```
String verb = dissect('%{clientip} %{ident} %{auth} [%{@timestamp}] "%{verb} %{request} HTTP/%{httpversion}" %{status} %{size}').extract(doc["message"].value)?.verb;
if (verb != null) {
  emit(verb);
}
```

We'll work later to get it down to a clean looking one liner, but for
now, this'll do.

The `grok` and `dissect` methods are special in that they only run at
script compile time. You can't pass non-constants to them. They'll
produce compile errors if you send in a bad pattern. This is nice
because they can be expensive to "compile" and there are many other
optimizations we can make when the patterns are available up front.

Closes #67825
2021-02-01 14:16:01 -05:00
Rory Hunter ad1f876daa
Replace NOT operator with explicit `false` check (#67817)
We have an in-house rule to compare explicitly against `false` instead
of using the logical not operator (`!`). However, this hasn't
historically been enforced, meaning that there are many violations in
the source at present.

We now have a Checkstyle rule that can detect these cases, but before we
can turn it on, we need to fix the existing violations. This is being
done over a series of PRs, since there are a lot to fix.
2021-01-26 14:47:09 +00:00
Dan Hermann b330493a4b
Rename mime_type configuration option to media_type (#67860) 2021-01-25 11:29:12 -06:00
Dan Hermann eddab39e2f
Configurable MIME type for mustache template encoding on set processor (#65314) 2021-01-07 07:40:57 -06:00
Przemko Robakowski e1c6cbced7
Fix whitespace as a separator in CSV processor (#67045)
This change fixes problem when using space or tab as a separator in CSV processor - we check if current character is separator before we check if it is whitespace.

This also improves tests to always check all combinations of separators and quotes.

Closes #67013
2021-01-05 22:19:31 +01:00
Przemyslaw Gomulka 8f74f18257
Fix ingest java week based year defaulting (#65717)
If year, year of era, or weekbased year is not specified ingest Java
date processor is defaulting year to current year.
However the current implementation has mistaken weekBasedYear field with
weekOfWeekBasedYear. This has lead to incorrect defaulting.

relates #63458
2020-12-28 10:49:31 +01:00
Henning Andersen 8753149c3b
Enhance byte-size setting validation (#65363)
When a byte-size setting validation fails, the name of the setting is
now included in the message.

Relates #64428
2020-11-23 18:55:04 +01:00
Rene Groeschke 810e7ff6b0
Move tasks in build scripts to task avoidance api (#64046)
- Some trivial cleanup on build scripts
- Change task referencing in build scripts to use task avoidance api
where replacement is trivial.
2020-11-12 12:04:15 +01:00
bellengao b17ce85f13
Add copy_from parameter for set ingest processor (#63540) 2020-11-02 10:40:05 -06:00
Dan Hermann a644ba1ed6
Handle error conditions when simulating ingest pipelines with verbosity enabled (#63327) 2020-10-07 14:11:49 -05:00
Dan Hermann 55ba9c7e94
Fix failure in AppendProcessorTests.testAppendingToListWithDuplicatesDisallowed (#62842) 2020-09-25 07:57:18 -05:00
Julie Tibshirani 755f9acc6e Mute AppendProcessorTests.testAppendingToListWithDuplicatesDisallowed. 2020-09-23 11:32:47 -07:00
Przemko Robakowski d6d3e2be69
Make for each processor resistant to field modification (#62791)
This change provides consistent view of field that foreach processor is iterating over. That prevents it to go into infinite loop and put great pressure on the cluster.

Closes #62790
2020-09-23 09:39:29 +02:00
Nik Everett 152ee3aca4
Raname grok's built-in patterns (#62735)
This reworks the code around grok's built-in patterns to name things
more like the rest of the code. Its not a big deal, but I'm just more
used to having `public static final` constants in SHOUTING_SNAKE_CASE.
2020-09-22 09:31:20 -04:00
Dan Hermann 4da86ee201
Fix failure in AppendProcessorTests.testAppendingUniqueValueToScalar (#62453) 2020-09-17 11:59:54 -05:00
Dan Hermann 03d0e191c6
Fix failure in AppendProcessorTests.testAppendingToListWithDuplicatesDisallowed (#62385) 2020-09-16 08:04:20 -05:00
Dan Hermann 2d8b7a9e91
Allow_duplicates option for append processor (#61916) 2020-09-11 08:17:58 -05:00
Dan Hermann b8429dfd6e
Adjust BWC after backport of #61671 (#62170) 2020-09-09 10:00:28 -05:00
Dan Hermann 9dcab76427
Preserve grok pattern ordering and add sort option (#61671) 2020-09-08 07:10:27 -05:00