Commit Graph

14640 Commits

Author SHA1 Message Date
Christoph Büscher af75117845 Merge branch 'master' into feature/query-refactoring 2015-07-30 11:33:53 +02:00
Adrien Grand 6893643bef Build: Set the correct sha1 for HDRHistogram. 2015-07-30 10:24:55 +02:00
Adrien Grand b24779cc29 Tests: Disable system assertions for now.
We have had lots of test failures due to Groovy scripts making an assertion
trip in
`sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.getLowerBoundASTs`.
See https://issues.apache.org/jira/browse/GROOVY-7528.
2015-07-30 10:18:06 +02:00
Adrien Grand 3a1da8dfab Merge pull request #12554 from jpountz/upgrade/hdr_histogram_216
Upgrade HDRHistogram to version 2.1.6.
2015-07-30 10:05:23 +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
Dave Parfitt 21abc2f7eb Merge pull request #12541 from metadave/dp_testing_run_docs
update TESTING doc to use run.sh script
2015-07-29 14:42:32 -04:00
Dave Parfitt c755033fee update TESTING doc to use run.sh script 2015-07-29 14:41:23 -04:00
Robert Muir 0a35ef3016 Merge pull request #12540 from rmuir/run_dot_sh
Add a run.sh to run from current source code with debugger
2015-07-29 14:38:37 -04:00
Robert Muir bf579381a4 explicitly add dev-tools, it doesnt use our parent, which might be scarier 2015-07-29 14:32:05 -04:00
Robert Muir cda613a5df make this more bulletproof by using current dev-tools/poms/etc too 2015-07-29 14:30:18 -04: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
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
Alexander Reelsen c423319dda Build: Remove profile to create attached RPM
This is no longer necessary, as the RPM is now built as
a primary artifact, so no need to deploy it as a secondary
artifact anymore.

Closes #12529
2015-07-29 15:54:26 +02:00
Robert Muir c6abf28273 Disable license checker temporarily to get regression builds working again
x
2015-07-29 08:39:25 -04: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
Christoph Büscher a1948350a5 Merge branch 'master' into feature/query-refactoring 2015-07-29 10:51:08 +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 62c4abd14c Added an import statement. 2015-07-28 14:19:45 -06: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
Jason Tedor 24452e7206 Merge pull request #12491 from jasontedor/fix/elasticsearch-cloud-azure-100
Add integration test for Azure snapshot repository bug
2015-07-28 09:46: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
javanna f6ca11db30 [TEST] remove createExpectedQuery from BaseQueryTestCase
We currently test the toQuery method by comparing its return value with the output of createExpectedQuery. This seemed at first like a good deep test for the lucene generated queries, but ends up causing a lot of code duplication between tests and prod code, which smells like this test is not that useful after all.

This commit removes the requirement for createExpectedQuery, we test a bit less the lucene generated queries, but we do still have a testToQuery method in BaseQueryTestCase. This test acts as smoke test to verify that there are no issues with our toQuery method implementation for each query: it verifies that two equal queries should result in the same lucene query. It also verifies that changing the boost value of a query affects the result of the toQuery.

Part of the previous createExpectedQuery can be moved to assertLuceneQuery using normal assertions, we do it when it makes sense only though.

This commit also adds support for boost and queryName to SpanMultiTermQueryParser and SpanMultiTermQueryBuilder, plus it removes no-op setters for queryName and boost from QueryFilterBuilder. Instead we simply declare in our test infra that query filter doesn't support boost and queryName and we disable tests aroudn these fields in that specific case. Boost and queryName support is also moved down to the QueryBuilder interface.

Closes #12473
2015-07-28 14:24:50 +02:00
Christoph Büscher b780346cb7 Merge branch 'master' into feature/query-refactoring 2015-07-28 11:28:45 +02: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
Boaz Leskes 616941e902 Internal: IndicesStore shouldn't try to delete index after deleting a shard
When a node discovers shard content on disk which isn't used, we reach out to all other nodes that supposed to have the shard active. Only once all of those have confirmed the shard active, the shard has no unassigned copies *and* no cluster state change have happened in the mean while, do we go and delete the shard folder.

Currently, after removing a shard, the IndicesStores checks the indices services if that has no more shard active for this index and if so, it tries to delete the entire index folder (unless on master node, where we keep the index metadata around). This is wrong as both the check and the protections in IndicesServices.deleteIndexStore make sure that there isn't any shard *in use* from that index. However, it may be the we erroneously delete other unused shard copies on disk, without the proper safety guards described above.

Normally, this is not a problem as the missing copy will be recovered from another shard copy on another node (although a shame). However, in extremely rare cases involving multiple node failures/restarts where all shard copies are not available (i.e., shard is red) there are race conditions which can cause all shard copies to be deleted.

Instead, we should change the decision to clean up an index folder to based on checking the index directory for being empty and containing no shards.
2015-07-27 16:09:25 -04:00
Chris Earle 15ea07f8c0 Merge pull request #11735 from pickypg/feature/use-gc-datestamps-11733
Add -XX:+PrintGCDateStamps when using GC Logs
2015-07-27 15:20:50 -04:00
Chris Earle e1c99bc8b4 Add -XX:+PrintGCDateStamps when using GC Logs
Now that Elasticsearch requires Java 7 or later, it's safe to add `-XX:+PrintGCDateStamps` to get human readable times alongside JVM times.
2015-07-27 15:17:54 -04:00
Jason Tedor b0564cb75c Add integration test for Azure snapshot repository bug
This commit adds an integration test that replicates the Azure snapshot repository bug in elastic/elasticsearch-cloud-azure#51.

Closes elastic/elasticsearch-cloud-azure#100
2015-07-27 13:52:51 -04:00
Lee Hinman b8b96679ea [TEST] Mark 2 HDRPercentileRanks tests with AwaitsFix 2015-07-27 11:40:20 -06:00
Jason Tedor 45fadd4955 Use correct settings keys for setting container, base path and chunk size in Azure integration test 2015-07-27 13:37:58 -04:00
Dave Parfitt 70dfa26678 [DOCS] update TESTING doc running from source
cc @dakrone

see also elasticsearch@48bc49c093516def7cad468d1d97d490d4f609e9
2015-07-27 13:35:12 -04:00
Jason Tedor cdd2da1e1c Check for existence of snapshot index file before attempting delete 2015-07-27 13:28:37 -04:00
David Pilato 1a8c4019a7 [build] Update to maven-shade-plugin 2.4.1
```xml
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-shade-plugin</artifactId>
 <version>2.4.1</version>
</plugin>
```

Release Notes - Maven Shade Plugin - Version 2.4.1
-----------------

https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317921&version=12332978

Bugs:

* [MSHADE-148] - Shade Plugin gets stuck in infinite loop building dependency reduced POM
* [MSHADE-194] - Reporting uses maven-invoker-plugin version 1.9 instead of 1.10
2015-07-27 18:57:14 +02:00
Alexander Reelsen 9628d2632f Build: Split packages into submodules
This change creates a proper `distribution` modules in which we have today packaging for
all of our four current packages:

* zip
* tar.gz
* rpm
* deb

Licenes have moved into the distribution project as well. So have the config/ and the bin/ directory
from the core/ project.

The RPM package is now built, if rpmbuild exists.

The bats tests have been moved as well.

Also the zip distribution now executes the REST integration tests.
2015-07-27 17:50:54 +02:00
Tanguy Leroux 01ae730023 Remove Core Lib directory 2015-07-27 16:52:10 +02:00
Lee Hinman 5fdc6cfc24 Revert "Revert "Consistently name Groovy scripts with the same content""
This reverts commit a33cfe4b11.
2015-07-27 08:49:47 -06:00
Colin Goodheart-Smithe 26a299d0e7 [TEST] muted HDRPercentilesTests.testScript_ExplicitSingleValued_WithParams 2015-07-27 15:42:47 +01:00
Adrien Grand c78fb9ad08 Merge pull request #12484 from jpountz/fix/forbid_Files_isHidden
Forbid Files.isHidden.
2015-07-27 16:21:32 +02:00
Adrien Grand a832987ada Forbid Files.isHidden.
As Robert pointed out on #12465, it has the undesirable property of relying on
the operating system. So it would be better to use a simple rule such as
checking whether the file name starts with a dot.
2015-07-27 16:13:04 +02:00
Christoph Büscher 0128252075 Merge branch 'master' into feature/query-refactoring
core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java
2015-07-27 14:16:39 +02:00