Commit Graph

15173 Commits

Author SHA1 Message Date
Robert Muir 5002f3b5ac Fix compilation... forgot to 'mvn clean' 2015-08-21 11:11:47 -04:00
Robert Muir 2ecf9af71d Merge pull request #13041 from rmuir/consistent_formatting
Use StartupError to format all exceptions hitting the console
2015-08-21 11:09:02 -04:00
Jason Tedor fcb0c4339d Merge pull request #13039 from jasontedor/fix/garbage-in-settings
Do not swallow exceptions thrown while parsing settings
2015-08-21 11:07:16 -04:00
Robert Muir 287789be53 Use StartupError to format all exceptions hitting the console 2015-08-21 11:05:31 -04:00
Jason Tedor f4774d17a6 Do not swallow exceptions thrown while parsing settings
This commit fixes an issue that was causing Elasticsearch to silently
ignore settings files that contain garbage. The underlying issue was
swallowing an SettingsException under the assumption that the only
reason that an exception could be throw was due to the settings file
not existing (in this case the IOException would be the cause of the
swallowed SettingsException). This assumption is mistaken as an
IOException could also be thrown due to an access error or a read
error. Additionally, a SettingsException could be thrown exactly
because garbage was found in the settings file. We should instead
explicitly check that the settings file exists, and bomb on an
exception thrown for any reason.

Closes #13028
2015-08-21 10:43:48 -04:00
Jason Tedor 13c1c27d5a Merge pull request #13036 from jasontedor/limit-type-name-length
Limit type name length
2015-08-21 09:19:11 -04:00
Jason Tedor 1579e491d8 Limit type name length
This commit will limit type name length to be at most 255 characters.

Closes #13021
2015-08-21 09:18:30 -04:00
Jason Tedor f0aae96f11 Utility method for getting the first version prior to given version 2015-08-21 09:18:29 -04:00
Simon Willnauer d96e8634ac Suppress rest exceptions by default and log them instead
Today we are very verbose when rendering exceptions on the rest layer.
Yet, this isn't necessarily very easy to read and way too much infromation most
of the time. This change suppresses the stacktrace rendering by default but instead
adds a `rest.suppressed` logger that logs the suppressed stacktrace or rather the entire
exception on the node that renderes the exception
The log message looks like this:

```
[2015-08-19 16:21:58,427][INFO ][rest.suppressed          ] /test/_search/ Params: {index=test}
[test] IndexNotFoundException[no such index]
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:551)
```
2015-08-21 15:17:45 +02:00
javanna ded442952b Java api: add missing support for escape to QueryStringQueryBuilder
QueryStringQueryParser parses `escape`, but java api users had no chance to actually set it.

Closes #13016
2015-08-21 15:04:53 +02:00
Simon Willnauer 650a86e2ce Merge pull request #12985 from s1monw/cleanup_release_script
Refactor script for RC creation
2015-08-21 14:37:32 +02:00
Simon Willnauer 5458d07ea2 Refactor script for RC creation
The script now allows to run all required steps at once and alternatively
prints out manual instructions to run the steps individually. It also has
flags and options to run debug builds from a local checkout.
2015-08-21 14:36:59 +02:00
Jason Tedor 31b80e4f3f Merge pull request #13010 from jasontedor/feature/improve-java-version-comparison
Improve java version comparison and explicitly enforce a version format
2015-08-21 08:30:50 -04:00
Jason Tedor 5ff1f8a058 Enforce version format for java.version for plugins
Currently we implicitly enforce a version format on the java.version
property for plugins via JarHell.checkJavaVersion. We should explicitly
enforce this version format and specify it in the documentation.

This commit adds an explicit enforcement of the version format on the
java.version property for plugins and updates the documentation for
plugin-descriptor.properties accordingly.

Closes #13009
2015-08-21 08:28:41 -04:00
Jason Tedor 126e8e4aee Improve Java version comparison in JarHell
This commit improves Java version comparison in JarHell.

The first improvement is the addition of a method to check the version
format of a target version string. This method will reject target
version strings that are not a sequence of nonnegative decimal integers
separated by “.”s, possibly with leading zeros (0*[0-9]+(\.[0-9]+)?).
This version format is the version format used for Java specification
versioning (cf. Java Product Versioning, 1.5.1 Specification Versioning
and the Javadocs for java.lang.Package.)

The second improvement is a clean method for checking that a target
version is compatible with the runtime version of the JVM. This is done
using the system property java.specification.version and comparing the
versions lexicograpically. This method of comparison has been tested on
JDK 9 builds that include JEP-220 (the Project Jigsaw JEP concerning
modular runtime images) and JEP-223 (the version string JEP). The class
that encapsulates the methods for parsing and comparing versions is
written in a way that can easily be converted to use the Version class
from JEP-223 if that class is ultimately incorporated into mainline JDK
9.

Closes #12441
2015-08-21 08:27:47 -04:00
Jason Tedor 8fca951be0 Merge pull request #12901 from jasontedor/feature/12900
Accumulate validation errors when validating index templates
2015-08-21 08:08:50 -04:00
Jason Tedor 4a5040bb32 Accumulate validation errors when validating index templates
This commit changes the behavior when validating index templates to
accumulate all validation errors before reporting failure to the user.
This addresses a usability issue when creating index templates.

Closes #12900
2015-08-21 08:06:42 -04:00
Colin Goodheart-Smithe 38085cf90a Aggregation: Fix AggregationPath.subPath() to not throw ArrayStoreException
Aggregation.subPath() always threw an ArrayStoreException because we were trying to pass a List into System.arraycopy(). This change fixes that bug and adds a test to prevent regression
2015-08-21 12:50:05 +01:00
Simon Willnauer 71cbcea3c2 [TEST] Add discovery-multicast to PluginManagerIT 2015-08-21 13:46:25 +02:00
Ryan Ernst 2a726fe4a1 Internal: Remove SpawnModules
The last use case of spawn modules was for plugins. This change handles
plugin modules directly, and removes SpawnModules.

closes #12783
2015-08-21 04:01:50 -07:00
xuzha 2af6f3fbff Print field name when meet unexpected token.
closes #12391
2015-08-21 01:16:38 -07:00
xuzha 2276ff6283 Remove `cloud.account` and `cloud.key` settings
closes #12809
2015-08-21 00:56:15 -07:00
Simon Willnauer 47a0296211 Clear ScrollID / NextScrollID even if the first query returned no docs 2015-08-21 09:51:30 +02:00
Adrien Grand d99b5c8bc6 Merge pull request #13032 from jpountz/fix/match_all_caching
Never cache match_all queries.
2015-08-21 09:38:50 +02:00
Adrien Grand c54a4c4f89 Docs: Fix section id for the new discovery-multicast plugin. 2015-08-21 09:36:55 +02:00
Adrien Grand f3265095ab Never cache match_all queries.
This commit backports https://issues.apache.org/jira/browse/LUCENE-6748 to make
sure that we never cache trivial queries like MatchAllDocsQuery.
2015-08-21 09:31:53 +02:00
Ryan Ernst 16e5c7c21c Add multicast plugin to plugin manager official list of plugins
See #13027
2015-08-20 23:45:36 -07:00
Simon Willnauer 3fb2d8e448 Merge pull request #12947 from s1monw/expected_shard_size
Add `expectedShardSize` to ShardRouting and use it in path.data allocation
2015-08-21 08:34:38 +02:00
Ryan Ernst 703a4b3f40 Merge pull request #13027 from rjernst/cast_away_multicast
Move multicast discovery to a plugin
2015-08-20 23:21:12 -07:00
Simon Willnauer 3dd6c4ab80 Use constant to determin if expected size is available 2015-08-21 08:18:59 +02:00
Simon Willnauer d2507c4ac0 Add `expectedShardSize` to ShardRouting and use it in path.data allocation
Today we only guess how big the shard will be that we are allocating on a node.
Yet, we have this information on the master but it's not available on the data nodes
when we pick a data path for the shard. We use some rather simple heuristic based on
existing shard sizes on this node which might be complete bogus. This change adds
the expected shard size to the ShardRouting for RELOCATING and INITIALIZING shards
to be used on the actual node to find the best data path for the shard.

Closes #11271
2015-08-21 08:18:59 +02:00
Robert Muir a2507a8f1c test: fix and simplify logic 2015-08-21 02:06:34 -04:00
Ryan Ernst 0c09bf2b18 Remove outdated comment 2015-08-20 22:30:26 -07:00
Robert Muir d0835715c2 Fix formatting of startup/configuration errors.
Try to strike a balance between usability and debuggability.
2MB stacktrace is not gonna work... we print message and find
"likely root cause" and identify it as such, limit it to 30 stack
frames, and filter out guice. When frames are truncated we identify
that too, and always inform the user full exception is available from
logs.

Closes #13029
2015-08-21 01:19:29 -04:00
Ryan Ernst d0f5ce58d8 Add multicast plugin to help and qa 2015-08-20 22:04:17 -07:00
Ryan Ernst 2b1e4acafe Remove logging message from testing 2015-08-20 17:08:44 -07:00
Ryan Ernst bcd58ad02f Merge branch 'master' into cast_away_multicast 2015-08-20 17:03:02 -07:00
Ryan Ernst 164efaecbe Networking: Move multicast discovery to a plugin
Multicast has known issues (see #12999 and #12993). This change moves
multicast into a plugin, and deprecates it in the docs.  It also allows
for plugging in multiple zen ping implementations.

closes #13019
2015-08-20 16:43:25 -07:00
Robert Muir bd539e7f98 simplify this 2015-08-20 18:56:26 -04:00
Robert Muir 7298be474d fix test failure 2015-08-20 17:31:06 -04:00
Robert Muir 478bf1c9ef Merge pull request #13026 from rmuir/too_noisy
Don't print lots of noise on IPv4 only hosts.
2015-08-20 17:11:40 -04:00
Simon Willnauer aea596241c Merge pull request #13020 from s1monw/issues/13014
Remove support for address resolving in InetSocketTransportAddress
2015-08-20 23:10:50 +02:00
Murilo Pereira a960b3cac4 Here too. 2015-08-20 18:07:51 -03:00
Robert Muir 5beabdd0ec Don't print lots of noise on IPv4 only hosts.
If the machine doesn't support IPv6, or if the user disabled it
with -Djava.net.preferIPv4Stack, or if the user disabled it with
ES_USE_IPV4, we will still try to bind a socket to ::1 out of box,
and we will see lots of exceptions logged to the console.

It is harmless noise but not a great experience.
2015-08-20 17:05:30 -04:00
Murilo Pereira 13f961a3d3 s/bucket_paths/buckets_path/
Using "bucket_paths" makes the server return a 400 with "Unknown key for a VALUE_STRING in [aggregation-name]: [buckets_paths]."
2015-08-20 18:05:02 -03:00
Ian Truslove ae0a74eb1c Couple of typos - various misspellings of `buckets-path` 2015-08-20 14:57:09 -06:00
Simon Willnauer d9089d56aa Don't use networking in InternalTestClusterTests 2015-08-20 22:55:04 +02:00
Simon Willnauer 3eee8b387e only verify both nodes join the cluster 2015-08-20 21:51:13 +02:00
Simon Willnauer c15d4c33b2 Add back private default ctor 2015-08-20 21:42:14 +02:00
Simon Willnauer 214d303e6a Remove support for address resolving in InetSocketTransportAddress
this commit removes all support for reverse host name resolving from
InetSocketTransportAddress. This class now only returns IP addresses.

Closes #13014
2015-08-20 20:57:26 +02:00