Commit Graph

19485 Commits

Author SHA1 Message Date
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
Simon Willnauer 20fe8ac854 Register index.version.created in Kuromoji unittest since it's a node level setting here 2016-01-19 09:14:41 +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
Ryan Ernst 8bf8ca6222 Fix rest tests to use ip and port again instead of localhost and port. 2016-01-18 19:28:41 -08: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
Nik Everett 53cce3c399 Merge pull request #16071 from nik9000/xlint_lang_groovy
Remove Xlint from lang-groovy and discovery-azure
2016-01-18 21:06:11 -05:00
Ryan Ernst 69e11d1e88 Merge pull request #16070 from rjernst/rest_alone
Test: Make rest test framework accept http directly for the test cluster
2016-01-18 17:38:23 -08:00
Ryan Ernst d7537075d6 Add TODO for splitting rest tests from client tests. 2016-01-18 16:59:42 -08:00
Ryan Ernst ef4f0a8699 Test: Make rest test framework accept http directly for the test cluster
The rest test framework, because it used to be tightly integrated with
ESIntegTestCase, currently expects the addresses for the test cluster to
be passed using the transport protocol port. However, it only uses this
to then find the http address.

This change makes ESRestTestCase extend from ESTestCase instead of
ESIntegTestCase, and changes the sysprop used to tests.rest.cluster,
which now takes the http address.

closes #15459
2016-01-18 16:44:14 -08:00
Nik Everett bd1324ccc9 Remove Xlint from lang-groovy and discovery-azure
discovery-azure didn't actually need it.

This removes all non-default Xlints from modules.
2016-01-18 18:24:44 -05:00
Tal Levy 993092cde6 Merge pull request #16062 from talevy/dedot-default-rest
[Ingest] Add default separator test to dedot rest test
2016-01-18 14:48:57 -08: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 d93b6f5248 Merge pull request #16065 from nik9000/xlint_mustache
Cleanup ContextAndHeaderTransportTests
2016-01-18 16:35:48 -05:00
Nik Everett cf166b54aa Merge pull request #16063 from nik9000/xlint_plan_a
Fix warnings in lang-plan-a
2016-01-18 16:21:13 -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
Nik Everett 08ca9d7645 Fix warnings in lang-plan-a
Removes all Xlint skips in lang-plan-a. Warnings were just some extra
casts which were removed, some raw types which we just needed to <?>, and
a couple of unchecked casts in data that we know to be Map<String, Object>
because that structure is super-ultra-common in scripts.
2016-01-18 15:27:51 -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
Tal Levy 4ef85eda36 add default separator test to dedot rest test 2016-01-18 09:25:36 -08: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
Clinton Gormley e5034c9c1f Merge pull request #15973 from DynamicScope/patch-1
Update bulk.asciidoc
2016-01-18 12:00:02 +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