Commit Graph

4040 Commits

Author SHA1 Message Date
Boaz Leskes c5a290550f Fix exception assertions in MetaDataStateFormatTests.testLoadState (again) 2016-02-29 12:11:10 +01:00
Boaz Leskes e5e21480d4 Fix exception assertions in MetaDataStateFormatTests.testLoadState
Got broken with the change in #16850
2016-02-29 12:03:48 +01:00
Boaz Leskes 4602d8c0dc Added file name to exceptions when failing to read index state #16850
Closes #16713
Closes #16850
2016-02-29 11:42:53 +01:00
Igor Motov 863fab4007 Add start time and duration to tasks
Tasks now contain timestamps indicating when the tasks were created and current run time
2016-02-27 18:41:51 -05:00
Luca Cavanna 0aba19f4fa Merge pull request #16675 from javanna/enhancement/bulk_delete_routing_required
Bulk api: fail deletes when routing is required but not specified
2016-02-27 19:03:33 +01:00
Boaz Leskes 4ecbce1568 Disable testEnforceMaxFileDescriptorLimits for now
See #16835
2016-02-27 18:56:21 +01:00
javanna ba40c5bc9a Excpetion => Exception 2016-02-27 18:35:32 +01:00
javanna 5ff702b212 [TEST] remove needless index operation in SimpleRoutingIT 2016-02-27 18:35:32 +01:00
javanna 65f5cbe568 remove boolean return type from resolveRequest and needless listener arg 2016-02-27 18:35:32 +01:00
javanna 0fe73b51f9 Bulk api: fail deletes when routing is required but not specified
As part of #10136 we removed the transport action for broadcast deletes in case routing is required but not specified. Bulk api worked differently though and kept on doing the broadcast delete internally in that case. This commit makes sure that delete items are marked as failed in such cases. Also the check has been moved up in the code together with the existing check for the update api, and we now make sure that the exception is the same as the one thrown for single document apis (delete/update).

Note that the failure for the update api contained the wrong optype (the type of the document rather than "update"), that's been fixed too and tested.

Closes #16645
2016-02-27 18:35:31 +01:00
Yannick Welsch af918ebf2b Upgrade groovy dependency in lang-groovy module to version 2.4.6
Closes #16830
2016-02-27 17:41:15 +01:00
Jason Tedor f871b9bba2 Disable production limits on snapshot builds
This commit disables the production limits checks on snapshot
builds. This is at a minimum short-term relief for developers that do in
fact bind to external network interfaces, and is possibly a long-term
fix as well. The situation with using the JVM flag MaxFDLimit is far too
complicated.

Closes #16835
2016-02-26 19:55:10 -05:00
Ryan Ernst 9c259aca41 Core: Remove log4j exception hiding
At some time in the distant past, Bootstrap could be used by those
embedding elasticsearch. However, it is no longer allowed (now package
private), and so any errors (for example, log4j missing, or any other
exception while initializing) should be exposed directly and cause
elasticsearch to fail to start. This change removes hiding of logging
initialization exceptions.
2016-02-26 14:52:53 -08:00
Nik Everett c38119bae9 Merge branch 'master' into feature/reindex 2016-02-26 16:59:54 -05:00
Nik Everett ba5be0332d Remove optional logger wrappers
Removes all our logger wrappers except the wrapper for log4j1.2. If you
depend on Elasticsearch's jar in your application you'll need to declare
log4j 1.2 and/or some bridge to your favorite logger.

We did this to simplify our builds and code. No more commons-logging like
log implementation sniffing. No more optional dependency hacks in gradle.

We might one day want to use j.u.l instead of log4j. If we do want that
we can recover its wrapper by studying this commit. We didn't go directly
to j.u.l in this commit because that is a bigger change. Our logging
configuration is based on log4j1.2 and people are used to it. So it'd
be a much more fraught breaking change to do that conversion.
2016-02-26 16:41:07 -05:00
Nik Everett e3aba38bac Javadoc for common.io.stream
Adds some javadoc to Streamable, Writeable, and friends.
2016-02-26 16:28:44 -05:00
Lee Hinman 5d359f737f Merge branch 'pr/16801' 2016-02-26 13:22:14 -07:00
Adrien Grand 28b0965cc6 Remove `optimize_single_shard` settings. #15978
This optimization has existed for years with no complaints, I suggest that we
remove the settings that allow to disable it.
2016-02-26 14:30:28 +01:00
jaymode 5963f276f3 Settings with complex matchers should not overlap
It is possible to register multiple settings with complex matchers that could both match
a given key. The behavior when this occurs can lead to issues and depends on the
number of settings that have been registered. In order to identify the setting for a given
key, we iterate over the values in a map to find the first setting that matches the given key
and iteration order of a map should not be relied upon.

This commit checks complex settings when adding them and if the keys for these overlap,
an IllegalArgumentException is now thrown.
2016-02-26 06:31:37 -05:00
Daniel Mitterdorfer 9e473c98c6 Merge branch 'pr/16649'
This PR fixes a bunch of typos across the code base.
2016-02-26 11:31:45 +01:00
Jason Tedor d94e391e71 Use System#lineSeparator and not system property
This commit replaces a use of the system property "line.separator" and
replaces it with a dedicated method that provides the same value.

Closes #16776
2016-02-25 12:22:57 -05:00
Nik Everett 7c4420bf3d Merge pull request #16807 from nik9000/not_mvn
Remove mention of mvn from java source files
2016-02-25 11:05:46 -05:00
Nik Everett 74754952db Remove mention of mvn from RestIT and Security 2016-02-24 19:43:56 -08:00
James Bertouch cb35455745 Upgrade to Jackson 2.7.0
Closes #16294
2016-02-24 18:06:38 -05:00
Igor Motov d6af669776 Combine node name and task id into single string task id
This commit changes the URL for task operations from `/_tasks/{nodeId}/{taskId}` to `/_tasks/{taskId}`, where `{taskId}` has a form of nodeid:id
2016-02-24 12:44:12 -08:00
Jason Tedor 7140d184ab Fix IntelliJ query builder type inference issues
Relates #15429
2016-02-24 02:23:16 -08:00
Boaz Leskes 5a91ad1115 Only accept transport requests after node is fully initialized #16746
We should open up the node to the world when it's as ready as possiblAt the moment we open up the transport service before the local node has been fully initialized. This causes bug as some data structures are not fully initialized yet. See for example #16723.

Sadly, we can't just start the TransportService last (as we do with the HTTP server) because the ClusterService needs to know the bound published network address for the local DiscoveryNode. This address can only be determined by actually binding (people may use, for example, port 0). Instead we start the TransportService as late as possible but block any incoming requests until the node has completed initialization.

A couple of other cleanup during start time:
1) The gateway service now starts before the initial cluster join so we can simplify the logic to recover state if the local node has become master.
2) The discovery is started before the transport service accepts requests, but we only start the join process later using a dedicated method.

Closes #16723
Closes #16746
2016-02-23 17:58:28 -08:00
Jason Tedor c978335968 Remove es.useLinkedTransferQueue
This commit removes the system property "es.useLinkedTransferQueue" that
defaulted to false and was used to control the queue implementation used
in a few places.

Closes #16786
2016-02-23 17:29:15 -08:00
Jason Tedor bd5c7f0889 Inline TimeValue#parseTimeValue
Relates #16725
2016-02-23 16:33:16 -08:00
Jason Tedor 7101ecea94 Inline ReplicationPhase#<init>
Relates #16725
2016-02-23 16:33:14 -08:00
Jason Tedor 7a7f6055dc Inline InternalEngine#innerIndex
Relates #16725
2016-02-23 16:33:12 -08:00
Jason Tedor 7273948188 Inline DocumentParser#parseObject
Relates #16725
2016-02-23 16:33:10 -08:00
Jason Tedor 5bbb1312b1 Inline WildcardExpressionResolver#resolve
Relates #16725
2016-02-23 16:33:08 -08:00
Jason Tedor 26c1bb36a2 Inline TSBA#shardOperationOnPrimary
Relates #16725
2016-02-23 16:33:07 -08:00
Jason Tedor 9e52bcd166 Inline OrdinalsStore#addOrdinal
Relates #16725
2016-02-23 16:33:04 -08:00
Jason Tedor 6a66882e46 Inline DocumentParser#parseDocument
Relates #16725
2016-02-23 16:33:02 -08:00
Jason Tedor b9a7db554a Inline RestUtils#decodeComponent
Relates #16725
2016-02-23 16:33:00 -08:00
Jason Tedor e39280b5a6 Inline CMCB#addEstimateBytesAndMaybeBreak
Relates #16725
2016-02-23 16:32:58 -08:00
Jason Tedor 67e9165089 Inline MetaData#resolveIndexRouting
Relates #16725
2016-02-23 16:32:56 -08:00
Jason Tedor fe2a29211b Inline ReroutePhase#doRun
Relates #16725
2016-02-23 16:32:54 -08:00
Jason Tedor 373c3dfa57 Inline PrimaryPhase#doRun
Relates #16725
2016-02-23 16:32:52 -08:00
Jason Tedor 001c2c6282 Inline XContentBuilder#writeValue
Relates #16725
2016-02-23 16:32:51 -08:00
Jason Tedor 2e9887a3cb Inline NettyHttpChannel#sendResponse
Relates #16725
2016-02-23 16:32:45 -08:00
Jason Tedor a447c06efc Inline NettyHttpChannel#getStatus
Relates #16725
2016-02-23 16:32:45 -08:00
Jason Tedor 2690f69d77 Inline Base64#decode
Relates #16725
2016-02-23 16:32:40 -08:00
Jason Tedor cf1d9cfefc Inline Base64#decode4to3
Relates #16725
2016-02-23 16:32:38 -08:00
Jason Tedor a1740d6661 Inline Base64#encodeBytesToBytes
Relates #16725
2016-02-23 16:32:09 -08:00
Igor Motov a9eb668497 Add node version check to shard allocation during restore
Verifies that the version of a node is compatible with the version of a shard that's being restored on this node.

Fixes #16519
2016-02-22 20:14:57 -08:00
Jason Tedor 5da9059d0b Add G1GC check on startup
This commit adds a check on startup for G1 GC while running on early
versions of HotSpot version 25. This is to prevent potential data
corruption issues that can occur on those versions.

Closes #16737
2016-02-22 16:51:23 -08:00
Jason Tedor 6e840b39f5 Remove ability to disable Netty gathering writes
Java NIO has the notion of gathering writes. These are writes that
gather data from multiple buffers into a single channel. These gathering
writes in Netty have been enabled by default with the possibility to
disable them using "es.netty.gathering". This flag was added in case
having gathering writes on by default did not work out. We have not
published this ability and sufficient time has passed to render
judgement that using gathering writes is okay.

Closes #16774
2016-02-22 16:17:44 -08:00
Simon Willnauer 354aae2fec Merge pull request #16770 from s1monw/http_on_cat
Expose http address in cat/nodes and cat/nodeattrs APIs

We expose a lot of information like IP address and port but never
expose the http address/ip:port in the CAT API. It's nice to have it
there too since otherwise json parsing is required to get this information
2016-02-22 14:20:33 -08:00
Simon Willnauer 3c15200f6f Expose http address in cat/nodes and cat/nodeattrs APIs
We expose a lot of information like IP address and port but never
expose the http address/ip:port in the CAT API. It's nice to have it
there too since otherwise json parsing is required to get this information
2016-02-22 13:22:54 -08:00
David Pilato a55ad665da Merge pull request #16743 from dadoonet/pr/9209-cat-recovery-timeunit
[cat/recovery] Make recovery time a TimeValue()
2016-02-22 12:38:04 -08:00
Lee Hinman 99052c3fef Limit the accepted length of the _id
Elasticsearch should reject ids that are this long, to ensure a document
always remains retrievable for clients that impose a maximum URI length

Closes #16034
2016-02-22 12:34:18 -07:00
Christoph Büscher f8a7bed4f0 Highlighter: Move xContent write of highlight fieldname to SearchSourceBuilder
Most elements in SearchSourceBuilder (e.g. aggs, queries) write their top-level
ParseField name in toXContent(), while HighlightBuilder used to do it in
its own toXContent() method. Moved this up so SeachSourceBuilder for consistency.
2016-02-22 10:58:23 -08:00
Simon Willnauer a574baaf3e [TEST] fix test to only enforce settings if it's not negative AND less than the limit 2016-02-22 10:50:00 -08:00
Simon Willnauer 387f0473dc Assert that we can write in all data-path on startup
Today we might start a node and some of the paths might not have the
required permissions. This commit goes through all data directories as
well as index, shard and state directories and ensures we have write access.
To make this work across all OS etc. we are trying to write a real file
and remove it again in each of those directories
2016-02-22 10:32:29 -08:00
Simon Willnauer 1e15ae6228 Merge pull request #16733 from s1monw/enforce_limits
Enforce node level limits if node is started in production env
2016-02-22 10:30:36 -08:00
Lee Hinman 932808faca [TEST] enable TRACE logging for gateway on testIndexWithFewDocuments 2016-02-22 00:28:34 -07:00
Jason Tedor fa885f2e96 Remove es.max-open-files flag
This commit removes the es.max-open-files flag as the same information
can be obtained from the cluster nodes info API, and is warn logged on
startup if it's set too low anyway.

Closes #16757
2016-02-21 21:01:08 -08:00
Simon Willnauer 55a8b1786e Enforce node level limits if node is started in production env
This commit tries to 'guess' if a user starts a node in production by
checking if any network host is configured. If that is the case soft-limits
that are only logged otherwise are enforced like number of open file descriptors.

Closes #16727
2016-02-21 17:15:50 -08:00
Mike McCandless 2e3160824c Upgrade to Lucene 5.5.0 official release
Closes #16742
2016-02-21 05:26:22 -05:00
Simon Willnauer c8e462e5dc Apply feedback from @rjernst 2016-02-20 17:12:48 -08:00
Drew Raines dd2f26ca40 [cat/recovery] Make recovery time a TimeValue()
Recovery `time` should be a TimeValue() to match other cat APIs.

Closes #9209
2016-02-20 16:30:51 -08:00
Simon Willnauer 4f7dd1284f Remove SNAPSHOT notion from code
Today we have the notion of a snapshot inside Version.java which makes
releasing complicated since to do a release Version.java must be changed.
This commit removes all notions of snapshot from the code and allows to
switch between snapshot and release build by specifying a system property on
the build. For instance running:

```
gradle run -Dbuild.snapshot=false
```

will build and package a release build while the default always
builds snapshots. Calls to the main rest action will still get the snapshot
information rendered out with the response.
2016-02-20 16:06:26 -08:00
Mike McCandless 5fffede2b0 Upgrade to Lucene 5.5.0 official release 2016-02-20 17:34:16 -05:00
Dongjoon Hyun 764ded9f28 Fix typos in exception/assert/log messages in core module. 2016-02-15 15:32:34 -08:00
Martijn van Groningen 3290cfbd31 test: replaced integration tests with unit test 2016-02-15 22:03:55 +01:00
George P. Stathis b17a92c911 Fixes #16550 (thanks for the pointers @martijnvg!) 2016-02-15 19:58:24 +01:00
Adrien Grand 69e21d4cc3 Fix how analyzers are set in StringFieldMapper.
This was changed when adding the text field in an attempt to clean up
how analyzers are set. Unfortunately this change was not safe for the
string field given that it can also represent keywords.
2016-02-15 19:21:54 +01:00
Colin Goodheart-Smithe 8f68c64f68 Fixes serialisation of Ranges
Range aggregation tests were failing (e.g. http://build-us-00.elastic.co/job/es_core_master_metal/12385/testReport/junit/org.elasticsearch.messy.tests/IPv4RangeTests/testPartiallyUnmapped/) sometimes because both the string and number versions of form and to were being serialised. This meant that the range aggregator builder objects would not serialise and deserialise to the same bytes before and after the builder had been used. This change makes Range object immutable so the builder doesn't need to worry about the range changing under its feet.
2016-02-15 15:14:09 +00:00
Colin Goodheart-Smithe ebc745211d Moved AggregatorBuilder implementations into their own class files
Also renamed histogram.AbstractBuilcer to AbstractHistogramBuilder, range.AbstractBuilder to AbstractRangeBuilder and org.elasticsearch.search.aggregations.pipeline.having to org.elasticsearch.search.aggregations.pipeline.bucketselector
2016-02-15 14:09:36 +00:00
Colin Goodheart-Smithe bd2e00d396 review comments 2016-02-15 10:46:24 +00:00
Colin Goodheart-Smithe 1a46628daa Merge branch 'master' into feature/aggs-refactoring
# Conflicts:
#	core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java
2016-02-15 10:37:16 +00:00
Adrien Grand 11ce624343 Merge pull request #16637 from jpountz/feature/text
Add a text field.
2016-02-15 10:45:53 +01:00
Adrien Grand 4f8895eae3 Add a text field.
This new field is intended to replace analyzed string fields.
2016-02-15 10:43:44 +01:00
Boaz Leskes 0305628c6b Add some debug logs to testPendingUpdateTask
It times out rarely. Hopefully these will help.
2016-02-15 10:15:00 +01:00
Jason Tedor d313cdd7d0 Assertion handling timestamp in index request
This commit adds an assertion that the mapping metadata is not null when
handling a non-default timestamp when no timestamp is provided.

Closes #16596
2016-02-14 14:41:30 -05:00
Jason Tedor 3bbd1c129e Remove host from cat nodes API
As the host and ip fields are always equal by design, the host field in
the cat nodes API is redundant and should be removed.

Closes #16656
2016-02-14 09:21:32 -05:00
Simon Willnauer 8c1fe37e92 Remove in-place rewriting of SearchSourceBuilder
SearchSourceBuilder should be cloned when rewriting, the in-place rewrite
is failing with local transport assertions.
2016-02-13 08:57:32 +01:00
Simon Willnauer 25d6a143d4 Merge branch 'master' into add_rewrite_infra 2016-02-12 22:13:34 +01:00
Zachary Tong 2ebd2ba616 [TEST] Temporarily silence failing test
Failure ticket at #16645
2016-02-12 15:36:37 -05:00
Martijn van Groningen 299179e704 logging: exception is first argument 2016-02-12 18:23:22 +01:00
Luca Cavanna f589fa8013 Merge pull request #16617 from javanna/enhancement/function_score_strict_parsing
Function Score Query: make parsing stricter
2016-02-12 17:45:10 +01:00
Luca Cavanna ca23ee6104 Merge pull request #16640 from javanna/enhancement/remove_copy_constructors
Remove copy constructors from request classes and TransportMessage type
2016-02-12 17:21:55 +01:00
javanna cb1ca92618 move function score to ParseField 2016-02-12 17:15:04 +01:00
javanna 320f356030 use assertNull rather than assertTrue(object == null) 2016-02-12 17:15:04 +01:00
javanna 507b868692 [TEST] make SearchSourceBuilderTests pickier, check that the search source has been read completely
Same check is already performed in AbstractQueryTestCase, makes sense to have it here too.
2016-02-12 17:15:04 +01:00
javanna a624410450 Function Score Query: make parsing stricter
Function Score Query now checks the type of token that we are parsing, which makes parsing stricter and allows to throw useful errors in case the json is malformed. It also makes code more readable as in what gets parsed when.

Closes #16583
2016-02-12 17:15:03 +01:00
Nicholas Knize a3d425573c Upgrade GeoPointIndexFieldData to support new PREFIX Encoding
This commit updates the OrdinalsBuilder and GeoPoint FieldData loader to work with the new PREFIX_ENCODING introduced in lucene-5.5.0. Backcompat is included to support legacy encoding types.

closes #16634
2016-02-12 10:13:17 -06:00
javanna 8d0089c8d8 Remove unused generics type from TransportMessage
followup of #15776, the type is not needed anymore.
2016-02-12 16:31:35 +01:00
Colin Goodheart-Smithe 83885423a0 [TEST] mute DuelFieldDataTests.testDuelGeoPoints()
Bug URL = https://github.com/elastic/elasticsearch/issues/16634
2016-02-12 15:20:13 +00:00
javanna 5849646baa Java api: remove needless copy constructors from request classes
After #15776 got in, we don't need these copy constructors anymore. When we used to copy requests it was to make sure that headers and context were copied from the parent requests (e.g. index/delete as part of update). This is not a problem anymore.
2016-02-12 16:16:39 +01:00
Simon Willnauer 6c6ed135c5 wrap lines 2016-02-12 15:37:25 +01:00
Simon Willnauer 84d91c87a1 fix test 2016-02-12 15:34:50 +01:00
Simon Willnauer 9e0ceaa63e [TEST] fix test to be env agnostic 2016-02-12 15:25:00 +01:00
Simon Willnauer 8d568ce3e1 Move optimization out of BoolQueryBuilder into tests 2016-02-12 15:14:28 +01:00
Simon Willnauer 387a55d5f9 wrap lines 2016-02-12 13:03:21 +01:00
Simon Willnauer b906c8a389 apply fixes after review 2016-02-12 12:53:12 +01:00
Colin Goodheart-Smithe 86b0777392 removes a lot of warnings form the aggregations 2016-02-12 10:47:08 +00:00
Colin Goodheart-Smithe d9c1e88ba9 PipelineAggregatorBuilder.setMetaData is now chain able 2016-02-12 10:06:51 +00:00
Colin Goodheart-Smithe ed3f7903f4 Merge branch 'master' into feature/aggs-refactoring 2016-02-12 09:48:59 +00:00
Simon Willnauer 685bee3081 Merge branch 'master' into add_rewrite_infra 2016-02-12 09:46:01 +01:00
Simon Willnauer b5aee2075f Merge pull request #16610 from s1monw/test_indices_request_cache
Refactor IndicesRequestCache to make it testable.
2016-02-12 09:27:20 +01:00
Simon Willnauer 691c5c49ed Fix registerSettingsFilterIfMissing and add unittest for settings filter registration 2016-02-12 09:25:24 +01:00
Nik Everett 821a20f582 Merge branch 'master' into feature/reindex 2016-02-11 17:41:05 -05:00
Boaz Leskes 8bc2332d9a Decouple recovery source/target logic and transport piping
The current logic for doing recovery from a source to a target shourd is tightly coupled with the underlying network pipes. This changes decouple the two, making it easier to add unit tests for shard recovery that doesn't involve the node and network environment.

On top that, RecoveryTarget is renamed to RecoveryTargetService leaving space to renaming RecoveryStatus to RecoveryTarget (and thus avoid the confusion we have today with RecoveryState).

Correspondingly RecoverySource is renamed to RecoverySourceService.

Closes #16605
2016-02-11 21:36:48 +01:00
Nicholas Knize 52ee4c7027 upgrade to lucene 5.5.0-snapshot-850c6c2 2016-02-11 14:28:50 -06:00
Nik Everett 30107b4a74 Teach reindex to stop when cancelled
All we do is check the cancelled flag and stop the request at a few key
points.

Adds the cancellation cause to the status so any request that is cancelled
but doesn't die can be seen in the task list.
2016-02-11 15:21:22 -05:00
David Pilato df50371c34 Merge branch 'pr/16477-aws-settings' 2016-02-11 19:47:43 +01:00
gmarz 4a96f4f310 Fix failing stylecheck 2016-02-11 13:09:08 -05:00
javanna 37ff6af759 environemnt -> environment 2016-02-11 18:31:21 +01:00
javanna 8045e51ff3 Corrected typos and removed unused import 2016-02-11 18:31:20 +01:00
Greg Marzouka 2304952647 Merge pull request #16516 from gmarz/fix/pipeline-aggs-meta
Set meta data for pipeline aggregations
2016-02-11 12:27:46 -05:00
Adrien Grand 70f19b2c64 Merge pull request #16589 from jpountz/feature/keyword
Add a new `keyword` field.
2016-02-11 18:23:32 +01:00
Adrien Grand bc47c577d2 Add a new `keyword` field.
The `keyword` field is intended to replace `not_analyzed` string fields. It is
indexed and has doc values by default, and doesn't support enabling term
vectors.

Although it doesn't support setting an analyzer for now, there are plans for
it to support basic normalization in the future such as case folding.
2016-02-11 18:19:53 +01:00
Simon Willnauer d04ec6eb2c Merge pull request #16176 from s1monw/make_security_non_optional
Make security non-optional
2016-02-11 17:37:48 +01:00
Adrien Grand a1e251af20 Remove the MapperBuilders utility class.
We can just call constructors directly.
2016-02-11 17:32:58 +01:00
Simon Willnauer c50586599e Make security non-optional
2.x has show so far that running with security manager is the way to go.
This commit make this non-optional. Users that need to pass their own rules
can still do this via the system configuration for the security manager. They
can even opt out of all security that way.
2016-02-11 17:11:24 +01:00
Simon Willnauer d538dd64c2 Refactor IndicesRequestCache to make it testable.
This commit moves IndicesRequestCache into o.e.indics and makes all API in this
class package private. All references to SearchReqeust, SearchContext etc. have been factored
out and relevant glue code has been added to IndicesService. The IndicesRequestCache is not a
simple class without any hard dependencies on ThreadPool nor SearchService or IndexShard. This now
allows to add unittests.
This commit also removes two settings `indices.requests.cache.clean_interval` and `indices.fielddata.cache.clean_interval`
in favor of `indices.cache.clean_interval` which cleans both caches.
2016-02-11 16:51:44 +01:00
Colin Goodheart-Smithe ca6058efab Adds validation to the Aggregator Builder implementations 2016-02-11 14:04:24 +00:00
Colin Goodheart-Smithe 4a9c84d86d Merge branch 'master' into feature/aggs-refactoring
# Conflicts:
#	core/src/main/java/org/elasticsearch/search/SearchService.java
#	test/framework/src/main/java/org/elasticsearch/search/MockSearchService.java
2016-02-11 14:04:04 +00:00
Simon Willnauer 46cab6d2ec Merge pull request #16603 from s1monw/move_cache_to_indicesservice
Move IndicesQueryCache and IndicesRequestCache into IndicesService
2016-02-11 14:21:36 +01:00
Boaz Leskes efb4582eb1 Move reminder settings in NettyHttpServerTransport to the new infra
Some bw incompatible setting changes:

http.netty.http.blocking_server -> http.tcp.blocking_server
http.netty.host (removed, we just have http.host)
http.netty.bind_host (removed, we just have http.bind_host)
http.netty.publish_host (removed, we just have http.publish_host)
http.netty.tcp_no_delay -> http.tcp.no_delay
http.netty.tcp_keep_alive -> http.tcp.keep_alive
http.netty.reuse_address -> http.txp.reuse_address
http.netty.tcp_send_buffer_size -> http.tcp.send_buffer_size
http.netty.tcp_receive_buffer_size -> http.tcp.receive_buffer_size

Closes #16531
2016-02-11 14:08:10 +01:00
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 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 0da30d5eae Merge branch 'master' into feature/reindex 2016-02-10 14:07:41 -05:00
Nik Everett 4642111bac Teach reindex to retry on rejection
And count it in the status too!
2016-02-10 13:59:17 -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
Colin Goodheart-Smithe cef9b015e8 fix merge error 2016-02-10 12:20:10 +00:00
Colin Goodheart-Smithe 1f760bd1bd Merge branch 'master' into feature/aggs-refactoring 2016-02-10 12:16:26 +00: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 e0023a6692 Remove deprecated parameter from field sort builder.
This removes the deprecated ignore_unmapped parameter from field
sort builder.

This is in preparation of #16127
2016-02-10 11:31:23 +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