Commit Graph

3557 Commits

Author SHA1 Message Date
Simon Willnauer 142547271e Merge branch 'master' into trash_context_and_headers 2016-01-21 14:42:15 +01:00
Simon Willnauer ae48422072 Fix IngestMetadata parsing and add unittest 2016-01-21 14:19:26 +01:00
Isabel Drost-Fromm ca00808387 Merge pull request #16122 from MaineC/enhancement/15178-distance-unit-writable
Make DistanceUnit writable.
2016-01-21 14:03:39 +01:00
Isabel Drost-Fromm d2dac8427e Make distance unit writable.
Relates to #15178
2016-01-21 13:40:19 +01:00
Martijn van Groningen b61dc6d69c cleanup generics for the ingest action filters 2016-01-21 12:01:10 +01:00
Martijn van Groningen 44465c94f8 Merge remote-tracking branch 'es/master' into feature/ingest 2016-01-21 11:46:27 +01:00
Simon Willnauer eaad8924d8 Merge branch 'bring_back_node_throttle' 2016-01-21 11:31:29 +01:00
Simon Willnauer ebc9dcf0c7 Cleanup index settings updaters 2016-01-21 11:31:00 +01:00
Simon Willnauer d9422b5e89 Bring back node throttle type which was lost after index setting refactoring
This has caused some test failures lately especially on window (which is likely caused
by the rather bad performance of the windows test machines).
See one failure here:
 http://build-us-00.elastic.co/job/es_core_master_window-2008/2934/

This fix has now also a unittest that tests this issue separately.
2016-01-21 11:30:54 +01:00
Christoph Büscher 08334af189 Merge pull request #16126 from cbuescher/completionSuggestionParse-ParseFields
Suggest: Fix "analyzer" and "size" parsing and move to shared ParseFields in CompletionSuggestParser
2016-01-21 11:08:44 +01:00
Nik Everett 4a71898e09 Merge pull request #16107 from nik9000/unraw_actions
Cleanup the raw generics in ActionFilter
2016-01-20 21:54:49 -05:00
Tal Levy f1204cb1ab add an AbstractProcessor to help hold the re-used processorTag variable 2016-01-20 14:34:26 -08:00
Martijn van Groningen cdecf725f8 The nonNestedFilter should always be included if no types have been specified and
null can only be returned if there are no type or alias filter and the index has nested fields.
2016-01-20 23:16:42 +01:00
Martijn van Groningen 7914d0f940 Several MapperService cleanups:
* Cleaned up MapperService#searchFilter(...) and moved it DefaultSearchContext, since it that class was the only user. As part of the cleanup percolate query documents are no longer excluded from the search response.
* Removed resolveClosestNestedObjectMapper(...) method as it was no longer used.
* Removed DocumentTypeListener infrastructure. Before it was used by the percolator and parent/child, but these features no longer use it.

Closes #15924
2016-01-20 22:26:56 +01:00
Tal Levy 437fe6c056 make DeDotProcessor's constructor package-private 2016-01-20 12:12:40 -08:00
Jason Tedor bd1eefa5be Revert temporary compiler bug workaround
This reverts commit df5f1b1ee9.

Closes #16097
2016-01-20 14:37:12 -05:00
Jason Tedor 22318cb7e4 Remove import in IndicesClusterStateService.java
This commit removes an unused import from
o/e/i/c/IndicesClusterStateService.java.
2016-01-20 13:18:37 -05:00
Christoph Büscher 1550d0f013 Switch to using RescoreBuilder in SearchSourceBuilder 2016-01-20 19:09:02 +01:00
Christoph Büscher 428043700d RescoreBuilder: Add parsing and creating of RescoreSearchContext
Adding the ability to parse from xContent to the rescore builder.
Also making RescoreBuilder an interface and renaming the current
base builder that encapsulates the `window_size` setting the the
concrete rescorer implementation to RescoreBaseBuilder.
2016-01-20 18:45:54 +01:00
Martijn van Groningen b9dc5acf2c Cleanup ParentFieldMapper:
* Remove remaining 1.x bwc logic.
* Stop storing stored fields and indexed terms. The _parent field's only purpose is to support joins between parent and child type and only storing doc values is sufficient.
* In the mapping the parent field mapper is now known under '{parent}#{child}' key, because this is the field the parent/child join uses too.
* Added new sub fetch phase to lookup that _parent field from doc values field if that is required (before this was fetched from stored _parent field)
* Removed the ability to query directly on `_parent` in the query dsl. Instead the `{parent}#{child}` field should be used. Under the hood a doc values query is used instead of a term query, because only doc values fields are stored now.
* Added a new `parent_id` query to easily query child documents with a specific parent id without having to know what join field to use
* Also in aggregations `_parent` field can't be used any more and `{parent}#{child}` field name should be used instead to aggregate directly on the _parent join field.
2016-01-20 16:56:22 +01:00
Martijn van Groningen d2c608e1a8 fix test bug 2016-01-20 16:51:27 +01:00
Martijn van Groningen e4a142f792 added constructors for the required parameters and removed the body of all validate methods 2016-01-20 16:40:10 +01:00
Yannick Welsch 303b430480 Merge pull request #16096 from ywelsch/feature/prefer-previous-primary
Prefer nodes that previously held primary shard for primary shard allocation
2016-01-20 16:32:55 +01:00
Martijn van Groningen faf9ca2122 brought back the body of the validate() methods. This is still useful if no setter has been invoked. 2016-01-20 16:02:10 +01:00
Martijn van Groningen b0c7096e2f changed delete pipeline request to getters and setters in right format and validate the provided id in the setId(...) method 2016-01-20 16:00:44 +01:00
Martijn van Groningen f546b27ea0 removed the ClusterService constructor dependency from PipelineStore 2016-01-20 15:55:24 +01:00
Martijn van Groningen fd31d6afdf Let NodeService implement closable and let NodeService delegate to IngestService 2016-01-20 15:46:48 +01:00
Martijn van Groningen 977bbaba02 fixed various small comments 2016-01-20 15:44:32 +01:00
Martijn van Groningen 7aeb360932 use AbstractRunnable 2016-01-20 15:26:37 +01:00
Christoph Büscher 5ce14cc356 Fixing small issues and using ParseFields in CompletionSuggestParser 2016-01-20 15:20:38 +01:00
Martijn van Groningen 9fe408adbd use ActionListenerResponseHandler 2016-01-20 15:13:27 +01:00
Martijn van Groningen 136e0fe1af remove parsing logic with ObjectParser 2016-01-20 15:03:58 +01:00
Simon Willnauer f6db00fd33 push feedback from mr. regex optimizer 2016-01-20 14:19:29 +01:00
Martijn van Groningen 5eaaa95c61 address SimulatePipelineRequest comments 2016-01-20 14:16:41 +01:00
Martijn van Groningen 2645fc9145 renamed SimulateDocumentSimpleResult to SimulateDocumentBaseResult and added jdocs 2016-01-20 14:11:45 +01:00
Simon Willnauer 0941604919 Validate the settings key if it's simple chars separated by `.`
This adds additional safety to the settings since we don't have a full list of them
yet and it caught bugs already in tests.
2016-01-20 14:03:10 +01:00
Martijn van Groningen 8b520111d0 fix PutPipelineRequest comments 2016-01-20 14:00:55 +01:00
Martijn van Groningen f7024bc4dd maintain a list of ingest nodes in the cluster state instead of creating it on the spot 2016-01-20 13:55:26 +01:00
Martijn van Groningen c663aa0dec addressed IngestProxyActionFilter comments 2016-01-20 13:44:27 +01:00
Martijn van Groningen 8a7f3d9d6f addressed various comments 2016-01-20 13:35:15 +01:00
Simon Willnauer 054465287e Don't guard IndexShard#refresh calls by a check to isRefreshNeeded
While conceptually correct this call can be confusing since if a
realtime GET is exectued after refresh is called with realtime=true it might
fetch the wrong document out of the translog since the isRefreshNeeded guard
might return false once the new searcher is published but it will not
wait until the verision map is flushed and that can cause a slight race condition
if a subsequent call GETs a document that it expects to come from the index.

Ie. the `_size` mapper tests do this and expecte the GET call to return the document
from the index but it comes from the t-log due to this race.

This change only uses the guard in an async refresh that we schedule to prevent unnecessary
refresh calls but will allow API Refresh calls to have the somewhat less confusing semantics.

This was introduces lately only on unrelease major version branches.
2016-01-20 11:42:04 +01:00
Martijn van Groningen e383e96f58 replaced custom PipelineMissingException with ResourceNotFoundException 2016-01-20 11:40:17 +01:00
Robert Muir ebe3fd2825 Merge pull request #16114 from rmuir/lucene_1725675
Update lucene to r1725675
2016-01-20 05:04:01 -05:00
Yannick Welsch 1eb8d5bd6f Prefer nodes that previously held primary shard for primary shard allocation 2016-01-20 11:02:19 +01:00
Simon Willnauer 1e37e0f921 fix naming Tests -> IT since it's an integ test 2016-01-20 09:50:08 +01:00
Simon Willnauer 0ddbfb25a6 Fix JavaDoc comment 2016-01-20 09:46:36 +01:00
Simon Willnauer 5374bd8e34 Merge branch 'master' into trash_context_and_headers 2016-01-20 09:40:03 +01:00
Simon Willnauer f5b68cd0c0 Merge pull request #16101 from s1monw/client_wrapper_for_test_cluster
Add infrastructure to wrap/filter all clients exposed by the test clusters
2016-01-20 09:34:14 +01:00
Robert Muir 6e7e3a2274 Update lucene to r1725675
Adds DFI (divergence from independence) provider.
Fixes test bugs passing invalid values for BM25 parameters.
2016-01-20 03:32:51 -05:00
Nik Everett 9e3e024358 Cleanup the raw generics in ActionFilter
Mostly these were pretty easy to clean up by insisting that the request
and response stays consistent across the filter. There are a few places
where we have to make assumptions in tests but those are valid assumptions
for the test.
2016-01-19 21:53:47 -05:00
Martijn van Groningen e2e207687d Fixes due to changes in master branch. 2016-01-19 22:03:26 +01:00
Martijn van Groningen 602a0f183e Merge remote-tracking branch 'es/master' into feature/ingest 2016-01-19 22:01:38 +01:00
Simon Willnauer 9117a8d500 fix threadpool visibility to be consisten with others 2016-01-19 21:07:43 +01:00
Simon Willnauer 11cf717e44 apply feedback from @jaymode
This adds the ability to filter clients multiple times and allows to inherit the outer context if done so.
This also adds a method to access all tasks in the threadpool in an unwrapped fashion
2016-01-19 21:03:46 +01:00
Simon Willnauer 3d0cedbabb Merge branch 'master' into trash_context_and_headers 2016-01-19 20:47:43 +01:00
Christoph Büscher df5f1b1ee9 Fix compilation issue with final assignment in lambda on windows jdk
Relates to #16097
2016-01-19 20:25:46 +01:00
Simon Willnauer eb498282dd Add infrastructure to wrap/filter all clients exposed by the test clusters.
This commit allows an integ test to wrap all clients that are exposed by the
InternalTestCluster which is useful for request interception or to add general headers
to request or to intercept client to server call even if the client calls are done from within
the test framework.
2016-01-19 20:12:47 +01:00
Nik Everett e1e73d9914 Create default for ExecutableScript#unwrap
Tons of scripts just return the variable they are passed and that is the
most intuitive behavior so that may as well be the default implementation.
2016-01-19 13:17:11 -05:00
Simon Willnauer da699ceae2 Merge pull request #16095 from s1monw/use_updated_settings_for_transport_client
TransportClient should use updated setting for initialization of modules and service
2016-01-19 18:03:47 +01:00
Simon Willnauer efece285d3 TransportClient should use updated setting for initialization of modules and service
Today the TransportClient uses the given settings rather than the updated setting from the plugin
service to pass on to it's modules etc. It should use the updates settings instead.
2016-01-19 17:35:38 +01:00
Jason Tedor 98f9222fff Log master node when sending shard state action 2016-01-19 11:31:13 -05:00
Jim Ferenczi b9f1c7242c Add explanation about minimum should match and coordination factor 2016-01-19 16:04:09 +01:00
Simon Willnauer 2d4d1a943b Merge pull request #16091 from s1monw/check_node_level_settings
Validate known global settings on startup
2016-01-19 16:01:53 +01:00
Simon Willnauer bc5d6cdff5 Validate known global settings on startup
Today we already validate all index level setting on startup. For global
settings we are not fully there yet since not all settings are registered.
Yet we can already validate the ones that are know if their values are parseable/correct.
This is better than nothing and an improvement to what we had before. Over time there will
be more an dmore setting converted and we can finally flip the switch.
2016-01-19 15:25:19 +01:00
Jim Ferenczi 12df1e7a6f Merge pull request #16078 from jimferenczi/mss_synonym
Do not apply minimum-should-match on a boolean query if the coords are disabled
2016-01-19 15:07:32 +01:00
Jim Ferenczi 9b1daff9b5 Do not apply minimum-should-match on a boolean query if the coords are disabled.
Fixes #15858
2016-01-19 14:50:01 +01:00
Isabel Drost-Fromm e7aae1b79e Merge pull request #16085 from MaineC/bug-fix/random-fuzziness-date
Fix for MatchQueryBuilderTests.testToQuery random fuzziness generation caused test failure.

Relates to #13284
2016-01-19 13:26:44 +01:00
Jason Tedor 089a7a321c Merge pull request #16041 from jasontedor/shard-started-channel-failures
Add handling of channel failures when starting a shard
2016-01-19 07:05:45 -05:00
Jason Tedor b7c1847c41 Add logging statement on shard state request send
This commit restores a debug-level logging statement when sending shard
state requests to the master node.
2016-01-19 06:59:42 -05:00
Isabel Drost-Fromm 3adeac149d Fix random fuzziness generation.
For all query testing we offer the option to initialise them with random
fuzziness objects. So far there is a chance to generate an edit distance based
fuzziness for non-string fields. This is fixed by this change.

Fixes the following test failure:

http://build-us-00.elastic.co/job/es_core_master_small/6606/testReport/junit/org.elasticsearch.index.query/MatchQueryBuilderTests/testToQuery/
2016-01-19 12:45:02 +01:00
Simon Willnauer 5a64f08f04 Merge pull request #16054 from s1monw/new_index_settings
Cut over all index scope settings to the new setting infrastrucuture

This change moves all index.* settings over to the new infrastructure. This means in short that:

 - every setting that has an index scope must be registered up-front
 - index settings are validated on index creation, template creation, index settings update
 - node level settings starting with index.* are validated on node startup
 - settings that are private to ES like index.version.created can only be set by tests when they install a specific test plugin.
 - all index settings can be reset by passing null as their value on update
 - all index settings defaults can be listed via the settings APIs

Closes #12854
Closes #6732
Closes #16032
Closes #12790
2016-01-19 12:26:46 +01:00
Simon Willnauer bd37ba22e3 Merge branch 'master' into new_index_settings 2016-01-19 12:11:57 +01:00
Yannick Welsch d5b691b68e Extend reroute with an option to force assign stale primary shard copies
Closes #15708
2016-01-19 12:07:01 +01:00
Jason Tedor ac237b269c Add handling of channel failures when starting a shard
This commit adds handling of channel failures when starting a shard to
o.e.c.a.s.ShardStateAction. This means that shard started requests
that timeout or occur when there is no master or the master leaves
after the request is sent will now be retried from here. The listener
for a shard state request will now only be notified upon successful
completion of the shard state request, or when a catastrophic
non-channel failure occurs.

This commit also refactors the handling of shard failure requests so
that the two shard state actions of shard failure and shard started
now share the same channel-retry and notification logic.
2016-01-19 05:31:26 -05:00
Yannick Welsch 6ca79095df Allow changing nested fields limit for open indices 2016-01-19 10:55:11 +01:00
Simon Willnauer fa0e1488aa Merge branch 'master' into new_index_settings 2016-01-19 10:50:11 +01:00
Simon Willnauer f2311fd8b3 register index.mapping.nested_fields.limit 2016-01-19 10:49:49 +01:00
Jason Tedor 296ab3ec16 Fix transport exceptions for shard state actions
This commit fixes an issue in the handling of TransportExceptions in
ShardStateAction. There were two cases not being handled correctly.
 - when the local node is shutting down, handlers will be notified with
   a TransportException with a message starting "transport stopped"
 - when the remote node disconnects, handlers will be notified with a
   NodeDisconnectedException

In both of these cases, the cause of the exception will be null and this
was incorrectly being handled. The first case can passed to the listener
like any other critical non-channel failure, and the second case can be
handled by modifying the logic for detecting master channel exceptions.

There was a third case of NodeNotConnectedException that was not being
treated as a master channel exception but should be.

This commit adds an integration test that simulates the handling of a
shard failure request during a network partition. By isolating the
master from the cluster while a shard failed request is in flight, this
test simulates that we wait until a new master is elected and then retry
sending that shard failed request to the newly elected master.

This commit adds methods to CapturingTransport to separate local and
remote transport exceptions. The motivation for this change is that
local transport exceptions are delivered to listeners (usually, but not
always) wrapped in SendRequestTransportException while remote transport
exceptions are delivered to listeners wrapped in
RemoteTransportException. By making this distinction clear in the
CapturingTransport, this makes it less likely that tests will make
incorrect assumptions about the exceptions coming out of the transport
layer to listeners.

Closes #16057
2016-01-19 10:43:50 +01:00
Simon Willnauer 0066fc9d5f Merge branch 'master' into new_index_settings 2016-01-19 10:42:25 +01:00
Yannick Welsch fc4e8fd937 Merge pull request #15989 from ywelsch/feature/limit-nested-fields
Add per-index setting to limit number of nested fields
2016-01-19 10:33:09 +01:00
Simon Willnauer fbfa9f4925 Merge branch 'master' into new_index_settings 2016-01-19 10:13:48 +01:00
Yannick Welsch a1b8dd2de9 Add per-index setting to limit number of nested fields
Closes #14983
2016-01-19 10:03:48 +01:00
Isabel Drost-Fromm 3b27dce94f Merge pull request #16056 from MaineC/bug-fix/15860
Fix for MatchQueryBuilderTests.testToQuery test failure

Relates to #15860
2016-01-19 09:57:46 +01:00
Simon Willnauer b73c737608 apply feedback from @nik9000 2016-01-19 09:54:00 +01:00
Simon Willnauer 8e0390b09e Register index.version_created for several analysis plugin tests 2016-01-19 09:35:32 +01:00
Adrien Grand b2baf039fd Fix compilation. 2016-01-19 09:32:04 +01:00
Adrien Grand a90d2fa0b4 Merge pull request #16023 from jpountz/fix/implicit_self_conflict
Reuse metadata mappers for dynamic updates.
2016-01-19 09:28:04 +01:00
Adrien Grand d6cbd6f2f0 Merge pull request #16059 from jpountz/enhancement/mapping_merge_reason
Expose the reason why a mapping merge is issued.
2016-01-19 09:27:32 +01:00
Boaz Leskes a90b551e36 Translog: remove ChannelReference and simplify Views
Currently we use ref counting to manage the life cycles of a translog file. This was done to allow the creation of view and snapshots, making sure that the underlying files are available. This commit takes a simpler route based on the observation that a snapshot doesn't need to have it's own life cycle but rather can lift on the lifecycle of it's parent (translog or view). If code failes to adhere to this assumption it will get a channel already closed exception. As such, each file is now owned by a single owner and there is no need for reference counting. As part of the rewrite TranslogReader is renamed to  BaseTranslogReader and ImmutableTranslogReader to TranslogReader

Also, I took the opportunity to clean up legacy translog readers we don't need in master.

Closes #15898
2016-01-19 09:05:26 +01:00
Igor Motov d9a01225cb Transport actions should make started tasks available to their callers
Sometimes action callers might be interested in having an access to the task that they have just initiated. This changes allows callers to get access to the Task object of the actions that they just started if the action supports the task management.
2016-01-18 21:29:23 -05:00
Jason Tedor b6c9eaa24a Merge pull request #16068 from jasontedor/ip-field-mapper-term-queries
Single IPv4 addresses in IP field term queries

Closes #16058
2016-01-18 17:46:50 -05:00
Jason Tedor de992877b8 Single IPv4 addresses in IP field term queries
This commit modifies IpFieldMapper#termQuery to permit single IPv4
addresses for use in match and query_string queries.
2016-01-18 17:44:28 -05:00
Nik Everett 63090f5d4b Merge pull request #15761 from nik9000/more_remove_inject
Don't use guice for QueryParsers
2016-01-18 17:39:53 -05:00
Nik Everett 093600cd63 Cleanup ContextAndHeaderTransportTests
We have two similar tests with the same name, ContextAndHeaderTransportTests.
They shared lots of common code so I extracted much of it into
ActionRecordingPlugin, a plugin which records all action requests for later
inspection.

I also removed all the warnings from both tests. That made lang-mustache
compile cleanly without any custom -Xlint so I removed those. To remove
the warnings I had to add type parameters to ActionFilter which seemed
like a good idea anyway.
2016-01-18 16:14:58 -05:00
Jason Tedor e62221168e No load average if the values are meaningless
This commit modifies the presentation of load average to not be present
in the response if all of the values are meaningless.
2016-01-18 15:11:47 -05:00
Jason Tedor f5b72b0714 Load average on Windows is never available
Since load average is never available on Windows, this commit modifies
the handling of load average there to just always return null.
2016-01-18 15:11:47 -05:00
Jason Tedor d55952a90d Tigthen load average test assertions
This commit tightens the load average test assertions by separating out
OS X as a system where we can make tighter assertions about the load
average values.
2016-01-18 15:11:47 -05:00
Jason Tedor e5013d16f0 Fix test for load average on FreeBSD
This commit fixes the test for load averages on FreeBSD. On FreeBSD, it
is either the case that linprocfs is mounted at /compat/linux/proc in
which case the load averages are available, or this is not the case and
no load average are available. Previously, the test on FreeBSD was
falling back to the catch all case which asserts that the five-minute
and fifteen-minute load averages are not available.
2016-01-18 15:11:43 -05:00
Jason Tedor 2aa94a5133 Normalize unavailable load average
This commit normalizes the one-minute load average obtained from
OperatingSystemMXBean#getSystemLoadAverage to -1 when it is not
available. This is to reflect the Javadocs for this method saying "If
the load average is not available, a negative value is returned."
2016-01-18 15:09:08 -05:00
Nik Everett 15c43b64a1 Don't use guice for QueryParsers
1. Gets guice out of the business of building ScoreFunctionParsers and
QueryParsers.
2. Moves QueryParser registration to SearchModule
3. Moves NamedWriteableRegistry construction out of guice and into Node and
TransportClient.
4. Moves shape registration into SearchModule so now all named writeable
registration is done in the SearchModule.

This is breaking for plugin authors. Instead of declaring new QueryParser
like:

```java
public void onModule(IndicesModule module) {
  module.registerQueryParser(NewQueryParser.class);
}
```

you do it like:

```java
public void onModule(SearchModule module) {
  module.registerQueryParser(NewQueryParser::new);
}
```

The QueryParser's argument no longer come from @Inject, now they come from
the declaration in the plugin. The above example is for a no-arg QueryParser.
Most of the QueryParsers in Elasticsearch are no-arg.

ScoreFunctionParsers have a similar but slightly different change. This:

```java
public void onModule(SearchModule module) {
  module.registerFunctionScoreParser(NewFunctionScoreParser.class);
}
```

becomes

```java
public void onModule(SearchModule module) {
  module.registerFunctionScoreParser(new NewFunctionScoreParser());
}
```

Since all known ScoreFunctionParsers have no arg constructors its simpler to
just build them at registration time rather than specify a supplier that is
used to build them later.
2016-01-18 15:02:47 -05:00
Jason Tedor 3be12ed9fd Merge pull request #15932 from jasontedor/load-average-format
Modify load average format

Relates #15907
2016-01-18 11:59:19 -05:00
Jason Tedor df598e8129 Modify load average formats
This commit modifies the load_average in the node stats API response
to be an object containing the one-minute, five-minute and
fifteen-minute load averages as fields (if those values are
available). Additionally, this commit modifies the cat nodes API
response to format the one-minute, five-minute and fifteen-minute load
averages as null if any of the respective values are not available.
2016-01-18 11:41:34 -05:00
Adrien Grand 055953d6b3 Expose the reason why a mapping merge is issued.
This would be useful in order to only perform some validations in the case of
a mapping update and in cases when a mapping is restored eg. after a restart,
such as discussed in #15989.

This replaces the current `applyDefault` parameter which can be derived from
the mapping merge reason: the default mapping should be applied only in case of
a mapping update, if the mapping does not exist yet and if this is not the
default mapping.
2016-01-18 17:41:23 +01:00
Christoph Büscher fcf3bc213d Tests: Reduce number of random runs for shape builder tests 2016-01-18 16:27:30 +01:00
Nik Everett 491d776f65 Merge pull request #16047 from nik9000/unraw_3
Remove some raw warnings from settings
2016-01-18 10:00:44 -05:00
Nik Everett d1a2bee1e3 Merge pull request #16048 from nik9000/unraw_4
Remove lots of raw from aggregations
2016-01-18 09:57:00 -05:00
Nik Everett 01f37226ab Push an unchecked cast until its really safe 2016-01-18 09:55:56 -05:00
Nik Everett bfcffa2a00 Merge pull request #16027 from nik9000/shard_core_key_map_closed
Handle closed readers in ShardCoreKeyMap
2016-01-18 09:16:10 -05:00
Nik Everett 1e251bba2d Merge pull request #16046 from nik9000/unraw_2
Squash more raw type warnings
2016-01-18 09:15:21 -05:00
Isabel Drost-Fromm d531146b90 Fixes test failure with numeric range query. 2016-01-18 15:14:42 +01:00
Simon Willnauer c2e8ba8970 Register index.version_created on unittest that set it 2016-01-18 15:04:35 +01:00
Simon Willnauer 7c55241ca0 Merge branch 'master' into new_index_settings 2016-01-18 14:46:40 +01:00
Simon Willnauer a3a7b14efd [TEST] fix error message assertion 2016-01-18 14:45:46 +01:00
Simon Willnauer dce29d29c0 Normalize template index settings before validating 2016-01-18 14:39:21 +01:00
Simon Willnauer 3e6018fedb add back lcuene_default as a valid setting for our tests to work out of the box 2016-01-18 13:23:24 +01:00
Simon Willnauer b5c326023f also allow other lucene codecs to be loaded 2016-01-18 13:17:07 +01:00
Martijn van Groningen 7c8a1ecf37 test: added todo 2016-01-18 13:17:01 +01:00
Martijn van Groningen 62089539db s/processorId/processorTag 2016-01-18 13:11:46 +01:00
Martijn van Groningen c7d220330d added note to jdocs that this exception should never get serialzed 2016-01-18 13:09:10 +01:00
Simon Willnauer 5dc3e721e0 fix test 2016-01-18 13:03:19 +01:00
Simon Willnauer 04bbc5b83c also allow lucene_default as a valid codec 2016-01-18 13:02:28 +01:00
Simon Willnauer b7c0ac6ad6 Add test to ensure templates don't accept invalid index values 2016-01-18 13:00:10 +01:00
Simon Willnauer e52a873d1a Restrict index.codec to default and best_compression 2016-01-18 12:59:42 +01:00
Simon Willnauer 9562fb76bc expose default settings via rest API 2016-01-18 12:48:47 +01:00
Martijn van Groningen 328c375970 test: removed forgotten AwaitsFix annotations 2016-01-18 11:59:57 +01:00
Alexander Reelsen 2b0c036b99 Tests: Ensure termvector is not fetched from translog
Setting realTime to false in the get term vector request ensures,
that after a refresh the document is not fetched from the translog,
which seems to yield different in rare test runs.

The change likely triggering this was introduced in #15933
2016-01-18 10:18:43 +01:00
Simon Willnauer a61723b538 convert index.store.fs.fs_lock 2016-01-18 10:17:11 +01:00
Simon Willnauer 13e5547537 Add REST tests for reset index settings and for listing defaults. 2016-01-18 10:02:37 +01:00
Simon Willnauer 651819ca6c Add validation of index settings passed via cmd and elasticsearch.yaml
From this commit on we also validate all settings starting with `index.` that are
node-level settings configured in yaml files or via commandline arguments or system properties.
This check happens on node startup before the actual node is started.
2016-01-18 09:41:03 +01:00
Simon Willnauer ef9ef0c47a make get(Setting) fallback to node settings 2016-01-18 09:23:35 +01:00
Simon Willnauer cc25c4c8be don't validate query cache types - they can be customized 2016-01-18 09:23:35 +01:00
Simon Willnauer 7925e2ef84 convert IndexModule settings 2016-01-18 09:23:35 +01:00
Simon Willnauer 3567daa9c8 add ability to reset index settings to it's default 2016-01-18 09:23:35 +01:00
Simon Willnauer 79f4697f3e Register MockFSDirectoryService settings 2016-01-18 09:23:34 +01:00
Simon Willnauer dbe76fb59b Fix UpdateSettingsIT and IndicesOptionsIntegrationIT to register strict settings 2016-01-18 09:23:34 +01:00
Simon Willnauer 359475fb0d fix some more sneaky failures 2016-01-18 09:23:34 +01:00
Simon Willnauer a8eedd0457 fix all kinds of crazy test failures 2016-01-18 09:23:34 +01:00
Simon Willnauer cb0ea70b9d fix error message 2016-01-18 09:23:34 +01:00
Simon Willnauer 2eecb9c02d add tests for AutoExpandReplicas 2016-01-18 09:23:33 +01:00
Simon Willnauer 8a4fca2947 make all unittests pass 2016-01-18 09:23:33 +01:00
Simon Willnauer 0b870c9869 paths is now the empty space by default 2016-01-18 09:23:33 +01:00
Simon Willnauer 04045a072f First steps of integrating converted settings into the cluster/index settings infrastructure
The old infa has been removed in this commit such that nothing uses `DynamicSettings` anymore
and all index-scoped settings require to be registered before the node has fully started up.
2016-01-18 09:23:33 +01:00
Simon Willnauer 6fe6c25fad first cut at integrating new settings infra 2016-01-18 09:23:33 +01:00
Britta Weber 0b59b12801 convert reclaim_deletes_weight and remove superfluous methods 2016-01-18 09:23:33 +01:00
Britta Weber b161e8cdb5 convert segments_per_tier 2016-01-18 09:23:32 +01:00
Britta Weber 1f0ab58790 convert max_merged_segment 2016-01-18 09:23:32 +01:00
Simon Willnauer 14527ed2d5 use a valid default 2016-01-18 09:23:32 +01:00
Simon Willnauer eb7012101a convert all setting in IndexMetaData 2016-01-18 09:23:32 +01:00
Britta Weber 7e5e93c73a convert max_merge_at_once_explicit 2016-01-18 09:23:32 +01:00
Britta Weber 59d7adfb59 convert max_merge_at_once 2016-01-18 09:23:32 +01:00
Britta Weber 59725315a6 convert merge.policy.floor_segment 2016-01-18 09:23:32 +01:00
Britta Weber cf70761abf we assume from now on that settings are reset if we pass empty settings 2016-01-18 09:23:32 +01:00
Simon Willnauer abfef7aa73 convert index allocation filtering 2016-01-18 09:23:31 +01:00
Britta Weber f7785dceb8 convert expunge_deletes_allowed 2016-01-18 09:23:31 +01:00
Britta Weber 5b0b57c97a remove unused noCFSRatio 2016-01-18 09:23:31 +01:00
Britta Weber a9ff6bc405 convert compound_format 2016-01-18 09:23:31 +01:00
Simon Willnauer c702fbd29b convert all slow logs 2016-01-18 09:23:31 +01:00
Britta Weber c4a019d93d convert translog.flush_threshold_size 2016-01-18 09:23:31 +01:00
Simon Willnauer cdae4945a6 add unittest for indexing slow log settings 2016-01-18 09:23:31 +01:00
Simon Willnauer 3599585aa7 cut over indexing slow log 2016-01-18 09:23:30 +01:00
Simon Willnauer 69e95deb47 convert index.ttl.disable_purge 2016-01-18 09:23:30 +01:00
Simon Willnauer 2e1bc1ea44 cut over index.routing.rebalance.enable and index.routing.allocation.enable 2016-01-18 09:23:30 +01:00
Simon Willnauer 7db3a7fea9 register missing setting 2016-01-18 09:23:30 +01:00
Simon Willnauer 0bef73269a cut over index.unassigned.node_left.delayed_timeout 2016-01-18 09:23:30 +01:00
Britta Weber 8e2e749230 convert gc_deletes 2016-01-18 09:23:30 +01:00
Simon Willnauer cfffa48d91 converted index.routing.allocation.total_shards_per_node 2016-01-18 09:23:30 +01:00
Simon Willnauer 3902ea439d convert index.max_result_window 2016-01-18 09:23:29 +01:00
Britta Weber 3512bea105 convert refresh interval 2016-01-18 09:23:29 +01:00
Simon Willnauer 60be834902 convert index.warmer.enabled 2016-01-18 09:23:29 +01:00
Simon Willnauer b7b104a585 convert index.translog.durability 2016-01-18 09:23:29 +01:00
Simon Willnauer da0424c75f Convert index level setting to the new setting infrastrucutre
this is an initial commit of cutting over simple string key based settings
to a more contained scoped settings infrastructure.
2016-01-18 09:23:29 +01:00
Nik Everett 9e08a0d024 Remove lots of raw from aggregations
These are the simple to remove raw type warnings from aggregations and a few
other nearby bits of code.
2016-01-17 22:29:50 -05:00
Nik Everett b14371bd22 Remove some raw warnings from settings
Also sneaks in a couple of javadocs and one early return that I think makes
the method easier to read.
2016-01-17 21:43:47 -05:00
Nik Everett 57af014510 Zap another few raw types warnings
Mostly these come from QueryBuilder. Mostly these are fixed by just using <?>
instead of the raw type.
2016-01-17 21:28:39 -05:00
Nik Everett 742e1da857 Squash more raw type errors
Its a long string to pull
2016-01-17 17:07:32 -05:00
Jason Tedor 69b21feb3b Merge pull request #15748 from jasontedor/shard-failure-no-master-retry
Wait for new master when failing shard

Relates #14252
2016-01-17 10:50:58 -05:00
Jason Tedor 386d2ab86a More tightening of shard state action tests
This commit adds some additional assertions that test success is not
falsely indicated by adding assertions that success / failure methods
are not incorrectly invoked in failure / success scenarios.
2016-01-17 10:36:24 -05:00
Ryan Ernst 3b78267c71 Plugins: Remove site plugins
Site plugins used to be used for things like kibana and marvel, but
there is no longer a need since kibana (and marvel as a kibana plugin)
uses node.js. This change removes site plugins, as well as the flag for
jvm plugins. Now all plugins are jvm plugins.
2016-01-16 22:45:37 -08:00
Jason Tedor 3d329e3ba0 Add real clock test for age of PrioritizedRunnable
This commit adds a test for calculating the age of PrioritizedRunnable
that allows real clock time to elapse. The test ensures that at least
one millisecond has passed, and that the resolution of System#nanoTime
on the underlying system is actually able to detect this.

Relates #15995
2016-01-16 19:01:25 -05:00
Tal Levy 9f48df9736 Add on_failure support for verbose _simulate execution and introduce optional processor_tag to Processors 2016-01-15 14:56:20 -08:00
Jason Tedor cf3c0ed049 Sanity assertion that exception cause is not null
This commit adds a sanity assertion that the cause of a transport
exception when sending a shard failure is not null.
2016-01-15 16:52:04 -05:00
Jason Tedor b4538a5676 Avoid periodic object allocations in IndexService
This commit wraps a trace logging message in a trace logging level check
to prevent allocating an Object array (to hold the logging parameters)
and a String (from the interval) when trace logging is not enabled every
second (with the default index refresh interval) and every five seconds
(with the default translog sync interval) for every open index when
trace logging is not enabled.
2016-01-15 15:14:09 -05:00
Tal Levy 1754eece66 introduce DeDotProcessor
fixes #15944.
2016-01-15 11:35:18 -08:00
Jason Tedor a7185a1d31 Simplify equality test in IndexShard#sameException
This commit simplifies an equality test in IndexShard#sameException
where the messages for two exceptions are being compared. The previous
condition first tested logical equality if the left exception is not
null, and otherwise tested reference equality. There is a convenience
method since JDK 7 for testing equality in this way: Objects#equals.

Closes #16025
2016-01-15 14:19:47 -05:00
Nik Everett 3896457d84 Handle closed readers in ShardCoreKeyMap
Fixes an issue caused by trying to add a LeafReader for a closed index to
ShardCoreKeyMap. It add itself to the map half way before throwing
AlreadyClosedException, leaking some references and causesing Elasticsearch
to refuse to shut down cleanly when testing.
2016-01-15 14:06:16 -05:00
Britta Weber abc8c02bed check that busy waiting does not time out and fix replica counter test 2016-01-15 18:46:18 +01:00
Jason Tedor 7eefcbbeed Add retry loop in shard state action tests
This commit enhances the master channel exception test in
o.e.c.a.s.ShardStateActionTests to test that a retries loop as expected
when requests to the master repeatedly fail.
2016-01-15 11:26:32 -05:00
Adrien Grand 59742ee0a4 Reuse metadata mappers for dynamic updates.
When a metadata mapper is not specified in a mapping update, it should default
to the current metadata mapper instead of the general default in order for the
update to not conflict with the current mapping.

Closes #15997
2016-01-15 17:14:51 +01:00
Nik Everett 7745c64a62 Merge pull request #15894 from nik9000/fix_blended_terms_2
Fix blended terms take 2
2016-01-15 09:54:58 -05:00
Nik Everett 50098bfb2c Fix blended terms for non-strings take 2
It had some funky errors, like lenient:true not working and queries with
two integer fields blowing up if there was no analyzer defined on the
query. This throws a bunch more tests at it and rejiggers how non-strings
are handled so they don't wander off into scary QueryBuilder-land unless
they have a nice strong analyzer to protect them.
2016-01-15 09:53:31 -05:00
Jason Tedor fe39d11c55 Logging in shard state action
This commit adds a trace log on a cluster state update while waiting for
a new master, and changes the log level on cluster service close to the
warn level.
2016-01-15 09:45:39 -05:00
Jason Tedor efb142613f Tighten shard state action tests
This commit tightens the tests in o.e.c.a.s.ShardStateActionTests:
 - adds a simple test for a success condition that validates the shard
   failed request is correct and sent to the correct place
 - remove redundant assertions from the no master and master left tests
 - an assertion that success is not falsely indicated in the case of a
   unhandled error
2016-01-15 09:28:25 -05:00
javanna 050585e89f remove BiFunction<Environment, TemplateService, Processor.Factory> in favour of Function<TemplateService, Processor.Factory>
the environment is now available through NodeModule#getNode#getEnvironment and can be retrieved during onModule(NodeModule), no need for this indirection anymore using the BiFunction
2016-01-15 15:12:53 +01:00
javanna d2eda422cf expose node in NodeModule and Environment in Node 2016-01-15 14:25:43 +01:00
Jason Tedor aa28133865 Merge pull request #15995 from jasontedor/prioritized-runnable-age
Fix calculation of age of pending tasks

Closes #15988
2016-01-15 08:01:50 -05:00
Jason Tedor ba8ad9c2b7 Fix calculation of age of pending tasks
This commit addresses a time unit conversion bug in calculating the age
of a PrioritizedRunnable. The issue was an incorrect conversion from
nanoseconds to milliseconds as instead the conversion was to
microseconds. This leads to the timeInQueue metric for pending tasks to
be off by three orders of magnitude.
2016-01-15 07:58:50 -05:00
Martijn van Groningen f8bb06a664 renamed variables 2016-01-15 13:35:06 +01:00
Martijn van Groningen 21cc0b2316 Cleanup ingest initialization code.
* Folded IngestModule into NodeModule
* Renamed IngestBootstrapper to IngestService
* Let NodeService construct IngestService and removed the Guice annotations
* Let IngestService implement Closable
2016-01-15 13:35:06 +01:00
Adrien Grand 0806190d1a Merge pull request #15998 from jpountz/fix/filter_agg_creates_meights_once
Filter(s) aggregation should create weights only once.
2016-01-15 10:25:51 +01:00
javanna 9c06736dbd Merge branch 'master' into feature/ingest 2016-01-15 10:11:56 +01:00