Commit Graph

622 Commits

Author SHA1 Message Date
Robert Muir 0e027d82c9 Merge pull request #12602 from rmuir/core_integ_tests
Add integration test phase for elasticsearch core/
2015-08-03 10:15:37 -04:00
Robert Muir 379ffdb8ee Add integration test phase for elasticsearch core/ 2015-08-03 09:43:11 -04:00
Britta Weber 26d51c299e Merge pull request #12400 from brwe/plug-fetch-sub-phases
Make fetch sub phases pluggable
2015-08-03 15:19:28 +02:00
Robert Muir c5b91b9058 Merge pull request #12589 from rmuir/shading_cleanup
Fix shaded jar packaging
2015-08-03 08:10:50 -04:00
Adrien Grand 365a324fc5 Tests: Add more logging to SearchPreferenceTests so that we can know which preference is failing. 2015-08-03 12:55:15 +02:00
Colin Goodheart-Smithe ade3881152 Aggregations: Full path validation for pipeline aggregations
Previously only the first aggregation in a buckets_path was check to make sure the aggregation existed. Now the whole path is checked to ensure an aggregation exists at each element in the buckets_path

Closes #12360
2015-08-03 11:15:40 +01:00
Robert Muir a5a27a5cd9 Add jar hell check test for the shaded jar 2015-08-03 05:54:55 -04:00
Robert Muir 20ed7c1724 Merge pull request #12586 from rmuir/exit_value
Fix Bootstrap to not call System.exit
2015-08-03 05:27:08 -04:00
Martijn van Groningen 50c345238b fix ShardUtils#getElasticsearchDirectoryReader(...) to use FilterDirectoryReader#getDelegate() 2015-08-03 09:54:56 +02:00
Robert Muir 6f33ea4f62 move shading to distribution/shaded 2015-08-01 11:37:43 -04:00
Robert Muir d173b89d11 make this less syntactically confusing 2015-07-31 14:13:00 -04:00
Robert Muir 5f9edd26ea Fix Bootstrap to not call System.exit
Its not going to work: its blocked by security policy
and will just add a confusing SecurityException to the mix, and
bogusly give an exit status of 0 when in fact something bad happened.

Finally, if ES can't startup, it is a serious problem, there is
no sense in hiding the reason why: deliver the full stack trace.
2015-07-31 14:00:18 -04:00
Robert Muir 8d5b5ad862 restore my lost code changes and add measures to detect/prevent this in the future 2015-07-31 13:00:24 -04:00
Igor Motov 354504334f Create a directory during repository verification
The repository verification process should create a subdirectory to make sure we check permission of newly created directories in case elasticsearch processes on different nodes are running using different uids and creating blobs with incompatible permissions.

Closes #11611
2015-07-31 12:11:05 -04:00
Robert Muir f804ec3cd9 cleanup 2015-07-31 10:05:11 -04:00
Robert Muir fd8e92a18a don't represent site plugins with 'null' anymore 2015-07-31 09:41:39 -04:00
Lee Hinman 5a8356c86e Reroute shards when a node goes under disk watermarks
Previously we issued a reroute when a node went over the high watermark
in order to move shards away from the node. This change tracks nodes
that have previously been over the high or low watermarks and issues a
reroute when the node goes back underneath the watermark.

This allows shards that may be unassigned to be assigned back to a node
that was previously over the low watermark but no longer is.

Resolves #12422
2015-07-30 16:32:54 -06:00
Robert Muir ba63d57e82 don't lose stacktrace if a plugin somehow makes jar hell 2015-07-30 15:56:33 -04:00
Britta Weber 8a4957967b more review comments 2015-07-30 17:47:21 +02:00
Alexander Reelsen a8310d0575 Tests: Fix CLI help checking tests under windows
As windows has different line endings and this has
already been fixed by another test, the method has been
moved into CliToolTestCase.

In addition one test has been removed, as it was redundant.
2015-07-30 16:12:14 +02:00
Alexander Reelsen 69d7f1a78a Startup: Remove getopt parsing in shell script, use java CLITool
In order to ensure, we have the same experience across operating systems
and shells, this commit uses the java CLI parser instead of the shell
getopt parsing to parse arguments.

This also allows for support for paths, which contain spaces.

Also commons-cli depdency was upgraded to 1.3.1 and tests have been added.

Changes

* new exit code, OK_AND_EXIT, allowing to tell the caller to exit, as everything
  went as expected (e.g. when running a version output)

BWC breaking:

* execute() returns an ExitStatus instead of an integer, otherwise there is no
  possibility to signal by a command, if the JVM should be exited after a run.
  This affects plugins, that have command line tools
* -v used to be version, but is a verbose flag by default in the current CLI infra,
  must be -V or --version now
* -X has been removed - the current implementation was useless anyway, as
  it prefixed those properties with "es.". You should use
  ES_JAVA_OPTS/JAVA_OPTS for JVM configuration
2015-07-30 13:20:29 +02:00
Martijn van Groningen b3b34668e8 made `dateMathExpressionResolver` final 2015-07-30 11:34:10 +02:00
Adrien Grand 23fa535bfa Upgrade HDRHistogram to version 2.1.6.
This release fixes https://github.com/HdrHistogram/HdrHistogram/pull/68 which
we have been hitting in our CI tests, for instance:
http://build-us-00.elastic.co/job/es_core_master_metal/10567/
2015-07-30 09:55:12 +02:00
Dave Parfitt 2d2f21e760 Merge pull request #12534 from metadave/feature/cat_nodeattrs
Add _cat/nodeattrs API
2015-07-29 17:01:22 -04:00
Dave Parfitt f209809716 Add _cat/nodeattrs API
This provides a _cat/nodeattrs API call, which presents
custom node attributes in a denormalized table.

Closes #8000
2015-07-29 16:11:18 -04:00
Martijn van Groningen 0c53204b40 Added RealtimeRequest interface and let GetRequest, MultiGetRequest, TermVectorsRequest and MultiTermVectorsRequest implement it.
This is useful because now all requests that are realtime are now grouped under the same marker interface.
2015-07-29 21:47:11 +02:00
Robert Muir c6d6eaef4d Add a run.sh to run from current source code with debugger
The maven magic needed for this is now heavier
2015-07-29 14:21:43 -04:00
Britta Weber b86d07fc9a generic for sub classes also? 2015-07-29 17:37:11 +02:00
Martijn van Groningen ac3d090379 Added date math support in index names
Date math index name resolution enables you to search a range of time-series indices, rather than searching all of your time-series indices and filtering the the results or maintaining aliases. Limiting the number of indices that are searched reduces the load on the cluster and improves execution performance. For example, if you are searching for errors in your daily logs, you can use a date math name template to restrict the search to the past two days.

The added `ExpressionResolver` implementation that is responsible for resolving date math expressions in index names. This resolver is evaluated before wildcard expressions are evaluated.

The supported format: `<static_name{date_math_expr{date_format|timezone_id}}>` and the date math expressions must be enclosed within angle brackets. The `date_format` is optional and defaults to `YYYY.MM.dd`. The `timezone_id` id is optional too and defaults to `utc`.

The `{` character can be escaped by places `\\` before it.

Closes #12059
2015-07-29 17:33:55 +02:00
Britta Weber 6754a26d08 more generic? 2015-07-29 16:46:13 +02:00
Britta Weber d113b59e86 add SearchContext to innerParse method 2015-07-29 16:06:40 +02:00
Britta Weber 6295738d4c make Context generic so we don't have to cast 2015-07-29 16:00:37 +02:00
Britta Weber 24c4b27978 add some documentation 2015-07-29 15:44:58 +02:00
Britta Weber 3ee3238d54 remove unused imports and vars 2015-07-29 15:44:58 +02:00
Britta Weber ea14f675b2 remove hasFetchSubPhaseContext 2015-07-29 15:44:58 +02:00
Britta Weber df339f4cb9 toArray 2015-07-29 15:44:58 +02:00
Britta Weber 5f0f66908e make fielddata fields a plugin 2015-07-29 15:44:58 +02:00
Britta Weber bcebb61f25 make fetch sub phases pluggable 2015-07-29 15:44:58 +02:00
Alexander Reelsen 86ab892986 Releases: Added version numbers & bwc indices for 1.6.2/1.7.1 2015-07-29 12:31:39 +02:00
Martijn van Groningen 5d7ed70fa0 Merge pull request #12518 from martijnvg/top_hits/bug/protected_against_crazy_size
Protected against  `size` and `offset` larger than total number of document in a shard
2015-07-29 10:33:27 +02:00
Dave Parfitt dc597f0bf5 Merge pull request #12509 from metadave/dp_snake_case_dates
Default date formats to use underscores via PUT
2015-07-28 16:57:45 -04:00
Lee Hinman 2dc4550839 Add more debugging information to the Awareness Decider
Relates to #12431
2015-07-28 13:48:40 -06:00
Jason Tedor 37177d2f4c Use consistent check whether or not timeout is set 2015-07-28 15:44:55 -04:00
Martijn van Groningen 3f6e470810 top_hits: If topN (based on `offset` + `size`) is higher than the maxDoc of an shard then normalize topN to maxDoc.
Closes #12510
2015-07-28 21:38:58 +02:00
Nik Everett d8a6ddf580 Merge _all: Stop NPE querying _all when it doesn't exist 2015-07-28 10:18:17 -04:00
Dave Parfitt af17b9cd40 Use underscores for date formats
@clintongormley

Closes #12429
2015-07-28 10:04:28 -04:00
Nik Everett adcd1fc11d _all: Add missing boost
When we rewrite to a MatchNoTermsQuery we were throwing out the boost which
could could lead to funky changes when the query against _all was in a
bool query.
2015-07-28 09:25:06 -04:00
Colin Goodheart-Smithe 2ebf229632 Aggregations: Fixes serialization of HDRHistogram in percentiles aggregations
Previously we would write the entire ByteBuffer to the stream to serialise the HDRHistogram even if it was not all needed. Now we only write the bytes that are actually written to in the ByteBuffer.
2015-07-28 14:07:06 +01:00
Colin Goodheart-Smithe 7ab9bbbfad [Test] Muted all HDRPercentilesTests and HDRPercentileRanksTests 2015-07-28 10:17:47 +01:00
Nik Everett d7491515b2 _all: Stop NPE querying _all when it doesn't exist
This can happen in two ways:
1. The _all field is disabled.
2. There are documents in the index, the _all field is enabled, but there are
no fields in any of the documents.

In both of these cases we now rewrite the query to a MatchNoDocsQuery which
should be safe because there isn't anything to match.

Closes #12439
2015-07-27 16:23:32 -04:00