Commit Graph

854 Commits

Author SHA1 Message Date
Simon Willnauer e5134317be Merge pull request #12936 from s1monw/add_build_hash_to_headers
Add build short hash to the download manager headers to identify staging builds
2015-08-19 15:10:46 +02:00
Robert Muir bbf669506b Merge pull request #12979 from rmuir/ifconfig
Log network configuration at debug level
2015-08-19 07:14:01 -04:00
Christoph Büscher 8454d49552 Plugins: Add 'name' property to plugin descriptor file to determine plugin name
At the moment, when installing from an url, a user provides the plugin name on
the command line like:

* bin/plugin install [plugin-name] --url [url]

This can lead to problems when picking an already existing name from another
plugin, and can potentially overwrite plugins already installed with that name.

This, this PR introduces a mandatory `name` property to the plugin descriptor
file which replaces the name formerly provided by the user.

With the addition of the `name` property to the plugin descriptor file, the user
does not need to specify the plugin name any longer when installing from a file
or url. Because of this, all arguments to `plugin install` command are now
either treated as a symbolic name, a URL or a file without the need to specify
this with an explicit option.

The new syntax for `plugin install` is now:

bin/plugin install [name or url]

* downloads official plugin
bin/plugin install analysis-kuromoji

* downloads github plugin
bin/plugin install lmenezes/elasticsearch-kopf

* install from URL or file
bin/plugin install http://link.to/foo.zip
bin/plugin install file:/path/to/foo.zip

If the argument does not parse to a valid URL, it is assumed to be a name and the
download location is resolved like before. Regardless of the source location of
the plugin, it is extracted to a temporary directory and the `name` property from
the descriptor file is used to determine the final install location.

Relates to #12715
2015-08-19 12:13:01 +02:00
Jason Tedor 66b0e7a6e1 Merge pull request #12977 from jasontedor/fix/12873
Add millisecond parser for dynamic date fields mapped from "yyyy/MM/dd"
2015-08-19 05:30:24 -04:00
Simon Willnauer ddd6be1047 Merge pull request #12981 from s1monw/serialize_interrupted_exceptions
Add serialization support for InterruptedException
2015-08-19 11:26:49 +02:00
Simon Willnauer 828e31ce32 Add serialization support for InterruptedException
it's an important exception to serialize and we see it often in tests
etc. but then it's wrapped in NotSerializableExceptionWrapper which is
odd. This commit adds native support for this exception.
2015-08-19 10:01:58 +02:00
Boaz Leskes 43fae91ab9 Test: ClusterDiscoveryConfiguration.UnicastZen should allow for port ranges
The cluster configuration allows to setup a cluster for use with unicast discovery. This means that nodes have to have pre-calculated known addresses which can be used to poplulate the unicast hosts setting. Despite of repeated attempts to select unused ports, we still see test failures where the node can not bind to it's assigned port due to it already being in use (most on CentOS). This commit changes it to allow each node to have a pre-set mutual exclusive range of ports and add all those ports to the unicast hosts list. That's OK because we know the node will only bind to one of those.
2015-08-19 10:01:38 +02:00
Robert Muir fa70162178 Log network configuration at debug level 2015-08-19 01:26:36 -04:00
Jason Tedor 4c9327d983 Add millisecond parser for dynamic date fields mapped from "yyyy/MM/dd"
Dynamic date fields mapped from dates of the form "yyyy-MM-dd"
automatically receive the millisecond paresr epoch_millis as an
alternative parsing format. However, dynamic date fields mapped from
dates of the form "yyyy/MM/dd" do not. This is a bug since the migration
documentation currently specifies that a dynamically added date field,
by default, includes the epoch_millis format. This commit adds
epoch_millis as an alternative parser to dynamic date fields mapped from
dates of the form "yyyy/MM/dd".

Closes #12873
2015-08-18 22:30:43 -04:00
Robert Muir f7f7fecafb Improve console logging on startup exception
Today we show the exception twice: once by the logger and then again
by the JVM. This is too noisy, and easy to avoid.
2015-08-18 22:27:39 -04:00
Ryan Ernst 32a097382c Merge pull request #12952 from rjernst/construct_it_yourself
Simplify Plugin API for constructing modules
2015-08-18 14:28:48 -07:00
Ryan Ernst 54ae55662c Remove leftover class and fix compile issues from master merge 2015-08-18 14:28:03 -07:00
Simon Willnauer 32bb49e829 [TEST] Make it clear what address we try to bind 2015-08-18 23:17:43 +02:00
Ryan Ernst 7393068417 Merge branch 'master' into construct_it_yourself 2015-08-18 14:15:08 -07:00
Simon Willnauer 0ffd99cca3 Drop commons-lang dependency
commons-lang really is only used by some core classes to join strings or modiy arrays.
It's not worth carrying the dependency. This commit removes the dependency on commons-lang
entirely.
2015-08-18 22:59:31 +02:00
Robert Muir e07f039659 Workaround JDK bug 8034057
This causes a FileSystemException when trying to retrieve FileStore for a path,
and falsely returns false for Files.isWritable

Squashed commit of the following:

commit d2cc0d966f3bc94aa836b316a42b3c5724bc01ef
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Aug 18 15:49:48 2015 -0400

    fixes for the non-bogus comments

commit 6e0a272f5f8ef7358654ded8ff4ffc31831fa5c7
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Aug 18 15:30:43 2015 -0400

    Fix isWritable too

commit 2a8764ca118fc4c950bfc60d0b97de873e0e82ad
Author: Robert Muir <rmuir@apache.org>
Date:   Tue Aug 18 14:49:50 2015 -0400

    try to workaround filestore bug
2015-08-18 16:44:57 -04:00
Igor Motov 509edefb04 Improve stability of restoreIndexWithMissingShards test
Replaced awaitBusy with assertBusy and increased the timeout.
2015-08-18 14:27:24 -04:00
Ryan Ernst 2a57539a28 Tweak exception message 2015-08-18 10:35:37 -07:00
Ryan Ernst a0c41218ff Merge branch 'master' into no_more_toe_stepping 2015-08-18 10:34:29 -07:00
Ryan Ernst a3afe57792 Fix compile failure from bad merge after renaming of
ExtensionPoint.TypeExtensionPoint
2015-08-18 10:32:12 -07:00
Ryan Ernst c0444ccbc6 Merge branch 'master' into module_culling3 2015-08-18 10:16:40 -07:00
Ryan Ernst 4c5cfd02cc Add javadocs to repository types registry methods 2015-08-18 10:13:01 -07:00
Ryan Ernst c3a22e6f0e Merge branch 'master' into construct_it_yourself 2015-08-18 09:50:47 -07:00
Ryan Ernst e61c5ce5c3 Fix naming problem with test plugin 2015-08-18 09:49:58 -07:00
Simon Willnauer 60f273c891 Suppress forbiddenAPI in logger when using localhost 2015-08-18 17:32:20 +02:00
Simon Willnauer 1e511eda28 Remove usage or `InetAddress#getLocalHost`
this method is very confusing and if it's used it's likely the wrong thing
with respect to the actual bound / published address. This change discourages
it's use and removes all useage. It's replaced with the actual published address
most of the time.
2015-08-18 16:48:34 +02:00
David Pilato 20851a4e4a Merge branch 'pr/shorten-artifactids' 2015-08-18 15:25:38 +02:00
javanna 501a1996a3 Query DSL: remove attemped (not working) support for array in not query parser
Closes #12890
2015-08-18 14:58:53 +02:00
javanna 8e93ac5d5c Java api: remove execution from TermsQueryBuilder as it has no effect
Also introduced ParseField for execution in TermsQueryParser so proper deprecation warnings get printed out when requested.

Closes #12884
2015-08-18 14:57:33 +02:00
David Pilato 692cc80523 [maven] also rename parent project artifactId
Also fixed bad scm links
2015-08-18 13:41:12 +02:00
David Pilato e19090b2ad [plugin] shorten plugin names
We can now simplify PluginHandle as `name` and `repo` are the same thing.
2015-08-18 13:41:12 +02:00
David Pilato 33e8fae824 [plugin] shorten plugin names
We don't need to prefix anymore plugin names with `elasticsearch-` or `es-`.
2015-08-18 13:41:12 +02:00
David Pilato 2c902a4d2f [maven] rename Elasticsearch names to Elasticsearch: 2015-08-18 13:38:49 +02:00
David Pilato 0bb9593596 Fix a typo in comment 2015-08-18 13:38:48 +02:00
javanna 3f04ee076e Internal: IndicesQueriesRegitry back to being created only once
With #12921 we refactored IndicesModule but we forgot to make sure we create IndicesQueriesRegistry once. IndicesQueriesModule used to do `bind(IndicesQueriesRegistry.class).asEagerSingleton();` otherwise we get multiple instances of the registry. This needs to be ported do the IndicesModule.
2015-08-18 13:04:30 +02:00
Martijn van Groningen e74f559fd4 parent/child: Explicitly disabled the query cache
It was already disabled, but during tests the test framework enabled the query cache by setting the static default query cache. The caching behaviour should be the same in production and in tests.
2015-08-18 12:56:37 +02:00
Adrien Grand c169386dd4 Merge pull request #12931 from jpountz/fix/murmur3_defaults
Move the `murmur3` field to a plugin and fix defaults.
2015-08-18 12:09:32 +02:00
Ryan Ernst dc1fa6736a Merged AbstractPlugin and Plugin. Also added Settings back to
indexModules and shardModules
2015-08-18 02:46:32 -07:00
Adrien Grand a91b3fcbb9 Move the `murmur3` field to a plugin and fix defaults.
This move the `murmur3` field to the `mapper-murmur3` plugin and fixes its
defaults so that values will not be indexed by default, as the only purpose
of this field is to speed up `cardinality` aggregations on high-cardinality
string fields, which only requires doc values.

I also removed the `rehash` option from the `cardinality` aggregation as it
doesn't bring much value (rehashing is cheap) and allowed to remove the
coupling between the `cardinality` aggregation and the `murmur3` field.

Close #12874
2015-08-18 11:41:52 +02:00
Martijn van Groningen 2b97f5d9eb Pass down the EngineConfig to IndexSearcherWrapper
If a new IndexSearcher gets created the engine config can be used to get the query cache and query cache policy from.
2015-08-18 10:41:24 +02:00
Ryan Ernst 2bf84593e0 Plugins: Simplify Plugin API for constructing modules
The Plugin interface currently contains 6 different methods for
adding modules. Elasticsearch has 3 different levels of injectors,
and for each of those, there are two methods. The first takes no
arguments and returns a collection of class objects to construct. The
second takes a Settings object and returns a collection of module
objects already constructed. The settings argument is unecessary because
the plugin can already get the settings from its constructor. Removing
that, the only difference between the two versions is returning an
already constructed Module, or a module Class, and there is no reason
the plugin can't construct all their modules themselves.

This change reduces the plugin api down to just 3 methods for adding
modules. Each returns a Collection<Module>. It also removes the
processModule method, which was unnecessary since onModule
implementations fullfill the same requirement. And finally, it renames
the modules() method to nodeModules() so it is clear these are created
once for each node.
2015-08-17 20:41:45 -07:00
Robert Muir 34635a4b4f Merge pull request #12951 from rmuir/more_networking_cleanup
Use preferIPv6Addresses for sort order, not preferIPv4Stack
2015-08-17 23:30:35 -04:00
Robert Muir 3ca12889e5 Use preferIPv6Addresses for sort order, not preferIPv4Stack
java.net.preferIPv6Addresses is a better choice. preferIPv4Stack is a nuclear option
and you just won't even bind to any IPv6 addresses. This reduces confusion.
2015-08-17 22:52:22 -04:00
Igor Motov 4114a8359d Improve stability of Snapshot/Restore test
The restore portion of some snapshot/restore test is failing randomly due to #9421. This change suspends rebalance during snapshot/restore operations until #9421 is fixed.

Closes #12855
2015-08-17 21:30:46 -04:00
Ryan Ernst 2e90be77ff Plugins: Ensure additionalSettings() do not conflict
Plugins can preovide additional settings to be added to the settings
provided in elasticsearch.yml. However, if two different plugins supply
the same setting key, the last one to be loaded wins, which is
indeterminate. This change enforces plugins cannot have conflicting
settings, at startup time. As a followup, we should do this when
installing plugins as well, to give earlier errors when two plugins
collide.
2015-08-17 17:01:00 -07:00
Ryan Ernst 6f124e6eec Internal: Simplify custom repository type setup
Custom repository types are registered through the RepositoriesModule.
Later, when a specific repository type is used, the RespositoryModule
is installed, which in turn would spawn the module that was
registered for that repository type. However, a module is not needed
here. Each repository type has two associated classes, a Repository and
an IndexShardRepository.

This change makes the registration method for custom repository
types take both of these classes, instead of a module.

See #12783.
2015-08-17 15:08:08 -07:00
Nicholas Knize ee227efc62 move integration test dependency file gzippedmap.gz from sources to resources 2015-08-17 16:49:25 -05:00
Simon Willnauer 8624022222 Print es.node.mode if integration tests fail 2015-08-17 22:50:54 +02:00
Nicholas Knize b2ba3847f7 Refactor geo_point validate* and normalize* options to ignore_malformed and coerce*
For consistency geo_point mapper's validate and normalize options are converted to ignore_malformed and coerced
2015-08-17 14:46:23 -05:00
Robert Muir 68307aa9f3 Fix network binding for ipv4/ipv6
When elasticsearch is configured by interface (or default: loopback interfaces),
bind to all addresses on the interface rather than an arbitrary one.

If the publish address is not specified, default it from the bound addresses
based on the following sort ordering:

* ipv4/ipv6 (java.net.preferIPv4Stack, defaults to true)
* ordinary addresses
* site-local addresses
* link local addresses
* loopback addresses

One one address is published, and multicast is still always over ipv4: these
need to be future improvements.

Closes #12906
Closes #12915

Squashed commit of the following:

commit 7e60833312f329a5749f9a256b9c1331a956d98f
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 14:45:33 2015 -0400

    fix java 7 compilation oops

commit c7b9f3a42058beb061b05c6dd67fd91477fd258a
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 14:24:16 2015 -0400

    Cleanup/fix logic around custom resolvers

commit bd7065f1936e14a29c9eb8fe4ecab0ce512ac08e
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 13:29:42 2015 -0400

    Add some unit tests for utility methods

commit 0faf71cb0ee9a45462d58af3d1bf214e8a79347c
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 12:11:48 2015 -0400

    localhost all the way down

commit e198bb2bc0d1673288b96e07e6e6ad842179978c
Merge: b55d092 b93a75f
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 12:05:02 2015 -0400

    Merge branch 'master' into network_cleanup

commit b55d092811d7832bae579c5586e171e9cc1ebe9d
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 12:03:03 2015 -0400

    fix docs, fix another bug in multicast (publish host = bad here!)

commit 88c462eb302b30a82585f95413927a5cbb7d54c4
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 11:50:49 2015 -0400

    remove nocommit

commit 89547d7b10d68b23d7f24362e1f4782f5e1ca03c
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 11:49:35 2015 -0400

    fix http too

commit 9b9413aca8a3f6397b5031831f910791b685e5be
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Aug 17 11:06:02 2015 -0400

    Fix transport / interface code

    Next up: multicast and then http
2015-08-17 15:43:07 -04:00