Commit Graph

20020 Commits

Author SHA1 Message Date
Yannick Welsch 94f19d7e37 Reuse existing allocation id for primary shard allocation
Closes #16530
2016-02-11 14:00:21 +01:00
Simon Willnauer de7b152736 Fix test 2016-02-11 12:09:30 +01:00
David Pilato 37b0fc4f10 Migrate AWS settings to new settings infrastructure
Reintroducing commit fb7723c but now deals with setting names conflicts
Also adds java documentation for each setting

Closes #16293.
Related to https://github.com/elastic/elasticsearch/pull/16477#discussion_r52469084
2016-02-11 12:03:09 +01:00
Simon Willnauer 7835525f45 Move IndicesQueryCache and IndicesRequestCache into IndicesService
this is a minor cleanup that detaches `IndicesRequestCache` and `IndicesQueryCache`
from guice and moves it into `IndicesService`. It also decouples the `IndexShard` and `IndexService`
from these caches which are unnecessary dependencies.
2016-02-11 12:02:21 +01:00
Simon Willnauer 8bdc7362a6 Add infrastructure to rewrite query buidlers
QueryBuilders today do all their heavy lifting in toQuery() which
can be too late for several operations. For instance if we want to fetch geo shapes
on the coordinating node we need to do all this before we create the actual lucene query
which happens on the shard itself. Also optimizations for request caching need to be done
to the query builder rather than the query which then in-turn needs to be serialized again.
This commit adds the basic infrastructure for query rewriting and moves the heavy lifting into
the rewrite method for the following queries:

 * `WrapperQueryBuilder`
 * `GeoShapeQueryBuilder`
 * `TermsQueryBuilder`
 * `TemplateQueryBuilder`

Other queries like `MoreLikeThisQueryBuilder` still need to be fixed / converted. The nice
sideeffect of this is that queries like template queries will now also match the request cache
if their non-template equivalent has been cached befoore. In the future this will allow to
add optimizataion like rewriting time-based queries into primitives like `match_all_docs` or `match_no_docs`
based on the currents shards bounds. This is especially appealing for indices that are read-only ie. never change.
2016-02-11 10:45:49 +01:00
Dongjoon Hyun 70db1b3c44 Fix typos in error messages and comments of dev_tools module. 2016-02-11 01:26:48 -08:00
Dongjoon Hyun ebcbe5d4c5 Fix typos in comments
Closes #16592
2016-02-10 21:22:53 -05:00
Igor Motov a5406e1ffa Adds wait for task registration to testCanFetchIndexStatus
In the testCanFetchIndexStatus the task check can occur before the indexing process is started making the test to fail. This commit adds an additional lock to make sure we check tasks only after at least one of the tasks is registered.
2016-02-10 18:33:12 -05:00
gmarz 2adce71d32 Fix MetricsAggregationBuilder missing the ability to set meta data 2016-02-10 17:52:57 -05:00
Jason Tedor b2b02f14cb Add valid duplicate classes JARs
This commit adds JARs containing valid duplicate classes for testing
JAR hell. These JARs can be recreated with
https://github.com/jasontedor/duplicate-classes.
2016-02-10 15:10:43 -05:00
Nik Everett 91bfee8ce5 Merge pull request #16590 from dongjoon-hyun/fix_typos_in_elasticsearch_common
Fix typos in comments in elasticsearch/common.
2016-02-10 13:35:29 -05:00
Nik Everett bb61cdb330 Name eclipse projects to gradle path
This groups like projects together which is nice. It creates two weirdly
named projects:

1. buildSrc - its still just called buildSrc and it doesn't match. I don't
see why we import it into Eclipse anyway. Its groovy and easier to just edit
in vim or whatever.

2. elasticsearch - this is the name of the root project. It's also not
particularly useful to import into eclipse but we've always named it this way
and the name ':' was even more confusing so we just kept the name.
2016-02-10 13:30:18 -05:00
Dongjoon Hyun 06e7c9c005 Fix typos in comments in elasticsearch/common. 2016-02-10 10:29:54 -08:00
Jason Tedor 374ecea435 Remove dead support for Java Service Wrapper
This commit removes bootstrap support for Java Service Wrapper. The
implementation of this has been moved to its own repository where it was
deprecated, does not work with Elasticsearch 2.x, and is untested and
therefore unmaintained.

Closes #16580
2016-02-10 12:10:43 -05:00
Jason Tedor 346ff0435a Fail demoted primary shards and retry request
This commit handles the scenario where a replication action fails on a
replica shard, the primary shard attempts to fail the replica shard
but the primary shard is notified of demotion by the master. In this
scenario, the demoted primary shard must be failed, and then the
request rerouted again to the new primary shard.

Closes #16415, closes #14252
2016-02-10 11:39:32 -05:00
Tal Levy 321c463929 Merge pull request #16557 from talevy/ingest_hide_null_metadata
hide null-valued metadata fields from WriteableIngestDocument#toXContent
2016-02-10 08:29:16 -08:00
David Pilato 7625595364 Revert Migrate AWS settings to new settings infrastructure
It breaks when you load at the same time `repository-s3` and `discovery-ec2`.
See https://github.com/elastic/elasticsearch/pull/16477#discussion_r52469084

Reopen #16293.
2016-02-10 16:14:53 +01:00
Alexander Reelsen e8d24d10dc Tests: Fix AttachmentProcessorFactoryTests to only check for existing fields 2016-02-10 15:29:16 +01:00
David Pilato fb7723c186 Migrate AWS settings to new settings infrastructure
Closes #16293.
2016-02-10 14:44:51 +01:00
Colin Goodheart-Smithe cef9b015e8 fix merge error 2016-02-10 12:20:10 +00:00
Luca Cavanna 65391e8a83 Merge pull request #16574 from javanna/enhancement/attachment_improvements
Minor attachment processor improvements
2016-02-10 13:20:00 +01:00
Colin Goodheart-Smithe 1f760bd1bd Merge branch 'master' into feature/aggs-refactoring 2016-02-10 12:16:26 +00:00
Jim Ferenczi a520e7c7ad Fix InstallPluginCommandTests failures on windows build 2016-02-10 13:02:29 +01:00
javanna d5969bb33a Attachment Processor: setFieldValue only once as a map 2016-02-10 12:38:39 +01:00
javanna 4e3fb69861 [TEST] rewrite testEnglishTextDocumentWithRandomFields 2016-02-10 12:34:51 +01:00
javanna fe7469dffb Attachment processor: remove unused NAME enum 2016-02-10 12:34:21 +01:00
Colin Goodheart-Smithe 37ce7406d7 Renames PipelineAggregatorFactory to PipelineAggregatorBuilder
Also renames all the implementations appropriately
2016-02-10 11:03:55 +00:00
Colin Goodheart-Smithe 2d1f97beae Made AggregatorFactory fields final and removed AggregationContext from createInternal() parameters 2016-02-10 10:59:59 +00:00
Luca Cavanna 09c32fb1c9 Merge pull request #16539 from javanna/enhancement/ingest_tp
Ingest: use bulk thread pool for bulk request processing (was index before)
2016-02-10 11:49:21 +01:00
Isabel Drost-Fromm f354ab8e11 Merge pull request #16572 from MaineC/geosort-serialisation
Make GeoDistanceSortBuilder serializable, 2nd try
2016-02-10 11:25:51 +01:00
Colin Goodheart-Smithe 54e2f31189 Parse Aggregations on Coordinating node 2016-02-10 10:00:16 +00:00
Adrien Grand a5e5211341 Merge pull request #16264 from jpountz/fix/update_mapping_meta_on_all_types
Put mapping operations must update metadata of all types.
2016-02-10 10:41:01 +01:00
Jim Ferenczi e283ac8588 Fix sporadic SimpleQueryStringBuilderTests failures. 2016-02-10 10:33:45 +01:00
Colin Goodheart-Smithe ccee05792b Clean up of some NORELEASE comments for Agg refactoring 2016-02-10 09:25:34 +00:00
javanna 9ed32f715f Ingest: use bulk thread pool for bulk request processing (was index before)
Closes #16503
2016-02-10 10:19:21 +01:00
Jim Ferenczi ba20fc2d0a Merge pull request #16453 from jimferenczi/packaging_plugin_zip
Pack all the plugin files into a single folder named elasticsearch at the root of the plugin zip.
2016-02-10 10:14:21 +01:00
Jim Ferenczi b146f3ecb3 Pack all the plugin files into a single folder named elasticsearch at the root of the plugin zip. 2016-02-10 10:13:05 +01:00
Isabel Drost-Fromm 9432d57409 Make GeoDistanceSortBuilder serializable
Adds to GeoDistanceSortBuilder:

* equals
* hashcode
* writeto/readfrom
* moves xcontent parsing logic over
* adds roundtrip tests
* fixes roundtrip test for xcontent by keeping points just as geopoints not geohashes internally
* fixes xcontent parsing of ignore_malformed if coerce is set/unset
* adds exception to sortMode setter to avoid setting invalid sort modes

Relates to #15178
2016-02-10 10:10:56 +01:00
Adrien Grand 4ab7a18738 Put mapping operations must update metadata of all types.
Today put mapping operations only update metadata of the type that is being
modified, which is not enough since some modifications may have side-effects
on other types.

Closes #16239
2016-02-10 09:41:12 +01:00
Igor Motov 99a7d8e41f Add task cancellation mechanism
Only tasks that extend CancellableTask can be cancelled using this mechanism. If a cancellable task has children it can elect to cancel all child tasks as well. In this case a special ban parent request is sent to all nodes. This request does two things: 1) it prevents any tasks with the banned parent task from being started, and 2) it cancels all currently running tasks that have the banned task as a parent. The ban is lifted as soon as the coordinating node notifies all other nodes that the cancelled task has finished executing. If the coordinating node leaves the cluster before it has a chance to lift its bans, all bans set by this coordinating node are automatically removed.

As an option a task can elect to automatically cancel all child tasks if their parent task was running on a node that just left the cluster. This option makes sense for cancellable heavy tasks that have no side-effects and only return results to the coordinating node. With the coordinating node gone, it doesn't make sense to run such tasks any longer since their results will be most likely discarded.
2016-02-09 22:30:57 -05:00
Nik Everett 5c80dd5048 Merge pull request #16567 from nik9000/checkstyle_equals_hashcode
Fail build if we define equals but not hashCode
2016-02-09 22:00:51 -05:00
Nik Everett f76366909a Fail build if we define equals but not hashCode
That is like some kind of cardinal sin or something, right?

We had two violations though they weren't super likely to be keys in a hashmap
any time soon.
2016-02-09 21:29:08 -05:00
Dongjoon Hyun 1d26b4de22 Fix typos in the names of some variables
Closes #16566
2016-02-09 20:35:42 -05:00
Nik Everett 3fcca2c516 Merge pull request #16559 from nik9000/remove_old_license_checker
Remove license header check files
2016-02-09 16:25:39 -05:00
Nik Everett ab4bfbf259 Remove license header check files
These look like they were used with an older license header check. I suspect
these are obsolete.
2016-02-09 16:00:36 -05:00
Tal Levy f9453e594a hide null-valued metadata fields from WriteableIngestDocument#toXContent 2016-02-09 12:57:58 -08:00
Yannick Welsch 2dc76a32f3 Merge pull request #16553 from ywelsch/fix/alias-action
Fix filters and null parameters in _aliases command
2016-02-09 21:46:20 +01:00
Yannick Welsch 0d11443aba Fix filters and null parameters in _aliases command
Closes #16549
Closes #16547
2016-02-09 21:43:42 +01:00
Nik Everett 1c741f56b9 Merge pull request #16529 from dongjoon-hyun/fix_typos_in_docs
Fix typos in docs.
2016-02-09 14:00:06 -05:00
Jason Tedor 40789d818e Remove unused import from o.e.e.Environment 2016-02-09 13:26:32 -05:00