Commit Graph

22319 Commits

Author SHA1 Message Date
javanna 062a21678c merge Connection and StatefulConnection into one class, remove generic type from Transport 2016-06-03 16:01:07 +02:00
javanna a472544ab4 move sniff related stuff to sniff package 2016-06-03 16:01:07 +02:00
javanna ce663e9703 get rid of connection selector predicate 2016-06-03 16:01:07 +02:00
javanna f6a5a0a4ad get rid of Node abstraction 2016-06-03 16:01:07 +02:00
javanna 94cf8437d0 get rid of retry timeout exception 2016-06-03 16:01:07 +02:00
javanna 25892351e7 remove Verb enum 2016-06-03 16:01:07 +02:00
javanna 6ae8be55bd Introduce notion of Transport, Connection and ConnectionPool
There are two implementations of connection pool, a static one that allows to enable/disable pings, and a sniffing one that sniffs nodes from the nodes info api.

Transport retrieves a stream of connections from the connection for each request and calls onSuccess or onFailure depending on the result of the request.

Transport also supports a max retry timeout to control the timeout for the request retries overall.
2016-06-03 16:01:07 +02:00
javanna 5970723945 clarify why jarhell and dependency license check are disabled, add okhttp mockwebserver dependency
Also enable forbiddenApisTest (will fail till we get rid of the sun http web server in RestClientTests that will be replaced with mockwebserver)
2016-06-03 16:01:07 +02:00
javanna c9c33a7719 Fix checkstyle issues, setup thirdPartyAudit checks and enable forbiddenApisMain 2016-06-03 16:01:07 +02:00
Simon Willnauer 3efbe95ca4 RestClient prototype 2016-06-03 16:01:07 +02:00
Yannick Welsch 24a7b7224b Fix recovery throttling to properly handle relocating non-primary shards (#18701)
Relocation of non-primary shards is realized by recovering from the primary shard. Recovery throttling wrongly equates non-primary relocation as recovering a shard from the non-primary relocation source, however.

Closes #18640
2016-06-03 14:11:34 +02:00
Simon Willnauer 6c28235b03 Fix merge stats rendering in RestIndicesAction (#18720)
give the table description:
```
        table.addCell("merges.total", "sibling:pri;alias:mt,mergesTotal;default:false;text-align:right;desc:number of completed merge ops");
        table.addCell("pri.merges.total", "default:false;text-align:right;desc:number of completed merge ops");

        table.addCell("merges.total_docs", "sibling:pri;alias:mtd,mergesTotalDocs;default:false;text-align:right;desc:docs merged");
        table.addCell("pri.merges.total_docs", "default:false;text-align:right;desc:docs merged");

        table.addCell("merges.total_size", "sibling:pri;alias:mts,mergesTotalSize;default:false;text-align:right;desc:size merged");
        table.addCell("pri.merges.total_size", "default:false;text-align:right;desc:size merged");
```
this is how it should be.
2016-06-03 13:42:09 +02:00
Britta Weber 78574d248c [TEST] mute RandomAllocationDeciderTests.testRandomDecisions
we have a pr already: https://github.com/elastic/elasticsearch/pull/18701
2016-06-03 11:37:22 +02:00
Clinton Gormley e6aaaf11ed Reworked docs for index-shrink API (#18705) 2016-06-03 09:50:51 +02:00
Robert Muir ad118eb1e5 Merge pull request #18711 from rmuir/painless_compile_exceptions
Improve painless compile-time exceptions
2016-06-02 20:43:01 -04:00
Robert Muir b5393ce55e Improve painless compile-time exceptions 2016-06-02 18:23:47 -04:00
Ali Beyad b720216395 Adds UUIDs to snapshots
This commit adds a UUID for each snapshot, in addition to the already
existing repository and snapshot name. The addition of UUIDs will enable
more robust handling of the deletion of previous snapshots and lingering
files from partially failed delete operations, on top of being able to
uniquely track each snapshot.

Closes #18228
Relates #18156
2016-06-02 17:01:48 -04:00
Nik Everett f82ab787a5 Add test rethrottle test case for delete-by-query
and remove some type parameters that we don't need that were getting
in the way.
2016-06-02 15:04:18 -04:00
Jason Tedor f67e5807ca Do not start scheduled pings until transport start
Today, scheduled pings in NettyTransport can start before the transport
is started. Instead, these pings should not be scheduled until after the
transport is started. This commit modifies NettyTransport so that this
is the case.

Relates #18702
2016-06-02 13:12:21 -04:00
Christoph Büscher b6f26c0c37 Merge pull request #17624
Handle empty query bodies at parse time and remove EmptyQueryBuilder.
2016-06-02 18:40:36 +02:00
Christoph Büscher 9067407cdd Adressing review comments 2016-06-02 16:19:23 +02:00
Simon Willnauer 22dfc41521 Only filter intial recovery (post API) when shrinking an index (#18661)
Today we use `index.routing.allocation.include._id` to filter the allocation
for the shrink target index. That has the sideeffect that the user has to
delete that setting / change it once the primary has been recovered (shrink is done)
This PR adds a dedicated filter that can only be set internally that only filters
allocation for unassigned shards.
2016-06-02 15:38:51 +02:00
Christoph Büscher e2b6dbc020 Add tests to check that toQuery() doesn't return null 2016-06-02 11:25:56 +02:00
Christoph Büscher cb145aec68 Removing handling of null lucene query where we catch this at parse time 2016-06-02 11:25:56 +02:00
Christoph Büscher 359f45988f Handle empty query bodies at parse time and remove EmptyQueryBuilder
Currently we support empty query clauses like the filter in

"constant_score" : {  "filter" : { } }

How these clauses are handled depends on the surrounding query.
They later are either ignored, converted to match all or no documents or
passed up further in the query hierarchy. During parsing these claues are
currently represented as EmptyQueryBuilders. When not handled anywhere else,
these special cases need to be checked for on the shard when building the
lucene query.

This is trappy, so this PR changes the parsing of compound queries. Instead
of returning QueryBuilder, the core query parsing method
QueryShardContext#parseInnerQueryBuilder() now return an Optional which can
be empty in the case of empty query clauses. This has the advantage of forcing
callers to deal with this sooner or later. When encountering empty Optionals,
compound query builders now have the choice to ignore them, pass them on or
rewrite to a different query, depending on context.
2016-06-02 11:25:56 +02:00
Yannick Welsch b2724c0d08 Mute failing assertions in IndexWithShadowReplicasIT until fix 2016-06-02 11:23:44 +02:00
Jason Tedor 3ccd59592a Remove allow running as root
This commit removes the escape hatch for running Elasticsearch as root.

Relates #18694
2016-06-02 05:03:28 -04:00
Clinton Gormley 56d86ef875 Add upgrade-not-supported warning to alpha release notes 2016-06-02 10:18:16 +02:00
Nicholas Knize 2d57bbdacd remove unrecognized javadoc tag from matrix aggregation module 2016-06-01 17:30:20 -05:00
Nicholas Knize 54575e55ca set ValuesSourceConfig fields as private 2016-06-01 16:39:42 -05:00
Nicholas Knize 90b8f5d0d8 Adding MultiValuesSource support classes and documentation to matrix stats agg module 2016-06-01 16:39:42 -05:00
Nicholas Knize f449666c59 New Matrix Stats Aggregation module
This commit adds a new aggs-matrix-stats module. The module presents a new class of aggregations called Matrix Aggregations. Matrix aggregations work on multiple fields and produce a matrix as output. The first matrix aggregation provided by the module is matrix_stats aggregation. This aggregation computes the following statistics over a set of fields:

* Covariance
* Correlation

For completeness (and interpretation purposes) the following per-field statistics are also provided:

* sample count
* population mean
* population variance
* population skewness
* population kurtosis
2016-06-01 16:39:42 -05:00
Jason Tedor fb893a993f Add note regarding Windows service heap size
This commit adds a note regarding the difference in configuration for
the Windows service heap size from any other installation of
Elasticsearch.

Relates #18606
2016-06-01 16:31:16 -04:00
Jason Tedor 8e2a7d0fe1 Rename boostrap.mlockall to bootstrap.memory_lock
The setting bootstrap.mlockall is useful on both POSIX-like systems
(POSIX mlockall) and Windows (Win32 VirtualLock). But mlockall is really
a POSIX only thing so the name should not be tied POSIX. This commit
renames the setting to "bootstrap.memory_lock".

Relates #18669
2016-06-01 16:25:51 -04:00
Clinton Gormley a98856663b Update reindex.asciidoc (#18687)
Potentially fixing some copy/paste errors
# Conflicts:
#	docs/reference/docs/reindex.asciidoc
2016-06-01 20:16:12 +02:00
Nik Everett 1b66d4a97f Add more logging to reindex rethrottle
The tests are failing in CI and we can't track down the cause. This should
help!
2016-06-01 12:54:49 -04:00
Yannick Welsch 21f0d7da1d [TEST] Increase timeout to wait on folder deletion in IndexWithShadowReplicasIT 2016-06-01 18:47:25 +02:00
Yannick Welsch c20bf5d747 [TEST] Fix tests that rely on assumption that data dirs are removed after index deletion (#18681)
Relates to #18602
2016-06-01 17:02:09 +02:00
Yannick Welsch bdd1d0703d Acknowledge index deletion requests based on standard cluster state acknowledgment (#18602)
Index deletion requests currently use a custom acknowledgement mechanism that wait for the data nodes to actually delete the data before acknowledging the request to the client. This was initially put into place as a new index with same name could only be created if the old index was wiped as we used the index name as data folder on the data nodes. With PR #16442, we now use the index uuid as folder name which avoids collision between indices that are named the same (deleted and recreated). This allows us to get rid of the custom acknowledgment mechanism altogether and rely on the standard cluster state-based acknowledgment instead.

Closes #18558
2016-06-01 15:22:55 +02:00
Alexander Kazakov f32f35bec4 Register "cloud.node.auto_attributes" setting (#18678) 2016-06-01 13:27:11 +02:00
Adrien Grand 3b8c9d87b4 Fix StoreRecoveryTests after 6.0.1 upgrade. 2016-06-01 10:54:51 +02:00
Jun Ohtani 871aaa102f Merge branch 'fix/validate_index_template' 2016-06-01 17:49:01 +09:00
Adrien Grand d182e171a4 Upgrade to Lucene 6.0.1. 2016-06-01 10:31:10 +02:00
Martijn van Groningen 766789b0f0 ingest: added `ignore_failure` option to all processors
If this option is enabled on a processor it silently catches any processor related failure and continues executing the rest of the pipeline.

 Closes #18493
2016-06-01 10:29:12 +02:00
Simon Willnauer 966bfc3f2d Throw IllegalStateException when handshake fails due to version or cluster mismatch (#18676)
We do throw ConnectTransportException which is logged in trace level hiding a potentially
important information  when an old or wrong node wants to connect. We should throw ISE and
log as warn.
2016-06-01 10:28:35 +02:00
Adrien Grand a78c7d9911 AggregatorBuilder and PipelineAggregatorBuilder do not need generics. #18368
Similar reasoning as #18133 but for the aggs API. One important change is that
I moved the base PipelineAggregatorBuilder class to the o.e.s.aggregations
package instead of o.e.s.aggregations.pipeline so that the create method does
not need to be public.
2016-06-01 10:19:30 +02:00
Simon Willnauer 88800e8e47 Move PageCacheRecycler into BigArrays (#18666)
PageCacheRecycler is really just an implementation detail of
BigArrays. There is no need to leak this class anywhere outside of it.
2016-06-01 09:43:11 +02:00
Jun Ohtani fd76291131 Index Template: parse and validate mappings in template when template puts
Share applying template with MetaDataCreateIndexService and MetaDataIndexTemplateService
Add some unit test
Collapse addMappingsToMapperService and move it to MapperService
Extract validateTemplate method
use expectThrows in testcase
Add TODO comment

Closes #2415
2016-06-01 16:41:48 +09:00
Simon Willnauer 93c5a9dacd [TEST] Set BWC version to 5.0.0-SNAP since this is it's min compat version 2016-06-01 09:11:08 +02:00
Ali Beyad f12b10c48a Make cluster health classes immutable and have them implement Writeable
instead of Streamable

Closes #18673
2016-05-31 23:04:13 -04:00