Commit Graph

29975 Commits

Author SHA1 Message Date
Lee Hinman ba5b583203
Notify affixMap settings when any under the registered prefix matches (#28317)
* Notify affixMap settings when any under the registered prefix matches

Previously if an affixMap setting was registered, and then a completely
different setting was applied, the affixMap update consumer would be notified
with an empty map. This caused settings that were previously set to be unset in
local state in a consumer that assumed it would only be called when the affixMap
setting was changed.

This commit changes the behavior so if a prefix `foo.` is registered, any
setting under the prefix will have the update consumer notified if there are
changes starting with `foo.`.

Resolves #28316

* Add unit test

* Address feedback
2018-01-22 11:55:54 -07:00
Luca Cavanna 0c83ee2a5d
Trim down usages of `ShardOperationFailedException` interface (#28312)
In many cases we use the `ShardOperationFailedException` interface to abstract an exception that can only be of one type, namely `DefaultShardOperationException`. There is no need to use the interface in such cases, the concrete type should be used instead. That has the additional advantage of simplifying parsing such exceptions back from rest responses for the high-level REST client
2018-01-22 15:51:46 +01:00
Martijn van Groningen 509ecf2aa6
Do not return all indices if a specific alias is requested via get aliases api.
If a get alias api call requests a specific alias pattern then
indices not having any matching aliases should not be included in the response.

Closes #27763
2018-01-22 14:02:53 +01:00
Christoph Büscher a6bfe67f8b [Test] Lower bwc version for rank-eval rest tests
The API was backported to 6.2 so the version we test against on master can be
lowered to that.
2018-01-22 13:33:42 +01:00
Adrien Grand 8d195c86de
CountedBitSet doesn't need to extend BitSet. (#28239) 2018-01-22 12:43:34 +01:00
kel 452c36c552 Calculate sum in Kahan summation algorithm in aggregations (#27807) (#27848) 2018-01-22 12:42:56 +01:00
Adrien Grand 700d9ecc95
Remove the `update_all_types` option. (#28288)
This option is not useful in 7.x since no indices may have more than one type
anymore.
2018-01-22 12:03:07 +01:00
Tanguy Leroux 119b1b5c2b
Add information when master node left to DiscoveryNodes' shortSummary() (#28197)
This commit changes `DiscoveryNodes.Delta.shortSummary()` in order to
add information to the summary when the master node left.
2018-01-22 09:52:57 +01:00
Peter Dyson 1ae920cb90
Provide explanation of dangling indices, fixes #26008 (#26999)
* Provide explanation of dangling indices, fixes #26008

Adjusted from PR review comments

* updates to suggested wording and minor typo fix.
2018-01-22 18:39:21 +10:00
Ryan Ernst 3a43bb1ba9 Build: Add pom generation to meta plugins (#28321)
This commit adds pom generation to meta plugins by using the same hacks
that PluginBuildPlugin already uses to get around "pom" type poms (ie
zip files).
2018-01-21 18:37:31 -05:00
Jason Tedor ef76d99d86 Add 6.3 version constant to master
This commit adds the 6.3 version constant to the master branch after 6.2
was cut from 6.x.
2018-01-20 22:16:59 -05:00
David Turner 0a4a4c8a0e
Minor improvements to translog docs (#28237)
The use of the phrase "translog" vs "transaction log" was inconsistent, and
it was apparently unclear that the translog was stored on every shard copy.
2018-01-19 10:17:22 +00:00
Christoph Büscher b7e1d6fe3e [Docs] Remove typo in painless-getting-started.asciidoc 2018-01-19 10:19:11 +01:00
Ryan Ernst 7a82bb94b3
Build: Fix meta plugin usage in integ test clusters (#28307)
This commit fixes places handling plugin projects in cluster formation
to work with both esplugin and es_meta_plugin.
2018-01-18 21:13:39 -08:00
Ryan Ernst ba9c9e08e7
Painless: Add spi jar that will be published for extending whitelists (#28302)
In order to build a plugin that extends the painless whitelist, the spi
classes must be available to the plugin at compile time. This commit
moves the spi classes into a separate jar which will be published. Any
plugin authors whiching to extend painless through spi would then add a
compileOnly dependency on this jar.
2018-01-18 19:16:26 -08:00
Andrew Kramarev ef468327e9 mistyping in one of the highlighting examples comment -> content (#28139) 2018-01-18 17:32:42 -05:00
David Kemp 531c58cf81 Documents applicability of term query to range type (#28166)
Closes #27030
2018-01-18 17:19:01 -05:00
Ryan Ernst 19a2b01e43
Build: Omit dependency licenses check for elasticsearch deps (#28304)
Sometimes modules/plugins depend on locally built elasticsearch jars.
This means not only that the jar is constantly changing (so no need for
a sha check), but also that the license falls under the Elasticsearch
license, and there is no need to keep another copy. This commit updates
the dependencies checked by dependencyLicenses to exclude those that are
built by elasticsearch.
2018-01-18 14:15:44 -08:00
Nhat Nguyen 9db9bd52f7
Clean up commits when global checkpoint advanced (#28140)
Today we keep multiple index commits based on the current global 
checkpoint, but only clean up unneeded index commits when we have a new 
index commit. However, we can release the old index commits earlier once
the global checkpoint has advanced enough. This commit makes an engine
revisit the index deletion policy whenever a new global checkpoint value
is persisted and advanced enough.

Relates #10708
2018-01-18 15:45:06 -05:00
Tim Brooks a6a57a71d3
Implement socket and server ChannelContexts (#28275)
This commit is related to #27260. Currently have a channel context that
implements reading and writing logic for socket channels. Additionally,
we have exception contexts to handle exceptions. And accepting contexts
to handle accepted channels. This PR introduces a ChannelContext that
handles close and exception handling for all channel types.
Additionally, it has implementers that provide specific functionality
for socket channels (read and writing). And specific functionality for
server channels (accepting).
2018-01-18 13:06:40 -07:00
Ryan Ernst de9d903b1e
Plugins: Fix meta plugins to install bundled plugins with their real name (#28285)
Meta plugins move the unzipped plugin as is, but the inner plugins may
have a different directory name than their corresponding plugin
properties file specifies. This commit fixes installation to rename the
directory if necessary.
2018-01-18 12:01:20 -08:00
Ryan Ernst e442a34acc
Build: Fix meta plugin integ test installation (#28286)
Integ test clusters should use the plugin method of ClusterConfiguration
to install plugins. Without it, meta plugins install based on the name
of the project directory, rather than the actual configured plugin name.
This commit fixes that, and also corrects the distribution used to be
the default integ-test-zip, to match that of PluginBuildPlugin. This
ensures plugins are tested in isolation by default.
2018-01-18 11:14:56 -08:00
Tim Brooks 20fb7a6d87
Modify Abstract transport tests to use impls (#28270)
There a number of tests in `AbstractSimpleTransportTestCase` that
create `MockTcpTransport` impls. This commit modifies two of these tests
to use the transport implementation that is being tested.
2018-01-18 10:59:42 -07:00
Jason Tedor 4214a718ec
Fork Groovy compiler onto compile Java home
We use the --release flag which is only available starting in JDK
9. Since Gradle could be running on JDK 8 without forking the compiler,
compilation will occur with the Java home of Gradle. This commit adds a
fork flag to the compiler Java home so that we use the right compiler.

Relates #28300
2018-01-18 12:08:32 -05:00
Jin Liang 66c81e7f5e [Docs] Update tophits-aggregation.asciidoc (#28273) 2018-01-18 18:06:20 +01:00
David Shimon c92b42ef84 Docs: match between snippet to its description (#28296)
s/400/200/ in the text to match a snippet.
2018-01-18 09:31:02 -05:00
javanna 0dfb65a6ee [TEST] fix RequestTests#testSearch in case search source is not set
The search request body can never be null as `SearchRequest` doesn't allow the inner `SearchSourceBuilder` to be null. Instead, when search source is not set, the request body is going to be an empty json object (`{}``)
2018-01-18 12:56:54 +01:00
Luca Cavanna b4c1c4a78c
REST high-level client: remove index suffix from indices client method names (#28263)
Today, the way to call them API under the indices namespace is by doing e.g. `client.indices().createIndex()`. Our spec define the API under the indices namespace as e.g. `indices.create`, hence there is no need to repeat the index suffix for each method as that is already defined by the namespace. Using the `index` suffix in each method was an oversight which must be corrected.
2018-01-18 11:57:24 +01:00
Jim Ferenczi c38c12e3bf
Fix simple_query_string on invalid input (#28219)
This change converts any exception that occurs during the parsing of
a simple_query_string to a match_no_docs query (instead of a null query)
when leniency is activated.

Closes #28204
2018-01-18 10:49:34 +01:00
Ryan Ernst 06f931fcc4
Build: Add run task to meta plugins (#28283)
This commit adds a run task to projects using the meta plugin plugin. It
also makes the project installable via ClusterConfiguration.plugin.
2018-01-18 01:02:27 -08:00
deepybee 48c8098e15 Fixed several typos in analyzers section (#28247) 2018-01-18 08:51:53 +00:00
Christoph Büscher 77dcaab34f
Simplify RankEvalResponse output (#28266)
Currenty the rest response of the ranking evaluation API wraps all inside an
enclosing `rank_eval` object. This is redundant since it is clear from the API
call and it doesn't provide any other useful information. This change removes
this.
2018-01-18 09:32:27 +01:00
Jim Ferenczi defb53a0bc
add a note regarding rescore and sort (#28251) 2018-01-18 09:23:19 +01:00
Ryan Ernst ac1c509844
Build: Fix subdirectories in meta plugins to be copied correctly (#28282)
This commit fixes the copying of files from bundled plugin zips.
Previously all files within each zip would be flattened under the
bundled plugin name, and the original directories would exist at the top
level of the plugin.
2018-01-17 21:27:59 -08:00
Ryan Ernst c15ae7eb20
Build: Add release flag to groovy compilation (#28277)
The build-tools project (ie buildSrc) has groovy code. The -source
option was set to java 8, but this is not correct on java 9, and
actually causes a warning about not setting boot classpath. This commit
adds the --release option to groovy compilation, just like is done for
java compilation.
2018-01-17 20:03:11 -08:00
Ryan Ernst 9435423844
Build: Automatically add projects under libs, qa, modules and plugins (#28279)
This commit lessens the burden on configuring settings.gradle when new
projects are added. In particular, this makes it trivial to move a
plugin to a module (or vice versa).
2018-01-17 19:54:43 -08:00
Ryan Ernst cefea1a7c9
Build: Add gradle plugin for configuring meta plugin (#28276)
This commit adds a gradle plugin to ease development of meta plugins.
Applying the plugin will generated the meta plugin properties based on
the es_meta_plugin configuration object, which includes name and
description. The plugins to include within the meta plugin are
configured through the `plugins` list. An integ test task is also
automatically added.
2018-01-17 19:47:37 -08:00
Jason Tedor 6b0036e0e1
Add client actions to action plugin
This commit adds an extension point for client actions to action
plugins. This is useful for plugins to expose the client-side actions
without exposing the server-side implementations to the client. The
default implementation, of course, delegates to extracting the
client-side action from the server-side implementation.

Relates #28280
2018-01-17 21:57:03 -05:00
Tal Levy c122a6d4a0
remove recommended junit intellij setting change (#28274)
The "Shorten Command Line" setting in Intellij's JUnit test configuration
was recommended to change to `classpath file`. This setting has been
causing issues with JDK9 where some modules were not being found at
runtime. This PR removes the recommendation to change this setting and
instead asks that users verify that it is set to `user-local default:none`.
2018-01-17 15:01:02 -08:00
Tony Zeng 1335232e6b Add toString() implementation for UpdateRequest (#27997) 2018-01-17 17:04:04 +00:00
Tim Brooks 4ea9ddb7d3
Unify nio read / write channel contexts (#28160)
This commit is related to #27260. Right now we have separate read and
write contexts for implementing specific protocol logic. However, some
protocols require a closer relationship between read and write
operations than is allowed by our current model. An example is HTTP
which might require a write if some problem with request parsing was
encountered.

Additionally, some protocols require close messages to be sent when a
channel is shutdown. This is also problematic in our current model,
where we assume that channels should simply be queued for close and
forgotten.

This commit transitions to a single ChannelContext which implements
all read, write, and close logic for protocols. It is the job of the
context to tell the selector when to close the channel. A channel can
still be manually queued for close with a selector. This is how server
channels are closed for now. And this route allows timeout mechanisms on
normal channel closes to be implemented.
2018-01-17 09:44:21 -07:00
Tanguy Leroux 1f66672d6f [Test] Fix indices.stats/13_fields
Remove the wait_for_active_shards: all added by commit 6256c since it
does not work when the cluster has 1 node only.
2018-01-17 15:05:07 +01:00
Alexander Reelsen 707d8d6fe6
Dependencies: Update joda time to 2.9.9 (#28261) 2018-01-17 14:58:52 +01:00
David Turner 9bd7f2c65b
Improve wording in deprecation message (#28259) 2018-01-17 12:42:20 +00:00
Tanguy Leroux 6256c330c0 [Test] Wait for no relocating shards in indices.stats/13_fields tests
MixedClusterClientYamlTestSuiteIT sometimes fails when executing the
indices.stats/13_fields/* REST tests. It does not reproduce locally
but the execution logs show that it failed when a shard is relocating
during the set up execution. This commit change the set up so that it
now waits for all shards to be active before executing the tests.

closes #26732, #27146
2018-01-17 13:35:29 +01:00
olcbean b98514c6d9 Add Close Index API to the high level REST client (#27734)
Add support for _close endpoint to the high level REST client

Relates to #27205
2018-01-17 11:47:08 +01:00
Alexander Reelsen d32cb8089b
Tests: Decrease log level for adding a header value (#28246)
This logging message adds considerable noise to many REST tests, if you
are using something like HTTP basic auth in every API call or set any custom
header.

The log level moves from info to debug, so can still be seen if wanted.
2018-01-17 09:14:44 +01:00
Jason Tedor aded32f48f
Fix third-party audit tasks on JDK 8
This one is interesting. The third party audit task runs inside the
Gradle JVM. This means that if Gradle is started on JDK 8, the third
party audit tasks will fail as a result of the changes to support
building Elasticsearch with the JDK 9 compiler. This commit reverts the
third party audit changes to support running this task when Gradle is
started with JDK 8.

Relates #28256
2018-01-16 22:59:29 -05:00
Lee Hinman f2cd580332 Remove duplicated javadoc `fieldType` param 2018-01-16 16:34:44 -07:00
Nik Everett 4ec0569a19 Handle 5.6.6 and 6.1.2 release
Add new version constants for 5.6.6 and 6.1.2 release.
2018-01-16 16:41:05 -05:00