Commit Graph

2268 Commits

Author SHA1 Message Date
Simon Willnauer 45f7844948 Make CodecService a simple per shard registry. 2015-11-05 11:18:10 +01:00
Martijn van Groningen fc02b2bb0f test: don't run the second cluster with http enabled. 2015-11-05 14:08:54 +07:00
Robert Muir 1a0a910d1e Merge pull request #14526 from rjernst/standalone_test
Add qa/evil-tests
2015-11-04 13:49:55 -05:00
Boaz Leskes efde8e8a26 Gateway: failure to update the cluster state with the recovered state should make sure it will be recovered later
We currently fail to follow the right failure paths.

See http://build-us-00.elastic.co/job/es_core_master_window-2008/2477/

Closes #14485
2015-11-04 09:42:24 +00:00
Boaz Leskes 8eff4e211a Improve some logging around master election and cluster state
Tweaks done while debugging http://build-us-00.elastic.co/job/es_core_master_window-2008/2477/

Closes #14481
2015-11-04 09:39:56 +00:00
Yannick Welsch 825d0c64e6 Add duration field to /_cat/snapshots
Closes #14385
2015-11-04 10:34:00 +01:00
Daniel Mitterdorfer ae9fcd4f2b Merge remote-tracking branch 'danielmitterdorfer/feature/12596' 2015-11-04 09:31:12 +01:00
Daniel Mitterdorfer fea88bbc02 Add System#exit(), Runtime#exit() and Runtime#halt() to forbidden APIs
Closes #12596
2015-11-04 09:29:55 +01:00
Daniel Mitterdorfer 9ea25164b2 Merge remote-tracking branch 'danielmitterdorfer/fix/13132' 2015-11-04 09:06:35 +01:00
Daniel Mitterdorfer 7b62267008 Geo: Allow numeric parameters enclosed in quotes for 'geohash_grid' aggregation
Originally, only numeric values were allowed for parameters of the
'geohash_grid' aggregation in contrast to other places in the REST
API.

With this commit we also allow that parameters are enclosed in quotes (i.e.
as JSON strings). Additionally, with this commit the valid range for
'precision' is enforced for the Java API and the REST API (the latter was
previously missing the check).

Closes #13132
2015-11-04 09:04:22 +01:00
Robert Muir 3d8b4dae33 remove the ability for code to change file permissions, this was
only needed for pluginmanager's test, and pluginmanager doesn't
even run with securitymanager yet.
2015-11-04 00:31:15 -05:00
Robert Muir 6be9954d28 remove jimfs dep in tests 2015-11-03 23:29:14 -05:00
Robert Muir 602feac915 move tests never running in jenkins to new evil tests module 2015-11-03 21:42:22 -05:00
Jason Tedor 9d42b8b22b Merge pull request #14497 from jasontedor/java-9-type-inference-concatenated-iterator
Fix Java 9 type inference issue
2015-11-03 16:56:49 -05:00
Robert Muir 79467a138a Add property permissions so groovy scripts can serialize json
Allowing read to these properties is not really dangerous, even if
the code surrounding them is.

Closes #14488
2015-11-03 15:21:55 -05:00
Jason Tedor 2398f41db2 Fix Java 9 type inference issue
This commit fixes a compilation issue due to modified type inference in
the latest JDK 9 early access builds. We just have to lend a helping
hand to type inference by being explicit about the type.

Closes #14496
2015-11-03 15:15:40 -05:00
xuzha fb1d8bb149 Add os.allocated_processors
Current processors setting is not reflected in nodes info API
("os.available_processors"). Add os.allocated_processors to shows
actual number of processors that we are using.
2015-11-03 09:50:17 -08:00
Jason Tedor b2c098630e Merge pull request #14483 from jasontedor/cluster-block-to-string-dangling-comma
Fix dangling comma in ClusterBlock#toString
2015-11-03 11:55:01 -05:00
Jason Tedor 832267bcc1 Fix dangling comma in ClusterBlock#toString
This commit address some serious health issues that could arise from a
dangerous combination of OCD, string concatentation, and dangling
commas,
2015-11-03 11:52:40 -05:00
Simon Willnauer 759948f6c1 Merge branch 'master' into refactor_query_shard_context 2015-11-03 17:10:13 +01:00
Simon Willnauer 968561ad49 apply review comments 2015-11-03 17:09:32 +01:00
Robert Muir b6a2318563 upgrade rhino for plugins/lang-javascript
the current jar is over 3 years old, we should upgrade it for bugfixes.
the current integration could be more secure: set a global policy and enforce additional (compile-time) checks

closes #14466
2015-11-03 09:53:07 -05:00
David Tvaltchrelidze ea4e514385 Fix HTML response during redirection
It misses a quote...

Closes #11374
2015-11-03 13:59:57 +00:00
javanna ce6aa258a9 Remove support for query_binary and filter_binary
query_binary and filter_binary are unused at this point, as we only parse on the coordinating node and the java api only holds structured java objects for queries and filters, meaning they all implement Writeable and get natively serialized.

Relates to #14308
Closes #14433
2015-11-03 14:05:45 +01:00
Jason Tedor 43323c3541 Fix bug in cat thread pool
This commit fixes a bug in cat thread pool. This bug resulted from a
refactoring of the handling of thread pool types. To get the previously
displayed thread pool type from the ThreadPoolType object,
ThreadPoolType#getType needs to be called.
2015-11-03 07:40:49 -05:00
Simon Willnauer d76ae6718e Merge pull request #14432 from s1monw/add_shard_failure_as_suppressed
Deduplicate cause if already contained in shard failures
2015-11-03 12:06:23 +01:00
Christoph Büscher 2fe519c3e7 Revert fd3a46a because fix is to fragile
Reverting fix for #13884 because it was discussed to be too
fragile with respect to future changes in lucene simple query
string parsing. Undoes fix and removes test.
2015-11-03 11:48:14 +01:00
Adrien Grand a7bf06ee3a Fix test bug in UpdateThreadPoolSettingsTests. 2015-11-03 11:35:47 +01:00
Simon Willnauer 3f94a566ff Deduplicate cause if already contained in shard failures
If we have a shard failure on SearchPhaseExecutionException
we can deduplicate the original cause and use the more informative
ShardSearchFailure containing the shard ID etc. but we should deduplicate
the actual cause to prevent stack trace duplication.
2015-11-03 11:35:28 +01:00
Jason Tedor 48ee09fbd4 Add missing license file to ThreadPoolTypeSettingsValidatorTests.java 2015-11-02 22:14:28 -05:00
Jason Tedor e3b8dc7121 Forbid changing thread pool types
This commit forbids the changing of thread pool types for any thread
pool. The motivation here is that these are expert settings with
little practical advantage.

Closes #14294, relates #2509, relates #2858, relates #5152
2015-11-02 20:52:48 -05:00
Simon Willnauer 4176964358 Cleanup query parsing and remove IndexQueryParserService
IndexQueryParserService is only a factory for QueryShardContext instances
which are not even bound to a shard. The service only forwards dependencies and even
references node level service directly which makes dependency seperation on shard,
index and node level hard. This commit removes the service entirely, folds the creation
of QueryShardContext into IndexShard which is it's logical place and detaches the
ClusterService needed for index name matching during query parsing with a simple predicate
interface on IndexSettings.
2015-11-02 21:20:11 +01:00
Robert Muir f83800b1d2 don't discard original exception (suspiciously/possibly eclipse-generated) 2015-11-02 12:05:44 -05:00
Christoph Büscher 45dbcc4402 Merge pull request #14255 from cbuescher/feature/add-query-level-test
Parsers should throw exception on unknown objects
2015-11-02 11:48:17 +01:00
Christoph Büscher 72463768f5 Query DSL: Parsers should throw exception on unknown object
This PR adds a randomized test to the query test base class
that mutates an otherwise correct query by adding an additional
object into the query hierarchy. Doing so makes the query illegal
and should trigger some kind of exception. The new test revelead
that some query parsers quietly return queries when called with
such an illegal query. Those are also fixed here.

Relates to #10974
2015-11-02 11:39:22 +01:00
javanna b56bbf62dd Validate query api: move query parsing on the coordinating node
Similarly to what we did with the search api, we can now also move query parsing on the coordinating node for the validate query api. Given that the explain api is a single shard operation (compared to search which is instead a broadcast operation), this doesn't change a lot in how the api works internally. The main benefit is that we can simplify the java api by requiring a structured query object to be provided rather than a bytes array that will get parsed on the data node. Previously if you specified a QueryBuilder it would be serialized in json format and would get reparsed on the data node, while now it doesn't go through parsing anymore (as expected), given that after the query-refactoring we are able to properly stream queries natively. Note that the WrapperQueryBuilder can be used from the java api to provide a query as a string, in that case the actual parsing of the inner query will happen on the data node.

Relates to #10217
Closes #14384
2015-11-02 11:21:20 +01:00
Ryan Ernst b6dee6bd43 Merge pull request #14375 from rjernst/sweep_up_maven
Remove maven pom files and supporting ant files
2015-10-30 18:59:11 -07:00
Ryan Ernst 0a4fa7453b Merge pull request #14402 from rjernst/reorganize_rr_gradle_plugin
Move RR gradle plugin files to match external repo paths
2015-10-30 15:20:09 -07:00
Lee Hinman f726e11da6 Move logging for the amount of free disk to TRACE
Since this can potentially be logged for every `canRemain`, it's nicer
to put it in TRACE rather than DEBUG.

Resolves #12843
2015-10-30 14:56:11 -06:00
Ryan Ernst 197ed57ea4 Build: Move RR gradle plugin files to match external repo paths
The RR gradle plugin is at
https://github.com/randomizedtesting/gradle-randomized-testing-plugin.
However, we currently have a copy of this, since the plugin is still in
heavy development. This change moves the files around so they can be
copied directly from the elasticsearch fork to that repo, for ease of
syncing.
2015-10-30 13:22:59 -07:00
Areek Zillur 13b60e1b92 update to lucene-5.4.x-snapshot-1711508 2015-10-30 15:42:02 -04:00
Nik Everett c521b27e31 Merge pull request #13657 from nik9000/remove_transport
Remove transform
2015-10-30 12:34:08 -04:00
Nik Everett 28633fae21 [mapping] Remove transform
Removes the mapping transform feature which when used made debugging very
difficult. Users should transform their documents on the way into
Elasticsearch rather than having Elasticsearch do it.

Closes #12674
2015-10-30 11:46:54 -04:00
Christoph Büscher 5fcc648047 Tests: Check exception from query parsers for unknown field
Most query parsers throw a ParsingException when they trying
to parse a field with an unknown name. This adds a generic
check for this to the AbstractQueryTestCase so the behaviour
gets tested for all query parsers. The test works by first
making sure the test query has a `boost` field and then
changing this to an unknown field name and checking for an
error.

There are exceptions to this for WrapperQueryBuilder
and QueryFilterBuilder, because here the parser only expects
the wrapped `query` element. MatchNoneQueryBuilder and
MatchAllQueryBuilder so far had setters for boost() and
queryName() but didn't render them, which is added here for
consistency.

GeoDistance, GeoDistanceRange and GeoHashCellQuery so far
treat unknown field names in the json as the target field name
of the center point of the query, which so far was handled by
overwriting points previously specified in the query. This
is changed here so that an attempt to use two different field names
to specify the central point of the query throws a
ParsingException

Relates to #10974
2015-10-30 16:36:00 +01:00
Simon Willnauer b17d8c2c97 Merge pull request #14355 from s1monw/rewrite_analysis_registry
Simplify Analysis registration and configuration
2015-10-30 12:01:31 +01:00
Simon Willnauer aa38d053d7 Simplify Analysis registration and configuration
This change moves all the analysis component registration to the node level
and removes the significant API overhead to register tokenfilter, tokenizer,
charfilter and analyzer. All registration is done without guice interaction such
that real factories via functional interfaces are passed instead of class objects
that are instantiated at runtime.

This change also hides the internal analyzer caching that was done previously in the
IndicesAnalysisService entirely and decouples all analysis registration and creation
from dependency injection.
2015-10-30 11:40:18 +01:00
Yannick Welsch 017af34971 Merge pull request #14360 from ywelsch/fix/rest-indices-action
Properly set indices and indicesOptions on subrequest made by /_cat/indices
2015-10-30 11:34:04 +01:00
Ryan Ernst 542522531a Build: Remove maven pom files and supporting ant files
This change removes the leftover pom files. A couple files were left for
reference, namely in qa tests that have not yet been migrated (vagrant
and multinode). The deb and rpm assemblies also still exist for
reference when finishing their setup in gradle.

See #13930
2015-10-29 23:53:49 -07:00
Ryan Ernst 63f6c6db85 Build: Move test framework files to their new location
The test jar was previously built in maven by copying class files. With
gradle we now have a proper test framework artifact. This change moves
the classes used by the test framework into the test-framework module.

See #13930
2015-10-29 23:25:24 -07:00
Jason Tedor c7897a7524 Make throw statement consistent with others in same class 2015-10-29 21:53:33 -04:00