Commit Graph

18166 Commits

Author SHA1 Message Date
Robert Muir b6fbd18e09 Merge pull request #15322 from rmuir/awesome
make slow tests more obvious
2015-12-09 15:05:53 -05:00
Lee Hinman b80ddf38aa Merge commit '74c85026b97deb028125089bbe56baaf764cea22' into ramky1982/patch-1 2015-12-09 12:42:44 -07:00
Adrien Grand ab44366d93 Remove back compat for the `_source` compression options.
These options have been deprecated before 2.0 so they don't need to be supported
by 3.0.
2015-12-09 19:22:34 +01:00
Yannick Welsch bef0bedba9 Add support to _aliases endpoint to specify multiple indices and aliases in one action
Closes #15305
2015-12-09 19:08:27 +01:00
Christoph Büscher e4721fd02a Addressing review comments 2015-12-09 18:04:58 +01:00
Adrien Grand 3e47f90460 Remove XContentParser.estimatedNumberType().
The goal of this method is to know whether the xcontent impl knows how to
differenciate floats from doubles or longs from ints or if it's just guessing.
However, all implementations return true (which is correct for yaml and json,
but cbor and smile should be able to differenciate). I first tried to implement
this method correctly but it raised many issues because eg. most impls write a
long as an integer when it is small enough. So I suggest that we remove this
method and just treat cbor and smile like yaml and json, which is already what
is happening today anyway.
2015-12-09 14:56:50 +01:00
Colin Goodheart-Smithe b4e0c876d5 Merge pull request #15321 from martinstuga/Refactor-StatsAggegator#15264
Correct typo in class name of StatsAggregator (Closes #14730)
2015-12-09 13:39:27 +00:00
Christoph Büscher cb84b1ff1a Make HighlightBuilder produce SearchContextHighlight
The HighlightBuilder should be able to procude a SeachContextHighlight
object which contains the merged global and field options, also
contains objects that can only be created on the index shard (like
the actual lucene Query object used during highlighting).
This is done by the build() method of the HighlighBuilder. Also
adding tests that make sure the produced SearchContextHighlighter is
similar to the one we would get when parsing the xContent directly
with the current HighlightParseElement.
2015-12-09 11:44:45 +01:00
Boaz Leskes 20bff773ed Merge pull request #15318 from bleskes/cancellable_thread
CancellableThreads should also treat ThreadInterruptedException as InterruptedException

RecoverySource uses the RateLimiter under a cancelable thread. The SimpleRateLimiter used in throws ThreadInterruptedException on interruption. We should treat it as InterruptedException
2015-12-09 09:29:47 +01:00
Boaz Leskes ccd0543172 CancellableThreads should also treat ThreadInterruptedException as InterruptedException
RecoverySource uses the RateLimiter under a cancelable thread. The SimpleRateLimiter used in throws   ThreadInterruptedException on interruption. We should treat it as InterruptedException
2015-12-09 09:29:23 +01:00
Adrien Grand 1d44db7d87 Merge pull request #15308 from jpountz/fix/mapper_parsing_analyzer_term_vector
Only text fields should accept analyzer and term vector settings.
2015-12-09 08:55:33 +01:00
Adrien Grand 1909c3d8cc Only text fields should accept analyzer and term vector settings.
Currently almost all our fields accept the `analyzer` and `term_vector` settings
although they only make sense on text fields. This commit forbids those settings
on all fields but `string` and `_all` for indices created on or after version
2.2.0.
2015-12-09 08:42:56 +01:00
Adrien Grand 473e880a7c Merge pull request #15319 from jpountz/enhancement/dynamic_mappings_float
Dynamically map floating-point numbers as floats instead of doubles.
2015-12-09 08:38:27 +01:00
Robert Muir 0bf9e36eaa Merge pull request #15311 from rmuir/symlinks_are_bad
punch thru symlinks when loading plugins/modules
2015-12-09 01:35:00 -05:00
Ryan Ernst 74dc5bf20a Fix template query parser tests to register mustache script engine 2015-12-08 21:33:48 -08:00
Ryan Ernst b7fb0824be Fix render search template tests 2015-12-08 21:33:48 -08:00
Robert Muir a6e1655fe9 fix integ tests 2015-12-09 00:30:32 -05:00
Ryan Ernst 46d73a13ff Merge branch 'master' into shave_mustache 2015-12-08 21:11:48 -08:00
Robert Muir 17436d4332 get gradle check passing for lang-mustache 2015-12-09 00:10:37 -05:00
Robert Muir 3632ddf497 split out mustache methods so groovy works again 2015-12-09 00:00:40 -05:00
Robert Muir 7f06c12c7f restore randomness in test 2015-12-08 23:44:28 -05:00
Robert Muir a6fe9a4212 move test back now that its fixed 2015-12-08 23:42:18 -05:00
Ryan Ernst 907d3cf878 move template query builder tests back to core (using mockscript) 2015-12-08 20:26:45 -08:00
Ryan Ernst baa56bdd2d Merge pull request #15326 from rjernst/messy_test
Add gradle plugin for "messy" tests
2015-12-08 19:48:55 -08:00
Ryan Ernst 18698b9308 Build: Add build plugin for "messy" tests
We have some tests which have crazy dependencies, like on other plugins.
This change adds a "messy-test" gradle plugin which can be used for qa
projects that these types of tests can run in. What this adds over
regular standalone tests is the plugin properties and metadata on the
classpath, so that the plugins are properly initialized.
2015-12-08 19:48:39 -08:00
Robert Muir 2e299860e5 refactor mustache to lang-mustache plugin. No rest tests yet. 2015-12-08 22:45:21 -05:00
Jim Ferenczi 23aeaa88b2 Fixes random failures of org.apache.elasticsearch.test.rest.RestIT
RestTable: ignores right padding for the last cell of a column.
2015-12-08 20:52:24 +01:00
Christoph Büscher d866906612 Merge pull request #15157 from cbuescher/highlight-builder-fromXContent
Add fromXContent() method to HighlightBuilder
2015-12-08 19:39:00 +01:00
Robert Muir b0febc1b9f make slow tests more obvious 2015-12-08 13:05:15 -05:00
Paulo Martins 02b1c32261 Correct typo in class name of StatsAggregator #15264 (Closes) 2015-12-08 17:44:52 +00:00
Adrien Grand f2d8a35888 Dynamically map floating-point numbers as floats instead of doubles.
Close #13851
2015-12-08 18:19:47 +01:00
Ryan Ernst 6f996e9e26 Merge pull request #15300 from rjernst/tribe_cleanup
Fix tribe node to load config file for internal client nodes
2015-12-08 08:07:26 -08:00
Ryan Ernst 7a5126192a Removed unnecessary setting previously used to ignore sysprops in tribe nodes 2015-12-08 08:05:50 -08:00
Christoph Büscher 9ea18fc576 Adding checks for unexpected tokens in parser 2015-12-08 15:50:44 +01:00
Simon Willnauer c6938896aa Merge pull request #15309 from s1monw/handle_source_canceled
Handle cancel exceptions on recovery target if the cancel comes from the source
2015-12-08 15:21:48 +01:00
Jim Ferenczi 14edc84f36 Merge pull request #15250 from jimferenczi/cat_api_fix
:CAT API: remove space at the end of a line
2015-12-08 15:05:25 +01:00
Myll 73a3c326c9 _cat APIs: remove space at the end of a line
Fixes #9464
2015-12-08 15:03:59 +01:00
Britta Weber e0aa481bf5 Merge pull request #15213 from brwe/copy-to-in-multi-fields-exception
throw exception if a copy_to is within a multi field

Copy to within multi field is ignored from 2.0 on, see #10802.
Instead of just ignoring it, we should throw an exception if this
is found in the mapping when a mapping is added. For already
existing indices we should at least log a warning.
We remove the copy_to in any case.

related to #14946
2015-12-08 14:41:07 +01:00
Simon Willnauer 7d6663e6e5 use AtomicBoolean instead of a simple boolean 2015-12-08 14:32:48 +01:00
Robert Muir a6ba351fb2 punch thru symlinks when loading plugins/modules
this ensures the codebase URL matches the permission grant (see matching toRealPath in Security.java)
in the case of symlinks or other shenanigans.

this is best effort, if we really want to support symlinks in any way, we need
e.g. qa or vagrant tests that configure a bunch of symlinks for things and ensure that in jenkins.
this should be easier to do with gradle, as we can just create a symlink'd home if we want
2015-12-08 08:04:11 -05:00
Simon Willnauer 449f9e7258 don't allow writing single bytes on recovery outputstream 2015-12-08 12:41:19 +01:00
Simon Willnauer ceb2797857 Handle cancel exceptions on recovery target if the cancel comes from the source
Today we only handle correctly if the `ExecutionCancelledException` comes from the
local execution. Yet, this can also come from remove and should be handled identically.
2015-12-08 12:01:22 +01:00
Simon Willnauer 8b8de5cb4b Don't send chunks after a previous send call failed. 2015-12-08 11:54:37 +01:00
Simon Willnauer 37b60bd76b more accurate chunk size 2015-12-08 11:20:55 +01:00
Simon Willnauer 414c04eb66 Restore chunksize of 512kb on recovery and remove configurability
This commit restores the chunk size of 512kb lost in a previous but unreleased
refactoring. At the same time it removes the configurability of:
 * `indices.recovery.file_chunk_size` - now fixed to 512kb
 * `indices.recovery.translog_ops` - removed without replacement
 * `indices.recovery.translog_size` - now fixed to 512kb
 * `indices.recovery.compress` - file chunks are not compressed due to lucene's compression but translog operations are.

The compress option is gone entirely and compression is used where it makes sense. On sending files of the index
we don't compress as we rely on the lucene compression for stored fields etc.

Relates to #15161
2015-12-08 11:20:55 +01:00
Boaz Leskes 0809e4a65f typo fix 2015-12-08 09:36:10 +01:00
Boaz Leskes 82b502c21f Make IndexShard operation be more explicit about whether they are expected to run on a primary or replica
This commit cherry picks some infrastructure changes from the `feature/seq_no` branch to make merging from master easier.

More explicitly, IndexShard current have  prepareIndex and prepareDelete methods that are called both on the primary as the replica, giving it a different origin parameter. Instead, this commits creates two explicit prepare*OnPrimary and prepare*OnReplica methods. This has the extra added value of not expecting the caller to use an Engine enum.

Also, the commit adds some code reuse between TransportIndexAction and TransportDeleteAction and their TransportShardBulkAction counter parts.

Closes #15282
2015-12-08 09:08:08 +01:00
Adrien Grand 47bcb33006 Merge pull request #15289 from jpountz/fix/mapper_tokenized
Mapper parsers should not check for a `tokenized` property.
2015-12-08 09:02:38 +01:00
Ryan Ernst 25d60e152f Tribe: Fix tribe node to load config file for internal client nodes
The tribe node creates one local client node for each cluster it
connects to. Refactorings in #13383 broke this so that each local client
node now tries to load the full elasticsearch.yml that the real tribe
node uses.

This change fixes the problem by adding a TribeClientNode which is a
subclass of Node. The Environment the node uses is now passed in (in
place of Settings), and the TribeClientNode simply does not use
InternalSettingsPreparer.prepareEnvironment.

The tests around tribe nodes are not great. The existing tests pass, but
I also manually tested by creating 2 local clusters, and configuring and
starting a tribe node. With this I was able to see in the logs the tribe
node connecting to each cluster.

closes #13383
2015-12-07 20:18:06 -08:00
Jason Tedor 618c2f7af5 Add missing license header to o.e.m.Probes 2015-12-07 22:07:20 -05:00