Commit Graph

15397 Commits

Author SHA1 Message Date
David Pilato 35049a05c3 Allocation: add support for filtering by transport IP address
Allocation filtering by IP only works today using the node host address. But in some cases, you might want to filter using the publish address which could be different.
2015-09-09 15:15:53 +02:00
Boaz Leskes 30ca6d3970 Internal: extract gateway required allocation calculations
and add a basic test

Closes #13391
2015-09-09 13:23:14 +02:00
Boaz Leskes 37d4727c0a Gateway: allow overriding the Gateway implementation
Allows mocking the gateway and overriding it from plugins.

Closes #13412
2015-09-09 13:19:25 +02:00
Martijn van Groningen 65e7aba780 inner hits: Protected against specifying a size larger than the total amount of documents in an index.
Closes #13394
2015-09-09 13:13:41 +02:00
Britta Weber 281eac757d [test] make sure result is never null and that flush and get start at same time 2015-09-09 12:41:32 +02:00
Britta Weber fa9696fb8c Merge pull request #13414 from brwe/commit-refresh-order
Engine: refresh before translog commit
2015-09-09 12:06:26 +02:00
Alex Ksikes a45ee273e3 MLT: builder takes a new Item object like its parser
Previously the parser could take any Term Vectors request, but this would be
not the case of the builder which would still use MultiGetRequest.Item. This
introduces a new Item class which is used by both the builder and parser.

Beyond that the rest is mostly cleanups such as:

1) Deprecating the ignoreLike methods, in favor to using unlike.

2) Deprecating and renaming MoreLikeThisBuilder#addItem to addLikeItem.

3) Ordering the methods of MoreLikeThisBuilder more logically.

This change is needed for the upcoming query refactoring of MLT.

Closes #13372
2015-09-09 11:40:27 +02:00
Martijn van Groningen e23d116bc5 parent/child: Split the _parent field mapping's field type into three field types:
1) A shared immutable fieldtype for the _parent field (used for direct access to that field in the dsl). This field type is stored and indexed.
2) A per type field type for the child join field. The field type has doc values enabled if index is created on or post 2.0 and field data type is allowed to be changed.
3) A per type field type for the parent join field. The field type has doc values enabled if index is created on or post 2.0.

This resolves the issue that a mapping is not compatible if parent and child types have different field data loading settings.

Closes #13169
2015-09-09 11:10:43 +02:00
Britta Weber 0ce66b4d70 Engine: refresh before translog commit
When we commit the translog, documents that were in it before cannot be retrieved from
it anymore via get and have to be retrieved from the index instead. But they will only
be visible if between index and get a refresh is called. Therfore we have to call
first refresh and then translog.commit() because otherwise there is a small gap
in which we cannot read from the translog anymore but also not from the index.

closes #13379
2015-09-09 10:37:13 +02:00
Jason Tedor e40409dd7f Merge pull request #13409 from jasontedor/throwables-be-gone
Remove and forbid use of com.google.common.base.Throwables
2015-09-08 21:59:37 -04:00
Jason Tedor 1806c1e0c7 Remove and forbid use of com.google.common.base.Throwables
This commit removes and now forbids all uses of
com.google.common.base.Throwables across the codebase.

For uses of com.google.common.base.Throwables#getStackTraceAsString,
use org.elasticsearch.ExceptionsHelper#stackTrace.

Relates #13224
2015-09-08 21:56:23 -04:00
Ryan Ernst ea4c27a089 Add back path.logs setup in internal settings preparer 2015-09-08 15:29:06 -07:00
Nicholas Knize e4e71d8a9a add points_only option to GeoShapeFieldMapper for optimizing indexing performance on geo_shape indexes designed to store only points. Includes updated documentation and exception handling for ensuring index integrity on points only data. 2015-09-08 16:17:50 -05:00
Ryan Ernst 55795f8ec2 Merge pull request #13383 from rjernst/go_away_transport_paths
Remove environment from transport client
2015-09-08 13:28:21 -07:00
Ryan Ernst 4914b0c465 Merge pull request #13385 from rjernst/wrong_resources
Move resources to their proper location
2015-09-08 13:25:31 -07:00
Ryan Ernst f3fb702e88 Move logging specific settings setup to log configurator. 2015-09-08 13:13:10 -07:00
Ryan Ernst e218b31322 Address PR comments 2015-09-08 12:57:28 -07:00
Robert Muir 164cf2775f Give intellij its jar hell back. This is not an invitation for more leniency. 2015-09-08 15:32:07 -04:00
David Pilato 81223179df [doc] Java add missing breaking changes
Closes #13151
2015-09-08 21:23:20 +02:00
Nik Everett 5099c17d9f Merge pull request #13373 from nik9000/reinstall_test
Add test for package reinstall after remove
2015-09-08 13:47:20 -04:00
Ryan Ernst 86ffa38ec7 Add migration guide note about transport client changes to
settings/environment
2015-09-08 10:22:46 -07:00
Ryan Ernst 2e63290548 Finish removing loadConfigSettings, and fix node startup to use correct
settings object
2015-09-08 10:16:25 -07:00
Ryan Ernst 92b62c0c6b Merge branch 'master' into go_away_transport_paths 2015-09-08 08:55:17 -07:00
Ryan Ernst d19e04fbb6 Change prepareSettingsAndEnvironment to prepareEnvironment 2015-09-08 08:54:18 -07:00
Robert Muir c354165bc9 remove intellij leniency. fix your IDE instead. it gives people the wrong idea. 2015-09-08 11:32:12 -04:00
Britta Weber 3de8cbb54c Merge pull request #13380 from brwe/exception-on-force-merge
Engine: Let AlreadyClosedException and EngineClosedExceptionBubble up
2015-09-08 17:01:10 +02:00
Britta Weber 2288d44eeb Engine: Let AlreadyClosedException and EngineClosedException bubble up
Whe we call optimize we ignore Exceptions that indicate a closed shard.
However, when a shard is closed while an optimize request is in flight it
might also trigger an AlreadyClosedException from the IndexWriter when we
get the config or ForceMergeFailedEngineException with the EngineClosedException
wrapped inside. Because these are not identified as exceptions that indicate
a closed shard (TransportActions.isShardNotAvailableException(..)) optimize
would sometimes report failures when shards were relocating while optimize was called
and sometimes not. This caused weird test failures, see #13266 .
Instead, we should let EngineClosedException bubble up and also recognize
AlreadyClosedException as an indicator for a closed shard.
2015-09-08 16:05:40 +02:00
Simon Willnauer f208aaa47c Also use PriorityComparator in shard balancer
Today we try to allocate primaries first and then replicas
but don't take the index creation date and priority into account
as we do in the GatewayAlloactor.

Closes #13249
2015-09-08 15:22:22 +02:00
Jason Tedor cf539a2158 Add trace logging before sending single shard requests 2015-09-08 08:41:39 -04:00
Alexander Reelsen 28970e7d54 Release: Add script to validate mvn repositories
This script allows to ensure that artifacts have been pushed to
a repository after running `mvn deploy`. This will allow us to
check that all of our artifacts have been deployed to sonatype and
the S3 bucket.

Basically it takes the contents of a local mvn repository and
runs HTTP HEAD requests against all artifacts. It also compares if
the length returned by the Content-Length header is the same as the
size of the artifact locally.
2015-09-08 14:12:33 +02:00
Simon Willnauer ed5f6e5a0c Remove cyclic dependencies between IndexService and FieldData / BitSet caches
Adds a listeners to each of the caches that allows us to remove the dependency on IndexService which is cyclic since
the IndexService depends on both of these caches. This cyclic dependency makes
testing the indiviual parts very hard and is only added for the sake of
incrementing some stats.
2015-09-08 13:06:32 +02:00
Boaz Leskes a2f94f2e2f move ZenDiscovery.rejoin to protected
So we can override it from tests and plugins.
2015-09-08 11:02:29 +02:00
Ryan Ernst 6b88093f78 Add back filtering for build properties, and remove unused resource
file.
2015-09-08 01:15:46 -07:00
Ryan Ernst 1b99b1d8b4 Remove unnecessary maven resources config 2015-09-07 22:50:01 -07:00
Ryan Ernst bcc4175b53 Build: Move resources to their proper location
We have a a number of resources in the java source tree, mostly for
tests. This change moves them to their proper location.
2015-09-07 19:45:08 -07:00
Ryan Ernst 1ff49eb8de Settings: Remove environment from transport client
Transport clients run embedded within external applications, so
elasticsearch should not be doing anything with the filesystem, as there
is not elasticsearch home.

This change makes a number of cleanups to the internal API for loading
settings and creating an environment. The loadFromConfig option was
removed, since it was always true except for tests. We now always
attempt to load settings from config a file when an environment is
created. The prepare methods were also simplified so there is now
prepareSettingsAndEnvironment which nodes use, and prepareSettings which
the transport client uses. I also attempted to improve the tests, but
there is a still a lot of follow up work to do there.

closes #13155
2015-09-07 17:26:41 -07:00
Clinton Gormley 2c20658204 Docs: Added deprecation notice for _timestamp and _ttl 2015-09-07 21:16:19 +02:00
Clinton Gormley 8aba6ce93a Docs: Improved the date histogram docs for time_zone and offset 2015-09-07 19:54:00 +02:00
Martijn van Groningen 11c87106ce docs: inner hits is no longer experimental 2015-09-07 16:58:46 +02:00
Adrien Grand 4173b00241 Merge pull request #13310 from jpountz/remove/count_scan
Remove the scan and count search types.
2015-09-07 16:21:14 +02:00
Jason Tedor a6ffe8f6d5 Remove and forbid use of com.google.common.base.Strings
This commit removes and now forbids all uses of
com.google.common.base.Strings across the codebase.

For uses of com.google.common.base.Strings.isNullOrEmpty, use
org.elasticsearch.common.Strings.isNullOrEmpty.

For uses of com.google.common.base.Strings.padStart use
org.elasticsearch.common.Strings.padStart.

For uses of com.google.common.base.Strings.nullToEmpty use
org.elasticsearch.common.Strings.coalesceToEmpty.

Relates #13224
2015-09-07 09:40:14 -04:00
David Pilato ab904059c8 [build] move heapdump to target/heapdump dir
Each time you run mvn test, you end up creating a `.logs` empty dir.

Instead of writing for each plugin in the `./logs` dir, I'd recommend writing this in `./target/heapdump`.

This dir is cleanup automatically when you run `mvn clean`.
2015-09-07 15:26:45 +02:00
Adrien Grand 0c26e7cd83 Remove the scan and count search types.
These search types have been deprecated in 2.1 and 2.0 respectively, and will
be removed in 3.0.
2015-09-07 15:18:45 +02:00
Nik Everett 8d3df330ff [test] Add test for package reinstall after remove
Closes #13286
2015-09-07 09:07:07 -04:00
Britta Weber c5cb559014 Merge pull request #13341 from brwe/shard-not-available-broadcast-replication
fix exception handling for unavailable shards in broadcast replicatio…
2015-09-07 14:47:55 +02:00
Britta Weber 41a2375c9e fix exception handling for unavailable shards in broadcast replication action
Before #13068 refresh and flush ignored all exceptions that matched
TransportActions.isShardNotAvailableException(e) and this should not change.
In addition, refresh and flush which are based on broadcast replication
might now get UnavailableShardsException from TransportReplicationAction if a shard
is unavailable and this is not caught by TransportActions.isShardNotAvailableException(e).
This must be ignored as well.
2015-09-07 14:47:28 +02:00
Britta Weber 972c1cc398 [test] remove timeout test 0s for flush and refresh - we decided we use 1m timeout
see #13238
2015-09-07 14:39:59 +02:00
Jason Tedor 5e36c91e8c Merge pull request #13349 from jasontedor/predicate-out-with-the-old-in-with-the-new
Remove and forbid the use of com.google.common.base.Predicate(s)?
2015-09-06 07:24:26 -04:00
Jason Tedor 8a3411e5e4 Remove and forbid the use of com.google.common.base.Predicate(s)?
This commit removes and now forbids all uses of
com.google.common.base.Predicate and com.google.common.base.Predicates
across the codebase. This is one of the many steps in the eventual
removal of Guava as a dependency. This was enabled by #13314.

Relates #13224
2015-09-06 07:20:24 -04:00
xuzha e69551d8df This commit remove the block for user to set invalid Signer Type.
Instead of throw an exception, this change log a warning message
and accept any signer type.
2015-09-05 22:57:05 -07:00