Commit Graph

287 Commits

Author SHA1 Message Date
Hendrik Muhs 69fe13c9dc
[Transform] Transform optmize date histogram (#54068)
optimize transform for group_by on date_histogram by injecting an additional range query. This limits the number of search and index requests and avoids unnecessary updates. Only recent buckets get re-written.

fixes #54254
2020-03-26 21:38:17 +01:00
Mark Tozzi a90c1de874
Add ValuesSource Registry and associated logic (#54281)
* Remove ValuesSourceType argument to ValuesSourceAggregationBuilder (#48638)

* ValuesSourceRegistry Prototype (#48758)

* Remove generics from ValuesSource related classes (#49606)

* fix percentile aggregation tests (#50712)

* Basic thread safety for ValuesSourceRegistry (#50340)

* Remove target value type from ValuesSourceAggregationBuilder (#49943)

* Cleanup default values source type (#50992)

* CoreValuesSourceType no longer implements Writable (#51276)

* Remove genereics & hard coded ValuesSource references from Matrix Stats (#51131)

* Put values source types on fields (#51503)

* Remove VST Any (#51539)

* Rewire terms agg to use new VS registry (#51182)

Also adds some basic AggTestCases for untested code
paths (and boilerplate for future tests once the IT are
converted over)

* Wire Cardinality aggregation to work with the ValuesSourceRegistry (#51337)

* Wire Percentiles aggregator into new VS framework (#51639)

This required a bit of a refactor to percentiles itself.  Before,
the Builder would switch on the chosen algo to generate an
algo-specific factory.  This doesn't work (or at least, would be
difficult) in the new VS framework.

This refactor consolidates both factories together and introduces
a PercentilesConfig object to act as a standardized way to pass
algo-specific parameters through the factory.  This object
is then used when deciding which kind of aggregator to create

Note: CoreValuesSourceType.HISTOGRAM still lives in core, and will
be moved in a subsequent PR.

* Remove generics and target value type from MultiVSAB (#51647)

* fix checkstyle after merge (#52008)

* Plumb ValuesSourceRegistry through to QuerySearchContext (#51710)

* Convert RareTerms to new VS registry (#52166)

* Wire up Value Count (#52225)

* Wire up Max & Min aggregations (#52219)

* ValuesSource refactoring: Wire up Sum aggregation (#52571)

* ValuesSource refactoring: Wire up SigTerms aggregation (#52590)

* Soft immutability for VSConfig (#52729)

* Unmute testSupportedFieldTypes, fix Percentiles/Ranks/Terms tests (#52734)

Also fixes Percentiles which was incorrectly specified to only accept
numeric, but in fact also accepts Boolean and Date (because those are
numeric on master - thanks `testSupportedFieldTypes` for catching it!)

* VS refactoring: Wire up stats aggregation (#52891)

* ValuesSource refactoring: Wire up string_stats aggregation (#52875)

* VS refactoring: Wire up median (MAD) aggregation (#52945)

* fix valuesourcetype issue with constant_keyword field (#53041)

this commit implements `getValuesSourceType` for
the ConstantKeyword field type.

master was merged into feature/extensible-values-source
introducing a new field type that was not implementing
`getValuesSourceType`.

* ValuesSource refactoring: Wire up Avg aggregation (#52752)

* Wire PercentileRanks aggregator into new VS framework  (#51693)

* Add a VSConfig resolver for aggregations not using the registry (#53038)

* Vs refactor wire up ranges and date ranges (#52918)

* Wire up geo_bounds aggregation to ValuesSourceRegistry (#53034)

This commit updates the geo_bounds aggregation to depend
on registering itself in the ValuesSourceRegistry

relates #42949.

* VS refactoring: convert Boxplot to new registry (#53132)

* Wire-up geotile_grid and geohash_grid to ValuesSourceRegistry (#53037)

This commit updates the geo*_grid aggregations to depend
on registering itself in the ValuesSourceRegistry

relates to the values-source refactoring meta issue #42949.

* Wire-up geo_centroid agg to ValuesSourceRegistry (#53040)

This commit updates the geo_centroid aggregation to depend
on registering itself in the ValuesSourceRegistry.

relates to the values-source refactoring meta issue #42949.

* Fix type tests for Missing aggregation (#53501)

* ValuesSource Refactor: move histo VSType into XPack module (#53298)

- Introduces a new API (`getBareAggregatorRegistrar()`) which allows plugins to register aggregations against existing agg definitions defined in Core.
- This moves the histogram VSType over to XPack where it belongs. `getHistogramValues()` still remains as a Core concept
- Moves the histo-specific bits over to xpack (e.g. the actual aggregator logic). This requires extra boilerplate since we need to create a new "Analytics" Percentile/Rank aggregators to deal with the histo field. Doubly-so since percentiles/ranks are extra boiler-plate'y... should be much lighter for other aggs

* Wire up DateHistogram to the ValuesSourceRegistry (#53484)

* Vs refactor parser cleanup (#53198)

Co-authored-by: Zachary Tong <polyfractal@elastic.co>
Co-authored-by: Zachary Tong <zach@elastic.co>
Co-authored-by: Christos Soulios <1561376+csoulios@users.noreply.github.com>
Co-authored-by: Tal Levy <JubBoy333@gmail.com>
2020-03-26 15:01:07 -04:00
Benjamin Trent 202b4fb490
[Transform] Remove node.attr.transform.remote_connect and use new remote cluster client node role (#54217)
With the addition of a formal role for nodes indicating remote cluster connection, the transform specific attribute `node.attr.transform.remote_connect` is no longer necessary.

closes https://github.com/elastic/elasticsearch/issues/54179
2020-03-25 15:05:08 -04:00
Hendrik Muhs 995bed264d
[Transform] fix transform failure case for percentiles and spa… (#54202)
index null if percentiles could not be calculated due to sparse data

fixes #54201
2020-03-25 19:27:59 +01:00
Jason Tedor 1fc0432b24
Introduce formal role for remote cluster client (#53924)
This commit introduce a formal role for identifying nodes that are
capable of making connections to remote clusters.
2020-03-24 19:21:56 -04:00
Hendrik Muhs da9273ab7b
[Transform][Rollup] add processing stats to record the time sp… (#53770)
add 2 additional stats: processing time and processing total which capture the
time spent for processing results and how often it ran. The 2 new stats
correspond to the existing indexing and search stats. Together with indexing
and search this now allows the user to see the full picture, all 3 stages.
2020-03-23 20:32:19 +01:00
Ryan Ernst 8264bdd36a
Revert "Introduce system index APIs for Kibana (#52385)" (#53912)
This reverts commit 4c0e8f12cb.

It should be re-added once #53909 is addressed.
2020-03-23 09:11:16 -07:00
Gordon Brown 6332c40a2c
Transition Transforms to using hidden indices for notifcations index (#53773)
This commit changes the Transforms notifications index to be hidden
index, with a hidden alias.

This commit also removes the temporary hack in
MetaDataCreateIndexService that prevents deprecation warnings for known
dot-prefixed index names which are not hidden/system indices, as this
was the last index pattern to need that hack.
2020-03-20 13:59:13 -06:00
Benjamin Trent 3dae2e97d8
[Transform] renamed _cat/transform to _cat/transforms (#53743)
renaming _cat/transform to  _cat/transforms for uniformity with the other _cat apis.
2020-03-18 18:23:01 -04:00
zacharymorn 110ff6cdd1
Create GET _cat/transforms API Issue (#53643)
Adds new` _cat/transform` and `_cat/transform/{transform_id}` endpoints.
2020-03-18 09:16:26 -04:00
Hendrik Muhs fa6d197e7b
[Transform] enhance the output of preview to return full desti… (#53572)
changes the output format of preview regarding deduced mappings and enhances
it to return all the details about auto-index creation. This allows the user
to customize the index creation. Using HLRC you can create a index request
from the output of the response.
2020-03-17 21:05:50 +01:00
Hendrik Muhs 8c0f90ed55
[Transform] data nanos/date histogram IT (#53654)
add an integration test for date nanos in combination with date_histogram
2020-03-17 20:57:54 +01:00
Hendrik Muhs 68a698f9ae
[Transform] add transform discovery node role (#53616)
Enhancement of #52712: Add a discovery node role using the letter t for transform.

Fixes #53156
2020-03-17 11:34:22 +01:00
Hendrik Muhs e4f45db4c2
[Transform] add support for script in group_by (#53167)
add the possibility to base the group_by on the output of a script.

closes #43152
2020-03-09 09:59:34 +01:00
Alan Woodward a76df695f9
IndexTemplateMetaData.mappings() should return a single object (#52961)
Currently it returns a map, but that map can only ever hold one set of mappings so
it makes sense to change the signature here.

Relates to #41059
2020-03-03 10:48:13 +00:00
Hendrik Muhs 9b262dce9e
[Transform] fix sporadic race condition in TransformUsageIT (#52946)
relax the test for trigger count

fixes #52931
2020-03-03 10:01:04 +01:00
Hendrik Muhs 6c86b60410
[Transform] re-enable BWC and cleanup after backport (#53012)
re-enable BWC tests and adapt code on master for BWC, remove code
no longer necessary

relates #52998
relates #53010
2020-03-03 08:39:00 +01:00
Jay Modi 4c0e8f12cb
Introduce system index APIs for Kibana (#52385)
This commit introduces a module for Kibana that exposes REST APIs that
will be used by Kibana for access to its system indices. These APIs are wrapped
versions of the existing REST endpoints. A new setting is also introduced since
the Kibana system indices' names are allowed to be changed by a user in case
multiple instances of Kibana use the same instance of Elasticsearch.

Additionally, the ThreadContext has been extended to indicate that the use of
system indices may be allowed in a request. This will be built upon in the future
for the protection of system indices.
2020-03-02 14:32:41 -07:00
Hendrik Muhs 2d7f4806f2
[Transform] fix test logic in transform tests (#53002)
fix test logic in transform tests, regression introduced in #52712
2020-03-02 13:32:26 +01:00
Hendrik Muhs 563d906a78
[Transform] implement node.transform to control where to run a transform (#52712)
implement transform node attributes to disable transform on certain nodes and test which nodes are allowed to do remote connections

closes #52200
closes #50033
closes #48734
2020-03-02 09:01:18 +01:00
Hendrik Muhs 6a5f78daab
[Transform] fix NPE in derive stats if shouldStopAtNextCheckpo… (#52940)
fixes a NPE in _stats in case shouldStopAtNextCheckpoint is set.
2020-03-02 08:02:26 +01:00
David Kyle c90d46e311
Unwrap cause from remote ActionTransportExceptions (#52842)
And log the cause
2020-02-27 09:10:51 +00:00
Hendrik Muhs 075fee249c
[Transform] add support for filter aggregation (#52483)
add support for filter aggregations, refactor code for sub-aggregation support in mapping
deduction

fixes #52151
2020-02-21 13:06:18 +01:00
Jay Modi 0d1e67dbbb
Single instance of the IndexNameExpressionResolver (#52596)
This commit modifies the codebase so that our production code uses a
single instance of the IndexNameExpressionResolver class. This change
is being made in preparation for allowing name expression resolution
to be augmented by a plugin.

In order to remove some instances of IndexNameExpressionResolver, the
single instance is added as a parameter of Plugin#createComponents and
PersistentTaskPlugin#getPersistentTasksExecutor.
2020-02-20 15:04:45 -07:00
Hendrik Muhs c222631eb4
forward audits to logs (#52394)
audit messages are stored in the notifications index, so audit information is lost for integration
tests. This change forwards audit messages to logs, so they can help to debug issues.

relates: #51627
2020-02-18 08:44:37 +01:00
Hendrik Muhs 48392b79d8
delete the transform to delete any docs which might have been written by the (#52360)
delete the transform to delete any docs which might have been written by the task after deleting
the index

fixes #51347
2020-02-16 11:16:54 +01:00
Yannick Welsch a9afdd7611
Remove fixed_auto_queue_size threadpool type (#52280)
* Remove fixed_auto_queue_size threadpool type

* Remove less

* compilation fix

* weaken assertion to accomodate tests that mock threadpool
2020-02-14 16:20:40 +01:00
Nik Everett 5b2266601b
Implement top_metrics agg (#51155)
The `top_metrics` agg is kind of like `top_hits` but it only works on
doc values so it *should* be faster.

At this point it is fairly limited in that it only supports a single,
numeric sort and a single, numeric metric. And it only fetches the "very
topest" document worth of metric. We plan to support returning a
configurable number of top metrics, requesting more than one metric and
more than one sort. And, eventually, non-numeric sorts and metrics. The
trick is doing those things fairly efficiently.

Co-Authored by: Zachary Tong <zach@elastic.co>
2020-02-14 07:13:52 -05:00
Jay Modi a11ccb83d4
Use List convenience methods in rest actions (#52286)
This commit replaces usages of older collection utility methods with
the JDK 9 convenience method `List.of()`.

Relates #51950
2020-02-12 15:11:22 -07:00
Jay Modi b9e2d161e3
Remove DeprecationLogger from route objects (#52278)
This commit removes the need for DeprecatedRoute and ReplacedRoute to
have an instance of a DeprecationLogger. Instead the RestController now
has a DeprecationLogger that will be used for all deprecated and
replaced route messages.

Relates #51950
2020-02-12 12:44:49 -07:00
Hendrik Muhs 34734ae15b
[Transform] provide exponential_avg* stats for batch transforms (#52041)
provide exponential_avg* stats for batch transforms, avoids confusion why those values are all 0
otherwise
2020-02-12 14:21:40 +01:00
Hendrik Muhs 6ace2ef9cc
[Transform] improve irrecoverable error detection - part 2 (#52003)
base error handling on rest status instead of listing individual exception types

relates to #51820
2020-02-12 14:14:36 +01:00
Hendrik Muhs 7edb03b346
[Transform] maintain a list of unsupported aggregations in transforms (#52190)
add a list of unsupported aggs in transforms and create a test that fails if a new aggregation is
added. Limitation: works only if a new agg is added to either the core or a known plugin
(Analytics, MatrixAggregation).
2020-02-11 17:33:33 +01:00
Jay Modi 627d853f18 RestHandlers declare handled routes (#51950)
This commit changes how RestHandlers are registered with the
RestController so that a RestHandler no longer needs to register itself
with the RestController. Instead the RestHandler interface has new
methods which when called provide information about the routes
(method and path combinations) that are handled by the handler
including any deprecated and/or replaced combinations.

This change also makes the publication of RestHandlers safe since they
no longer publish a reference to themselves within their constructors.

Closes #51622

Co-authored-by: Jason Tedor <jason@tedor.me>
2020-02-09 21:35:39 -07:00
Hendrik Muhs 73305e687e
fallback to float if source type is scaled_float for mapping deduction (#51990)
fallback to float if source type is scaled_float for mapping deduction of min/max aggregation

fixes #51780
2020-02-06 17:26:43 +01:00
Hendrik Muhs 406f18f5a0
[Transform] add support for percentile aggs (#51808)
make transform ready for multi value aggregations and add support for percentile

fixes #51663
2020-02-04 12:01:30 +01:00
Hendrik Muhs 12a1f44eb7
[Transform] improve irrecoverable error detection
treat resource not found and illegal argument exceptions as irrecoverable error

relates #50135
2020-02-04 10:35:31 +01:00
Ryan Ernst bf317e8c4e
Remove comparison to true for booleans (#51723)
While we use `== false` as a more visible form of boolean negation
(instead of `!`), the true case is implied and the true value does not
need to explicitly checked. This commit converts cases that have slipped
into the code checking for `== true`.
2020-01-31 16:34:27 -08:00
Hendrik Muhs 40f0a26fbf
[Transform] Fix stats can return old state information if security is enabled (#51732)
do index refresh of the internal transform index with the system user
instead of using the calling user which does not have sufficient rights
if security is enabled

fixes #51728
2020-01-31 13:44:17 +01:00
Gordon Brown 588361fe4c
Use exclusions list instead of fake system indices (#51586)
This commit switches the strategy for managing dot-prefixed indices that
should be hidden indices from using "fake" system indices to an explicit
exclusions list that must be updated when those indices are converted to
hidden indices.
2020-01-29 10:06:27 -07:00
Hendrik Muhs 7f37ac8b1d
[Transform] fix TransformRobustnessIT intermittent test failures part 2 (#51523)
add wait for completion in transform robustness test to avoid occasional test failures during cleanup

fixes #51347
2020-01-28 13:36:23 +01:00
Hendrik Muhs 43647723cf
add an integration test using date_nanos as timestamp (#51477)
add a test for using date_nanos as timestamp field in a continuous transform
2020-01-28 10:09:49 +01:00
Hendrik Muhs 4456c0c028
audit index creation after it the index has been created (#51479)
moves audit message for index creation after the index has been successfully created. This has
been confusing for a user where index creation failed but audit reported index creation.
2020-01-28 10:01:01 +01:00
Hendrik Muhs 4d11e1ad24
[Transform] avoid mapping problems with index templates (#51368)
insert explict mappings for objects in nested output to avoid clashes with index templates

fixes #51321
2020-01-28 09:12:10 +01:00
Gordon Brown 44f5ed6fd9
Deprecate creation of dot-prefixed index names except for hidden and system indices (#49959)
This commit deprecates the creation of dot-prefixed index names (e.g.
.watches) unless they are either 1) a hidden index, or 2) registered by
a plugin that extends SystemIndexPlugin. This is the first step
towards more thorough protections for system indices.

This commit also modifies several plugins which use dot-prefixed indices
to register indices they own as system indices, and adds a plugin to
register .tasks as a system index.
2020-01-27 17:18:26 -07:00
Hendrik Muhs c1b6fbfe69
[Transform] refactor naming leftovers and apply code formating (#51465)
refactor renaming leftovers: "data frame transform" to "transforms", touch only internals (variable
names, non-public API's, doc strings, ...) and apply code-formatting (spotless). No logical changes.
2020-01-27 10:51:04 +01:00
Hendrik Muhs da450f1dc5
fix TransformRobustnessIT intermittent test failures
ensure the cluster is not in some intermediate state when cleaning up.

fixes #51347
2020-01-24 15:18:19 +01:00
Hendrik Muhs 589e0331d2
[Transform] Handle permanent bulk indexing errors (#51307)
check bulk indexing error for permanent problems and ensure the state goes into failed instead of
retry. Corrects the stats API to show the real error and avoids excessive audit logging.

fixes #50122
2020-01-23 16:16:27 +01:00
Alan Woodward 6573de2ab0
PutIndexTemplateRequest contains a single mapping (#50899)
New index templates can only contain a single mapping, as we no longer support
multiple types. This commit changes the internal classes used to represent a
PutIndexTemplateRequest from holding a map of types to mappings, to instead
holding a single mapping string.

Relates to #41059
2020-01-20 15:05:52 +00:00
Hendrik Muhs c9dc55c332
check custom meta data to avoid NPE (#51163)
check custom meta data to avoid NPE, fixes a problem introduced in #51072

fixes #51153
2020-01-20 13:52:19 +01:00
Hendrik Muhs 605620ca68
[Transform] Improve force stop robustness in case of an error (#51072)
If a transform config got lost (e.g. because the internal index disappeared) tasks could not be
stopped using transform API. This change makes it possible to stop transforms without a config,
meaning to remove the background task. In order to do so force must be set to true.
2020-01-17 07:40:02 +01:00
Hendrik Muhs 360f954816
[Transform] correctly retrieve checkpoints from remote indices (#50903)
uses remote client(s) to correctly retrieve index checkpoints from remote clusters
2020-01-14 13:21:52 +01:00
Dimitris Athanasiou 2d59c84f3f
[ML] Reuse SourceDestValidator for data frame analytics (#50841)
This commit removes validation logic of source and dest indices
for data frame analytics and replaces it with using the common
`SourceDestValidator` class which is already used by transforms.
This way the validations and their messages become consistent
while we reduce code.

This means that where these validations fail the error messages
will be slightly different for data frame analytics.
2020-01-10 13:17:38 +02:00
Nik Everett 191a7115ba
Drop "funny" functions building parsers (#50715)
Replaces the "funny"
`Function<String, ConstructingObjectParser<T, Void>>` with a much
simpler `ConstructingObjectParser<T, String>`. This makes pretty much
all of our object parsers static.
2020-01-09 13:32:46 -05:00
Benjamin Trent 207525bb70
[Transform] fail to start/put on missing pipeline (#50701)
If a pipeline referenced by a transform does not exist, we should not allow the transform to be created. 

We do allow the pipeline existence check to be skipped with defer_validations, but if the pipeline still does not exist on `_start`, the pipeline will fail to start.

relates:  #50135
2020-01-09 09:31:44 -05:00
Alan Woodward a59b065091
Remove type parameter from `CreateIndexRequest.mapping(type, XContentBuilder)` (#50586)
This continues the removal of type parameters from CreateIndexRequest.mapping
methods started in #50419. Here the removed methods are almost entirely in test
code, with the exception of a change to TransformIndex in the transform plugin.

Relates to #41059
2020-01-08 09:18:31 +00:00
Armin Braun 77fd51f30b
Remove some Dead Code from Discovery Plugins (#50592)
None of this stuff is used.
2020-01-03 13:25:28 +01:00
Hendrik Muhs 05996bf3cd
[Transform] improve checkpoint reporting (#50369)
fixes empty checkpoints, re-factors checkpoint info creation (moves builder) and always reports 
last change detection

relates #43201
relates #50018
2019-12-20 08:28:16 +01:00
Hendrik Muhs f9bcd6c36b
[Transform] refactor source and dest validation to support CCS (#50018)
refactors source and dest validation, adds support for CCS, makes resolve work like reindex/search, allow aliased dest index with a single write index.

fixes #49988
fixes #49851
relates #43201
2019-12-20 08:27:33 +01:00
Hendrik Muhs f99f088985
[Transform] add actual timeout in message (#50140)
add the timeout to the message if stopping a transform times out
2019-12-13 08:09:25 +01:00
Hendrik Muhs f68c24de71
[Transform] automatic deletion of old checkpoints (#49496)
add automatic deletion of old checkpoints based on count and time
2019-12-04 07:07:09 +01:00
Hendrik Muhs ace25a9389
[Transform] Fix possible audit logging disappearance after rolling upgrade (#49731)
ensure audit index template is available during a rolling upgrade before a
transform task can write to it.

fixes #49730
2019-12-02 15:17:18 +01:00
Hendrik Muhs 3a2339f7c6
[Transform] add debug log for configuration index (#49484)
add debug log for transform creation and disallow partial results for retrieval
2019-11-25 09:42:43 +01:00
Hendrik Muhs fe3b002b1d
reenable warning checks in pivot tests (#49436)
reenable warning checks(deprecation warnings) in pivot tests
2019-11-22 08:46:46 +01:00
Hendrik Muhs 2981578ca9
[Transform] Transform fix force stop race condition (#49249)
fix force stopping transform if indexer state hasn't been written and/or is set to STOPPED. In certain situations the transform could not be stopped, which means the task could not be removed. Introduces improved abstraction in order to better test state handling in future.

fixes #48957
2019-11-21 09:08:31 +01:00
Alan Woodward 4b812cec35
Internal CreateIndexRequest holds a single mapping (#48996)
Even though indexes can only have a single mapping, the internal
CreateIndexRequest objects return their mappings as a map keyed by
type.

This commit changes CreateIndexRequest.mappings() to return a simple
String, and alters the various mapping constructor methods to ensure that
this String is always in the correct format: an outer map keyed by _doc,
then the mappings with no further type information. This is already handled
correctly on the REST layer.

Note that it does not make any further changes to CreateIndexRequestBuilder,
so as to limit the size of this changeset.
2019-11-18 10:52:26 +00:00
Hendrik Muhs 21b34da46e
[Transform] improve error handling of script errors (#48887)
improve error handling for script errors, treating it as irrecoverable errors which puts the task
immediately into failed state, also improves the error extraction to properly report the script 
error.

fixes #48467
2019-11-18 09:57:56 +01:00
Rory Hunter 3a3e5f6176
Apply 2-space indent to all gradle scripts (#48849)
Closes #48724. Update `.editorconfig` to make the Java settings the default
for all files, and then apply a 2-space indent to all `*.gradle` files.
Then reformat all the files.
2019-11-13 10:14:04 +00:00
Hendrik Muhs 56731d8fa7
[Transform] decouple task and indexer (#48567)
decouple TransformTask and ClientTransformIndexer. Interaction between the 2 classes are now moved into a context class which holds shared information.

relates #45369
2019-11-01 14:01:11 +01:00
Benjamin Trent 451a5c0621
[ML][Transforms] add wait_for_checkpoint flag to stop (#47935)
Adds `wait_for_checkpoint` for `_stop` API.
2019-10-28 11:21:21 -04:00
Hendrik Muhs b3d9f0a789
[Transform] do not fail checkpoint creation due to global checkpoint mismatch (#48423)
Take the max if global checkpoints mismatch instead of throwing an exception. It turned out global
checkpoints can mismatch by design

fixes #48379
2019-10-24 12:18:51 +02:00
Hendrik Muhs ab2fa79eb5
[Transform] wait for deprecated index shards to get active (#47997)
wait for deprecated index shards to get active
2019-10-14 20:11:14 +02:00
Benjamin Trent 46a5164500
[ML][Transforms] signal listner early on stop failure (#47954) 2019-10-14 10:10:03 -04:00
Hendrik Muhs 5c3830db69
[Transform] Rename internal indexes for transform plugin (#47788)
rename internal indexes of transform plugin

- rename audit index and create an alias for accessing it, BWC: add an alias for old indexes to 
  keep them working, kibana UI will switch to use the read alias
- rename config index and provide BWC to read from old and new ones
2019-10-11 12:31:29 +02:00
Alan Woodward 566e1b7d33
Remove type field from DocWriteRequest and associated Response objects (#47671)
This commit removes the type field from index, update and delete requests, and their
associated responses.

Relates to #41059
2019-10-11 10:23:55 +01:00
Hendrik Muhs d680ca3b3c
[Transform] introduce new roles and deprecate old ones (#47780)
deprecate data_frame_transforms_{user,admin} roles and introduce transform_{user,admin} roles as replacement
2019-10-09 18:53:08 +02:00
Hendrik Muhs e9e121c9ce
[Transform] move root endpoint to _transform with BWC layer (#47127)
move the main endpoint to /_transform/ from /_data_frame/transforms/ with providing backwards compatibility and deprecation warnings
2019-10-07 16:21:51 +02:00
Alpar Torok ca54b442bf
Remove eclipse conditionals (#44075)
* Remove eclipse conditionals

We used to have some meta projects with a `-test` prefix because
historically eclipse could not distinguish between test and main
source-sets and could only use a single classpath.
This is no longer the case for the past few Eclipse versions.

This PR adds the necessary configuration to correctly categorize source
folders and libraries.
With this change eclipse can import projects, and the visibility rules
are correct e.x. auto compete doesn't offer classes from test code or
`testCompile` dependencies when editing classes in `main`.

Unfortunately the cyclic dependency detection in Eclipse doesn't seem to
take the difference between test and non test source sets into account,
but since we are checking this in Gradle anyhow, it's safe to set to
`warning` in the settings. Unfortunately there is no setting to ignore
it.

This might cause problems when building since Eclipse will probably not
know the right order to build things in so more wirk might be necesarry.
2019-10-03 10:50:46 +03:00
Rory Hunter 9dd155c30b
Convert most awaitBusy calls to assertBusy (#45794)
Closes #28450. Convert most `awaitBusy` calls to `assertBusy`, and use
asserts where possible. Follows on from #28548 by @liketic.

There were a small number of places where it didn't make sense to me to
call `assertBusy`, so I kept the existing calls but renamed the method to
`waitUntil`. This was partly to better reflect its usage, and partly so
that anyone trying to add a new call to awaitBusy wouldn't be able to find
it.

I also didn't change the usage in `TransportStopRollupAction` as the
comments state that the local awaitBusy method is a temporary
copy-and-paste.

Other changes:

  * Rework `waitForDocs` to scale its timeout. Instead of calling
    `assertBusy` in a loop, work out a reasonable overall timeout and await
    just once.
  * Some tests failed after switching to `assertBusy` and had to be fixed.
  * Correct the expect templates in AbstractUpgradeTestCase.  The ES
    Security team confirmed that they don't use templates any more, so
    remove this from the expected templates. Also rewrite how the setup
    code checks for templates, in order to give more information.
  * Remove an expected ML template from XPackRestTestConstants The ML team
    advised that the ML tests shouldn't be waiting for any
    `.ml-notifications*` templates, since such checks should happen in the
    production code instead.
  * Also rework the template checking code in `XPackRestTestHelper` to give
    more helpful failure messages.
2019-09-25 11:46:12 +01:00
Hendrik Muhs 169ac92cfc
[Transform] Replace transforms with transform, index constants (#47023)
* rename transforms to transform in action names

* move index versioning to core and use constants

* fix indentation

* checkstyle

* checkstyle

* review comments
2019-09-25 07:38:59 +02:00
Hendrik Muhs fd3dc4da77
[Transform] rename data frame transform to transform for hlrc client (#46933)
rename data frame transform to transform for hlrc
2019-09-25 07:38:17 +02:00
Hendrik Muhs b0d70f8072
[Transform]rename classes in transform plugin (#46784)
rename classes in transform plugin from "dataframe transform" to just "transform"
2019-09-19 12:25:46 +02:00
Benjamin Trent 479ebd18ff
[ML][Transforms] remove `force` flag from _start (#46414)
* [ML][Transforms] remove `force` flag from _start

* fixing expected error message
2019-09-16 10:01:50 -04:00
Benjamin Trent 0a1cbed7fc
[ML][Transform] Use field caps for mapping deductino (#46703) 2019-09-16 07:31:14 -04:00
Hendrik Muhs de17140ca0
[Transform] Rename data frame plugin to transform: classes in xpack.core (#46644)
rename classes in xpack.core of transform plugin from "data frame transform" to "transform"
2019-09-15 19:59:21 +02:00
David Roberts 4207fcf62f
[ML-DataFrame] Ensure latest index template exists before indexing docs (#46553)
When upgrading data nodes to a newer version before
master nodes there was a risk that a transform running
on an upgraded data node would index a document into
the new transforms internal index before its index
template was created.  This would cause the index to
be created with entirely dynamic mappings.

This change introduces a check before indexing any
internal transforms document to ensure that the required
index template exists and create it if it doesn't.

Fixes #46501
2019-09-11 14:02:07 +01:00
Hendrik Muhs c463ddb618
[Transform]Rename data frame plugin to transform: plugin and package names (#46478)
rename data frame transform plugin to transform:

 - rename plugin data-frame to transform
 - change all package names from o.e.*.dataframe.* to o.e.*.transform.*
 - necessary changes to fix loading/testing
2019-09-11 08:18:31 +02:00