Commit Graph

5434 Commits

Author SHA1 Message Date
Simon Willnauer e50314bb6e Remove NodeClientModule and PluginsModule 2016-06-20 11:53:07 +02:00
Simon Willnauer fb713774a1 Don't create enviroment more than once 2016-06-20 11:45:52 +02:00
Simon Willnauer cfa4689445 Share test injector creation 2016-06-20 11:38:48 +02:00
Simon Willnauer 7fea5bd8e7 Remove obsolete Modules that can simply be inlined in node creation 2016-06-20 11:28:14 +02:00
Simon Willnauer 260f38fd76 Remove VersionModule and use Version#current consistently.
We pretended to be able to ackt like a different version node for so long it's
time to be honest and remove this ability. It's just confusing and where needed
and tested we should build dedicated extension points.
2016-06-20 10:55:52 +02:00
Tanguy Leroux 98951b1203 Compile each Groovy script in its own classloader
closes #18572
2016-06-20 08:17:09 +02:00
Florian Hopf 6b46bf13f0 Throw if the local node is not set
This commit adds an IllegalStateException if attempting to get the local
node from the cluster service when it is not set.

Relates #18963
2016-06-19 17:25:18 -04:00
Boaz Leskes 8f96dd53aa mark ESIndexLevelReplicationTestCase as abstract so it won't fail naming conventions 2016-06-18 19:39:37 +02:00
Boaz Leskes 61b7f49ed2 ESIndexLevelReplicationTestCase.java fix line lengths 2016-06-18 19:13:50 +02:00
Boaz Leskes 14cd8a6794 Introduce Replication unit tests using real shards (#18930)
This commit introduce unit testing infrastructure to test replication operations using real index shards. This is infra is complementary to the full integration tests and unit testing of ReplicationOperation we already have. The new ESIndexLevelReplicationTestCase base makes it easier to test and simulate failure mode that require real shards and but do not need the full blow stack of a complete node.

The commit also add a simple "nothing is wrong" test plus a test that checks we don't drop docs during the various stages of recovery.

For now, only single doc indexing is supported but this can be easily extended in the future.
2016-06-18 18:53:47 +02:00
Boaz Leskes 535a245354 testSingleBatchSubmission - random numbers don't have to be unique 2016-06-18 18:44:54 +02:00
Simon Willnauer 4cb2bb635b Remove forked joda time BaseDateTime class (#18953)
This class was forked in 0.20 to remove a volatile keyword. While there
is no issue attached to the commit, no evidence of the criticality of the
change nor does it seem to be correct since we set this value internally as well
I think this class should be used as is from joda time even if we have to pay
the price of volatile reads. We can't do 3rd party optimization in our codebase that
way it just not maintainable.

This was added in 2280915d3c
2016-06-18 17:06:18 +02:00
Simon Willnauer 420dc72124 Add ClusterName#value as the default instead of it's toString method 2016-06-18 08:40:01 +02:00
Jeff Evans e9f2548ee0 Include script field even if it value is null
Include script field even if it value is null.

Closes #16408.
2016-06-17 16:41:25 -04:00
Jason Tedor d09d89f8c5 Remove only node preference
This commit removes the search preference _only_node as the same
functionality can be obtained by using the search preference
_only_nodes. This commit also adds a test that ensures that _only_nodes
will continue to support specifying node IDs.

Relates #18875
2016-06-17 15:27:46 -04:00
Areek Zillur 9bca264dcd Merge branch 'master' of https://github.com/elastic/elasticsearch 2016-06-17 11:41:23 -04:00
Areek Zillur 9356a6090f Merge branch 'master' into enhancement/rollover_api 2016-06-17 11:35:57 -04:00
Boaz Leskes 46b40f73b7 Inline reroute with process of node join/master election (#18938)
In the past, we had the semantics where the very first cluster state a node processed after joining could not contain shard assignment to it. This was to make sure the node cleans up local / stale shard copies before receiving new ones that might confuse it. Since then a lot of work in this area, most notably the introduction of allocation ids and #17270 . This means we don't have to be careful and just reroute in the same cluster state change where we process the join, keeping things simple and following the same pattern we have in other places.
2016-06-17 17:32:38 +02:00
Jim Ferenczi fb2a48d0f0 Revert "Remove support for sorting terms aggregation by ascending count"
This is delayed after alpha4 since Kibana relies on it.
2016-06-17 17:14:01 +02:00
Simon Willnauer bdb6dcea3a Cleanup ClusterService dependencies and detached from Guice (#18941)
This change removes some unnecessary dependencies from ClusterService
and cleans up ClusterName creation. ClusterService is now not created
by guice anymore.
2016-06-17 17:07:19 +02:00
Areek Zillur 545ffa7801 Merge branch 'master' into enhancement/rollover_api 2016-06-17 10:33:11 -04:00
Jim Ferenczi 755721953b Remove support for sorting terms aggregation by ascending count
closes #17614
2016-06-17 15:06:49 +02:00
Adrien Grand 712e387058 Rename PipelineAggregatorBuilder to PipelineAggregationBuilder.
This is a follow-up to #18377.
2016-06-17 14:35:49 +02:00
Jim Ferenczi 529c2ca13f Add did-you-mean for plugin cli
This commit adds error messages like: `Unknown plugin xpack, did you mean [x-pack]?`

Closes #18896
2016-06-17 12:17:48 +02:00
Boaz Leskes f256769179 Simplify NodeJoinController to make use of new cluster state batching infra (#18832)
The NodeJoinController is responsible for processing joins from nodes, both normally and during master election. For both use cases, the class processes incoming joins in batches in order to be efficient and to accumulated enough joins (i.e., >= min_master_nodes) to seal an election and ensure the new cluster state can be committed. Since the class was written, we introduced a new infrastructure to support batch changes to the cluster state at the `ClusterService` level. This commit rewrites NodeJoinController to use that infra and be simpler.

The PR also introduces a new concept to ClusterService allowing to submit tasks in batches, guaranteeing that all tasks submitted in a batch will be processed together (potentially with more tasks).  On top of that I added some extra safety checks to the ClusterService, around potential double submission of task objects into the queue.

This is done in preparation to revive #17811
2016-06-17 09:22:15 +02:00
Adrien Grand 600cbb6ab0 Upgrade to Lucene 6.1.0. #18926 2016-06-17 09:03:00 +02:00
Areek Zillur 6adffa6b7b Merge branch 'master' into enhancement/rollover_api 2016-06-16 17:27:32 -04:00
Ryan Ernst 8196cf01e3 Merge branch 'master' into plugin_name_api 2016-06-16 13:49:28 -07:00
Ryan Ernst 96321d7749 Remove outtdated comment referring to name/description for Plugin class 2016-06-16 10:18:10 -07:00
Alexander Kazakov 9eea1b6833 Fix flat_settings REST parameter
* Get XContent params from request in Nodes rest actions
* Adding test for nodes info rest api
2016-06-16 10:03:51 -04:00
Simon Willnauer b22c526b34 Cut over settings registration to a pull model (#18890)
Today we have a push model for registering basically anything. All our extension points
are defined on modules which we pass in to plugins. This is harder to maintain and adds
unnecessary dependencies on the modules itself. This change moves towards a pull model
where the plugin offers a getter kind of method to get the extensions. This will also
help in the future if we need to pass dependencies to the extension points which can
easily be defined on the method as arguments if a pull model is used.
2016-06-16 15:52:58 +02:00
Nik Everett 5aa4769b25 Move waitForTaskCompletion into TaskManager
This allows for listening for the waiting to start using
MockTaskManager. This allows us to work around a race condition
in the TasksIT.
2016-06-16 09:45:46 -04:00
Daniel Mitterdorfer 0faa9409b3 Force test infra to use node client in NettyHttpRequestSizeLimitIT 2016-06-16 15:36:29 +02:00
Simon Willnauer e442f07460 Remove dead code 2016-06-16 15:29:49 +02:00
Tanguy Leroux 3c9712794e Merge pull request #18586 from a2lin/msearch_error_fix
Adding status field in _msearch error request bodies
2016-06-16 14:31:39 +02:00
Jim Ferenczi ad232aebbe Set collection mode to breadth_first in the terms aggregation when the cardinality of the field is unknown or smaller than the requested size.
closes #9825
2016-06-16 11:33:40 +02:00
Christoph Büscher 01004c72ba Improve TimeZoneRoundingTests error messages
Currently the error messages for failing tests in the TimeZoneRoundingTests test
suite are hard to read because they usually report the actual end expected date
in milliseconds utc (e.g. "Expected: <1414270860000L> but: was <1414270800000L>".
This makes failing tests hard to read.

This change introduces a new Matcher that can be used for equality checks for
long dates but reports the error both as a formated date string according to
some time zone and also as the actual long values, so you get messages like
"Expected: 2014-10-26T00:01:00.000+03:00 [1414270860000] but:  was
"2014-10-26T00:00:00.000+03:00 [1414270800000]".

Also clean cleaning up some helper methods and generally simplifying a few test
cases. Otherwise this change shouldn't affect either the scope of the test or
anything about the rounding implementation itself.
2016-06-16 10:10:04 +02:00
Adrien Grand 9ffb2ff6ba Expose half-floats. #18887
They have been implemented in https://issues.apache.org/jira/browse/LUCENE-7289.
Ranges are implemented so that the accuracy loss only occurs at index time,
which means that if you are searching for values between A and B, the query will
match exactly all documents whose value rounded to the closest half-float point
is between A and B.
2016-06-16 09:46:39 +02:00
Simon Willnauer 18ff051ad5 Simplify ScriptModule and script registration (#18903)
Registering a script engine or native scripts still uses Guice today
and is much more complicated than needed. This change moves to a pull
based model where script plugins have to implement a dedicated interface
`ScriptPlugin` and defines simple getter returning instances rather than
classes.
2016-06-16 09:35:13 +02:00
Alexander Lin 7d42e7e716 Closes #18013. Added status field to _msearch response bodies. 2016-06-16 00:25:17 -07:00
Daniel Mitterdorfer edf010f878 Force single-node cluster in NettyHttpRequestSizeLimitIT 2016-06-16 07:30:55 +02:00
Ryan Ernst a4503c2aed Plugins: Remove name() and description() from api
In 2.0 we added plugin descriptors which require defining a name and
description for the plugin. However, we still have name() and
description() which must be overriden from the Plugin class. This still
exists for classpath plugins. But classpath plugins are mainly for
tests, and even then, referring to classpath plugins with their class is
a better idea. This change removes name() and description(), replacing
the name for classpath plugins with the full class name.
2016-06-15 17:12:22 -07:00
Nik Everett dc2d7a2a6d Test: wait for task to start before waiting for it to finish (#18902) 2016-06-15 18:42:48 -04:00
Tal Levy a26260fb72 new ScriptProcessor for Ingest (#18193)
add new ScriptProcessor for executing ES Scripts within pipelines
2016-06-15 14:57:18 -07:00
Areek Zillur 1a59a8418a Merge branch 'master' into enhancement/shrink_request_parser 2016-06-15 15:49:40 -04:00
Nik Everett ab2a4a0d72 Fix exception on task not found
Silly protected method....
2016-06-15 15:29:42 -04:00
Nik Everett 8cc848f31c Allow FieldStatsRequest to disable cache 2016-06-15 15:10:46 -04:00
Ryan Ernst 8de90a66a1 Relax plugin id url heuristic, since java uses single slash instead of double 2016-06-15 11:43:38 -07:00
Ryan Ernst 9c65bd4ac4 Merge pull request #18876 from rjernst/plugin_install_unknown
Emit nicer error message when trying to install unknown plugin
2016-06-15 09:56:43 -07:00
Daniel Mitterdorfer cca4529b1c Mute NHRSLIT while investigating 2016-06-15 18:02:31 +02:00