Commit Graph

14211 Commits

Author SHA1 Message Date
szroland 68d658a30f Recovery: Fix wrong reused file bytes in Recovery API reports
Simple snapshot.restore test case that also exposes the bug mentioned in #11876

Fix #11876
Closes #11965
2015-07-01 09:08:53 +02:00
Martijn van Groningen ef9d70b9b3 field stats: added index constraints
Field stats index constraints allows to omit all field stats for indices that don't match with the constraint. An index
constraint can exclude indices' field stats based on the `min_value` and `max_value` statistic. This option is only
useful if the `level` option is set to `indices`.

For example index constraints can be useful to find out the min and max value of a particular property of your data in
a time based scenario. The following request only returns field stats for the `answer_count` property for indices
holding questions created in the year 2014:

curl -XPOST 'http://localhost:9200/_field_stats?level=indices' -d '{
   "fields" : ["answer_count"] <1>
   "index_constraints" : { <2>
      "creation_date" : { <3>
         "min_value" : { <4>
            "gte" : "2014-01-01T00:00:00.000Z",
         },
         "max_value" : {
            "lt" : "2015-01-01T00:00:00.000Z"
         }
      }
   }
}'

Closes #11187
2015-07-01 08:47:03 +02:00
Boaz Leskes 3cf78669f2 Mute testInstallPluginWithElasticsearchDownloadService & testInstallPluginWithMavenCentral
Example failure: http://build-us-00.elastic.co/job/es_core_master_oracle_6/519/testReport/
2015-07-01 08:34:47 +02:00
Robert Muir 5294b1ae40 Merge pull request #11963 from rmuir/prevent_hell
detect jar hell before installing a plugin
2015-07-01 00:00:12 -04:00
Robert Muir f312a4e30d cleanup uwe's unzip code 2015-06-30 23:59:45 -04:00
Igor Motov 2a9f26dfdc Improve repository verification failure message
Closes #11922
2015-06-30 20:08:15 -04:00
Simon Willnauer 04631d6948 Carry on headers if unknow exception is a WithRestHeadersException 2015-06-30 23:02:45 +02:00
Simon Willnauer c6837f56d9 Serialize AlreadyClosedException first before it's superclass 2015-06-30 23:02:45 +02:00
Robert Muir a839644826 detect jar hell before installing a plugin 2015-06-30 16:42:01 -04:00
Ryan Ernst 4b3dba527b Mappings: Rename "root" mappers to "metadata" mappers
"Root" is a very confusing term for meta field mappers. This change
renames "RootMapper" to "MetadataFieldMapper" and simplifies
how metadata mappers are setup.

It also requires that metadata mappers are now a FieldMapper
(MetadataFieldMapper extends from AbstractFieldMapper). The only
use of a root mapper that wasn't a field mapper was the theoretical
"external" root mapper (just a test mapper). But it doesn't make
sense to not have an actual field, and this falls inline with
the hopefully eventual collapsing of AbstractFieldMapper/FieldMapper/Mapper.
2015-06-30 13:31:17 -07:00
Boaz Leskes 182c59f5b4 Discovery: reroute after node join is processed
- shard listing actions underpinning shard allocation do not have access to that new node yet (causing errors during shard allocation see #11923
 - the very first cluster state published to a node already has shard assignments to it. This surfaced other issues we are working to fix separately

 This commit changes the reroute to be done post processing the initial join cluster state to side step these issues while we work on a longer term solution.

Closes #11960
2015-06-30 22:09:29 +02:00
Michael McCandless 48b85421ec fix smoke_test_plugins.py: install the .zip under releases, not the .jar 2015-06-30 15:03:54 -04:00
Simon Willnauer dab2a76eae Cut over to writeable for TransportAddress
This will allow us to move away from reflection hacks to serialize
transport exceptions.
2015-06-30 20:59:47 +02:00
Michael McCandless 46e35e5576 Merge pull request #11957 from mikemccand/smoke_test_plugins
Add simple plugins smoke tester

Closes #11935
2015-06-30 14:34:24 -04:00
Michael McCandless 189ef91e3c first cut 2015-06-30 14:14:45 -04:00
Clinton Gormley 93fe8f8910 Docs: Updated the translog docs to reflect the new behaviour/settings in master
Closes #11287
2015-06-30 19:08:31 +02:00
Colin Goodheart-Smithe a847dd267c [TEST] Fix location of render_search_template.json 2015-06-30 17:45:43 +01:00
Martijn van Groningen c6ae6fc6d9 percolator: `getTime` -> `time` 2015-06-30 18:44:58 +02:00
Colin Goodheart-Smithe d9ab3cba77 Search Templates: Adds API endpoint to render search templates as a response
Closes #6821
2015-06-30 16:57:23 +01:00
Simon Willnauer bbaf4710cb FileName is optional in StacktraceElement 2015-06-30 15:51:48 +02:00
Simon Willnauer 0ac8c1bc55 Carry on stacktrace and suppressed exceptions if exception is not serializable 2015-06-30 14:51:44 +02:00
Simon Willnauer 6ee9a3d5f2 add more essential exceptions 2015-06-30 14:51:44 +02:00
Simon Willnauer 971ac0475e add IOOB to supported exceptions 2015-06-30 14:51:44 +02:00
Simon Willnauer 0148c462e0 remove leftover ObjectOutputStream references 2015-06-30 14:51:44 +02:00
Simon Willnauer 325cc6bc61 serialize as not-serializable if exception is not registered 2015-06-30 14:51:44 +02:00
Simon Willnauer 4e2621ca21 Cleanup non-serializable code 2015-06-30 14:51:44 +02:00
Simon Willnauer c4f15c2c91 add dedicated unittests for exceptions that have a writeTo method (custom serialization) 2015-06-30 14:51:44 +02:00
Simon Willnauer 62d29ff6a4 simplify exception reading / writing - now use a named exception for unknonw exceptions 2015-06-30 14:51:43 +02:00
Simon Willnauer fa016a2b09 Don't implement Serializable in core classes
We can't add this to forbidden API since literally everything implements this.
Any API that would for instance use a String would not compile anymore.
2015-06-30 14:51:43 +02:00
Simon Willnauer e7eb9cf4de Ban java serialization
We had several problems with Java Serializatin in the past. At some point
in the Java 1.7.x series JDKs where not compatible anymore when java
serialization (ObjectStream) was used to exchange objects. In elasticsearch
we used this to serialize exceptions across the wire which caused several problems
with incompatible JDKs. While causing lot of trouble this essentially prevented
users from moving forward and upgrade their JVMs. To prevent these kind of issues
this commit removes the dependency on java serialization entirely and bans the
usage of ObjectOutputStream and ObjectInputStream entirely.

Yet, we can't fully serialize all exception anymore such that this commit
is best effort and adds hand written serialization to all elasticsearch exceptions
as well to a selected set of JDK and Lucene exceptions. (see StreamOutput#writeThrowable /
StreamInput.readThrowable). Stacktraces should be preserved for all exceptions while
several names might be replaced with ElasticsearchException if there is no mapping for
the given exception.
2015-06-30 14:51:43 +02:00
Alexander Reelsen f26672c184 Release: Build two RPMS, signed and unsigned
In order to support older RPM based distributions like CentOS5,
we should have one RPM available, which is not signed.

This commit creates an unsigned RPM first, then moves it over to
target/releases during the build, then builds a signed RPM.

The unsigned one is uploaded via S3, where as the signed one is
used for the repositories.

In addition, you can now build an RPM without having to specify
any gpg credentials due to offloading this into a maven profile
that is only activated when specifying `rpm.sign` property.

Closes #11587
2015-06-30 14:22:20 +02:00
Clinton Gormley c373c872f8 Merge pull request #11921 from clintongormley/delayed_alloc_docs
Docs: Documented delayed allocation settings
2015-06-30 13:54:26 +02:00
Clinton Gormley 84acb65ca1 Docs: Documented delayed allocation settings
Relates to: #11712
2015-06-30 13:53:04 +02:00
Simon Willnauer d1a29a63d2 Decode URL.getPath before resolving a real file
URL with spaces are URL-Encoded and need to be decoded before
they can be used to open files etc.
2015-06-30 13:33:40 +02:00
Boaz Leskes 4102e263df AwaitFix testTracerLog 2015-06-30 13:25:27 +02:00
Boaz Leskes 4649650ab2 Merge pull request #11928 from szroland/#11897
Create Snapshot: remove _create from POST path to match PUT

Closes #11928
2015-06-30 12:16:22 +02:00
Colin Goodheart-Smithe 62cbeecadf [DOCS] marked pipeline aggregator documentation as Experimental 2015-06-30 10:30:50 +01:00
Clinton Gormley 58d6a6b144 Merge pull request #11927 from clintongormley/license_check_usage
Build: If SHA files have changed, explain how to update them in the license check exception
2015-06-30 11:29:48 +02:00
Clinton Gormley fa40680736 Build: If SHA files have changed, explain how to update them in the license check exception 2015-06-30 11:29:35 +02:00
Martijn van Groningen 1df8e56a83 Merge pull request #11929 from martijnvg/percolator/drop__own_qpc_cache
The query parse context should be fetched from the IndexQueryParseService
2015-06-30 11:04:32 +02:00
Adrien Grand ed561cd434 Merge pull request #11768 from jpountz/fix/stream_eos
Make sure messages are fully read even in case of EOS markers.
2015-06-30 09:00:59 +02:00
Alexander Reelsen 185dbac8fe Testing: Fix running of rest tests against external cluster
The TransportClient specified in the ExternalCluster was missing a
`path.home` setting and thus would not start.
2015-06-30 08:17:45 +02:00
Robert Muir 70fbc53869 Merge pull request #11936 from rmuir/jdkhell
jar hell check should fail, if jars require higher java version
2015-06-30 02:16:18 -04:00
Robert Muir f20e23e6fb jar hell check should fail, if jars require higher java version 2015-06-30 01:49:27 -04:00
Robert Muir 0b2070e350 Merge pull request #11932 from rmuir/jarhell
Fail startup (and tests) on jar hell
2015-06-30 00:58:44 -04:00
Robert Muir 46256e25f6 fix licensing 2015-06-30 00:55:11 -04:00
Robert Muir 4059d7c18d tests: fix test bugs 2015-06-30 00:16:39 -04:00
Robert Muir b58eb35dfa detect jar hell in tests better and fix more stuff 2015-06-30 00:12:40 -04:00
Robert Muir f8fbf1fa0c Fail startup (and tests) on jar hell 2015-06-29 23:13:45 -04:00
Martijn van Groningen 07090b8ee8 percolator: The query parse context should be fetched from the IndexQueryParseService
instead of maintaining a thread local cache in the PercolatorQueriesRegistry.
Before PercolatorQueriesRegistry had its own cache, because all the queries had to forcefully opt out of caching. Nowadays in master small segments are never cached by the query cache, so the reason for the dedicated cache is no longer valid.
2015-06-30 00:32:09 +02:00