3559 Commits

Author SHA1 Message Date
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