Commit Graph

17999 Commits

Author SHA1 Message Date
Areek Zillur 025e9818e7 Refactors TransportReplicationAction to decouple request routing and shard operation logic 2015-12-10 01:32:07 -05:00
Jack Conradson da5b07ae13 Added a new scripting language (PlanA).
Closes #15136
2015-12-09 16:32:37 -08:00
David Pilato 414fccb7d1 Merge branch 'fix/15268-proxy-auth' 2015-12-09 23:21:00 +01:00
David Pilato f675801b26 add more tests to network service
Follow up for #15340

We test that bind with wilcard IP + fixed IP it raises an exception
We test binding multiple IPs

(cherry picked from commit 2cc5bb7)
2015-12-09 23:17:59 +01:00
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
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
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 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
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
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 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
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
Ryan Ernst ce78c2b280 Merge pull request #15087 from rjernst/standalone_tests_intellij
Setup standalone tests to compile in intellij
2015-12-07 16:02:49 -08:00
Ryan Ernst fa1c708ccd Merge branch 'master' into standalone_tests_intellij 2015-12-07 16:01:32 -08:00
David Pilato 7dcb40bcac Add support for proxy authentication for s3 and ec2
When using S3 or EC2, it was possible to use a proxy to access EC2 or S3 API but username and password were not possible to be set.

This commit adds support for this. Also, to make all that consistent, proxy settings for both plugins have been renamed:

* from `cloud.aws.proxy_host` to `cloud.aws.proxy.host`
* from `cloud.aws.ec2.proxy_host` to `cloud.aws.ec2.proxy.host`
* from `cloud.aws.s3.proxy_host` to `cloud.aws.s3.proxy.host`
* from `cloud.aws.proxy_port` to `cloud.aws.proxy.port`
* from `cloud.aws.ec2.proxy_port` to `cloud.aws.ec2.proxy.port`
* from `cloud.aws.s3.proxy_port` to `cloud.aws.s3.proxy.port`

New settings are `proxy.username` and `proxy.password`.

```yml
cloud:
    aws:
        protocol: https
        proxy:
            host: proxy1.company.com
            port: 8083
            username: myself
            password: theBestPasswordEver!
```

You can also set different proxies for `ec2` and `s3`:

```yml
cloud:
    aws:
        s3:
            proxy:
                host: proxy1.company.com
                port: 8083
                username: myself1
                password: theBestPasswordEver1!
        ec2:
            proxy:
                host: proxy2.company.com
                port: 8083
                username: myself2
                password: theBestPasswordEver2!
```

Note that `password` is filtered with `SettingsFilter`.

We also fix a potential issue in S3 repository. We were supposed to accept key/secret either set under `cloud.aws` or `cloud.aws.s3` but the actual code never implemented that.

It was:

```java
account = settings.get("cloud.aws.access_key");
key = settings.get("cloud.aws.secret_key");
```

We replaced that by:

```java
String account = settings.get(CLOUD_S3.KEY, settings.get(CLOUD_AWS.KEY));
String key = settings.get(CLOUD_S3.SECRET, settings.get(CLOUD_AWS.SECRET));
```

Also, we extract all settings for S3 in `AwsS3Service` as it's already the case for `AwsEc2Service` class.

Closes #15268.
2015-12-07 23:10:54 +01:00
Simon Willnauer 4e80a5e099 Merge pull request #15234 from s1monw/remove_ancient_settings
Remove ancient deprecated and alternative recovery settings
2015-12-07 21:15:49 +01:00
Adrien Grand c6a73dfcd5 Mapper parsers should not check for a `tokenized` property.
I don't recall of this property of any of our field mappers and it's not in our
docs so I suspect it's very old. The removal of this property will not fail
version upgrades since none of the field mappers use it in toXContent.
2015-12-07 19:15:15 +01:00
Adrien Grand 3a58af04c0 Merge pull request #15245 from jpountz/fix/check_type_name
Make MappedFieldType.checkTypeName part of MappedFieldType.checkCompatibility.
2015-12-07 18:03:07 +01:00
Christoph Büscher c57672c9b3 Adding checks and tests for exceptions on unknown fieldnames 2015-12-07 16:52:53 +01:00
Christoph Büscher 6a7eedd8ae Switching HighlighterBuilder to use ParseFields 2015-12-07 14:56:05 +01:00
Jason Tedor 914486795f Addtional simplifications in IndexingMemoryController
This commit removes some unneeded null checks from
IndexingMemoryController that were left over from the work in #15251,
and simplifies the try-catch block in
IndexingMemoryController#updateShardBuffers.
2015-12-07 08:42:11 -05:00
Jim Ferenczi da380af10b Merge pull request #15216 from jimferenczi/copy_to_dynamic_object
Fix copy_to when the target is a dynamic object field.
2015-12-07 14:16:18 +01:00
Jim Ferenczi 8558a40894 Fix copy_to when the target is a dynamic object field.
Fixes #11237
2015-12-07 14:14:00 +01:00
Christoph Büscher aa69c4a20b Add fromXContent method to HighlightBuilder
For the search refactoring the HighlightBuilder needs a way to
create new instances by parsing xContent. For bwc this PR start
by moving over and slightly modifying the parsing from
HighlighterParseElement and keeps parsing for top level highlighter
and field options separate. Also adding tests for roundtrip
of random builder (rendering it to xContent and parsing it and
making sure the original builder properties are preserved)
2015-12-07 11:24:27 +01:00
Simon Willnauer c1f7f8c03c add settings to migration guide 2015-12-07 09:54:23 +01:00
Ryan Ernst 5402277462 Fix plugin service check for missing descriptor to allow ioexception 2015-12-06 23:09:00 -08:00
Robert Muir 1329ef487a Merge pull request #15262 from rmuir/filter_classes_in_scripts
Filter classes loaded by scripts
2015-12-06 10:29:56 -05:00
Michael McCandless 6152d352aa Merge pull request #15266 from mikemccand/no_mac_address
If we can't get a MAC address for the node, use a dummy one
2015-12-06 08:19:53 -05:00