7755 Commits

Author SHA1 Message Date
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
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
javanna
654dc20897 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/common/io/stream/StreamInput.java
	core/src/main/java/org/elasticsearch/transport/local/LocalTransport.java
	core/src/main/java/org/elasticsearch/transport/netty/MessageChannelHandler.java
2015-06-30 17:38:31 +02: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
javanna
10f80167e6 Query refactoring: validate inner queries whenever supported
Added validation for all inner queries that any already refactored query may hold. Added also tests around this. At the end of the refactoring validate will be called by SearchRequest#validate during TransportSearchAction execution, which will call validate against the top level query builder that will need to go and validate its data plus all of its inner queries, and so on.

Closes #11889
2015-06-30 14:24:25 +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
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
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
Christoph Büscher
4406d236de Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/transport/netty/MessageChannelHandler.java
2015-06-30 10:52:34 +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
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
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
Robert Muir
0bb65f710e tests: simple tests for things we should kick out 2015-06-29 17:21:25 -04:00
szroland
e2d76aaa20 remove _create from POST to match PUT path 2015-06-29 21:55:52 +02:00
Simon Willnauer
d274e585e6 Add jsr-166e license, notice and sha1 hash 2015-06-29 21:17:22 +02:00
Simon Willnauer
fcbd0dddcd Don't pull the engine for access to the QueryCachingPolicy 2015-06-29 21:07:47 +02:00
Robert Muir
0ae638fbb2 Merge pull request #11918 from rmuir/plugin_manager_classpath
Load plugins into classpath in bootstrap
2015-06-29 14:45:38 -04:00
Robert Muir
3f95275f23 Add back check with a note, so anyone reviewing isn't confused. 2015-06-29 13:20:53 -04:00
Robert Muir
b93af3c27c Remove try/finally, its not necessary here 2015-06-29 12:35:59 -04:00
Robert Muir
f9598030fd Load plugins into classpath in bootstrap 2015-06-29 12:11:04 -04:00
Martijn van Groningen
c9f21a7ecc Merge pull request #11909 from martijnvg/nested_query_min_score_mode
Added `min` score mode.
2015-06-29 17:48:48 +02:00
Robert Muir
55c33b29f6 Merge pull request #11898 from rmuir/lockdown
steps to remove dangerous security permissions
2015-06-29 11:13:16 -04:00
Simon Willnauer
2dfd6df369 Merge pull request #11911 from s1monw/no_utf_uuid
Don't convert possibly corrupted bytes to UTF-8
2015-06-29 15:00:40 +02:00
Colin Goodheart-Smithe
b5e958b2e0 Aggregations: Fix bucket_script builder method name 2015-06-29 12:53:38 +01:00
Adrien Grand
ccaf846f1e Store filter cache statistics at the shard level instead of index.
Today we keep track of how often filters are used at the index level in order
to decide whether they should be cached or not. This is an issue if you have
several shards of the same index on the same node as it will multiply statistics
by the number of shards that you have for this index on the node, which defeats
the purpose of waiting for a filter to be reused before caching them.
2015-06-29 13:34:31 +02:00
Simon Willnauer
1a44afed05 Don't convert possibly corrupted bytes to UTF-8
If the translog UUID is corrupted we should not convert it
to UTF-8 since it might be invalid. Instead we should compare
the UTF-8 byte representation directly.
2015-06-29 13:16:52 +02:00
Adrien Grand
21ffd931ec Fix missing renamings.
Relates to #11893
2015-06-29 12:47:10 +02:00
Martijn van Groningen
47a43e4063 nested query: Added min score mode.
This score mode was added with the Lucene 5.2 release, but the `nested` query parser hasn't been changed to use it.
2015-06-29 12:26:30 +02:00
Masaru Hasegawa
80d0f1e5ea Fix RecoveryState timestamps
Use System.currentTimeMillis() for wall clock time and use System.nanoTime() for delta.
Fixes #11870.
2015-06-29 19:24:23 +09:00
Boaz Leskes
37bde56971 Internal: ClusterStateObserver should log on trace on timeout
This more consistent with the other logging it makes and since it can be used in many operations the output can be more verbose (without adding too much info as to who timed out exactly - which we can fix separately). If need be the caller of the observer can log a higher level message.

Closes #11722
2015-06-29 11:50:44 +02:00
Christoph Büscher
53f6bf0625 Merge branch 'master' into feature/query-refactoring 2015-06-29 10:54:45 +02:00
Adrien Grand
38f5cc236a Rename caches.
In order to be more consistent with what they do, the query cache has been
renamed to request cache and the filter cache has been renamed to query
cache.

A known issue is that package/logger names do no longer match settings names,
please speak up if you think this is an issue.

Here are the settings for which I kept backward compatibility. Note that they
are a bit different from what was discussed on #11569 but putting `cache` before
the name of what is cached has the benefit of making these settings consistent
with the fielddata cache whose size is configured by
`indices.fielddata.cache.size`:
 * index.cache.query.enable -> index.requests.cache.enable
 * indices.cache.query.size -> indices.requests.cache.size
 * indices.cache.filter.size -> indices.queries.cache.size

Close #11569
2015-06-29 10:15:27 +02:00