Commit Graph

2279 Commits

Author SHA1 Message Date
Jason Tedor 8278c9887e Restore build properties
This commit restores the build properties provided in
org.elasticsearch.Build. This class previously obtained the build hash
and timestamp from a resource es-build.properties that was included in
the jar and produced by the Maven resources plugin. After the switch to
Gradle, the production of this file was lost and these build properties
defaulted to “NA” in all instances.

The most important place that the build hash is used is in the plugin
manager to determine the URL of staging artifacts for plugins.

The build hash is also used in several responses including the /_nodes
response and the response to HTTP GET requests on the root path.

These properties can now be obtained from the jar manifest as they are
currently placed there by the gradle-info plugin. However, only the
short hash is provided. We now read the manifest for these properties
and no longer provide the full hash in responses to HTTP GET requests
on the root path.
2015-11-05 21:30:04 -05:00
Simon Willnauer b328e26160 Merge pull request #14518 from s1monw/simplify_index_level_services
Remove guice from the index level
2015-11-05 15:06:37 +01:00
Robert Muir fffafbfd4d Merge pull request #14274 from rmuir/broken_code
Add workaround for JDK-8014008
2015-11-05 08:24:04 -05:00
Simon Willnauer 94bed42213 Simplify plugin API and fix IndexService internal allocation 2015-11-05 13:16:35 +01:00
Simon Willnauer cf0179bf12 apply @rjernst review comments 2015-11-05 11:18:12 +01:00
Simon Willnauer 0dac6bfa86 fix return value 2015-11-05 11:18:11 +01:00
Simon Willnauer a4a0390ff6 Move inactiveTime into IndexShard out of IndexingMemoryController 2015-11-05 11:18:11 +01:00
Simon Willnauer 7d77f182e2 fix tests 2015-11-05 11:18:11 +01:00
Simon Willnauer a311491c8e decouple IndexingMemoryController from IndexShard 2015-11-05 11:18:11 +01:00
Simon Willnauer 487af301ea Remove guice from the index level
This commit removes guice from the index level and adds a simple extension point
to add class instances with an index-lifecycle scope.
2015-11-05 11:18:11 +01:00
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