Commit Graph

4135 Commits

Author SHA1 Message Date
Ryan Ernst 5f3d0067f8 Merge pull request #17024 from rjernst/cli-parsing
Cli: Switch to jopt-simple
2016-03-11 12:35:39 -08:00
Ryan Ernst 5bd7da5659 Addressed PR feedback
* Fix tests still referring to -E
* add comment about missing classes
* rename writer constant
2016-03-11 11:46:23 -08:00
Yannick Welsch afb54bab44 [TEST] Wait on all data nodes to be blocked if blocks active
Fixes race condition in MockRepository where unblock happens before block
2016-03-11 20:20:07 +01:00
Ryan Ernst 591fb8f028 Merge branch 'master' into cli-parsing 2016-03-11 10:45:05 -08:00
Yannick Welsch 422df6089c [TEST] Unblock nodes if snapshot/restore test fails 2016-03-11 16:38:52 +01:00
Jason Tedor f465d98eb3 Add raw recovery progress to cat recovery API
This commit adds fields bytes_recovered and files_recovered to the cat
recovery API. These fields, respectively, indicate the total number of
bytes and files recovered. Additionally, for consistency, some totals
fields and translog recovery fields have been renamed.

Closes #17064
2016-03-11 08:27:09 -05:00
Yannick Welsch 04e55ecf6b Make logging message String constant to allow static checks 2016-03-11 10:30:59 +01:00
Yannick Welsch 718876a941 Fix wrong placeholder usage in logging statements 2016-03-11 10:30:59 +01:00
Yannick Welsch b17f4b40ba Check that number of placeholders in log message matches number of parameters 2016-03-11 10:30:59 +01:00
Adrien Grand a46d2f21c6 Fix dynamic mapper bug with deeply nested fields. 2016-03-11 09:59:38 +01:00
Ryan Ernst efd59f531d Merge pull request #17065 from rjernst/dynamic_mappers_are_hard
Fix dynamic mapper when its parent already has an update
2016-03-11 00:29:31 -08:00
Adrien Grand cb2ed50aeb Remove friction from the mapping changes in 5.0. #16991
This tries to remove friction to upgrade to 5.0 that would be caused by mapping
changes:
 - old ways to specify mapping settings (eg. store: yes instead of store:true)
   will still work but a deprecation warning will be logged
 - string mappings that only use the most common options will be upgraded
   automatically to text/keyword
2016-03-11 09:23:49 +01:00
Yannick Welsch 64e84dcc76 Reuse shard model across 3 phases in BalancedShardsAllocator 2016-03-11 08:42:25 +01:00
Yannick Welsch f6ae9ec4f6 Remove ShardsAllocators and merge allocateUnassigned, moveShards and rebalance to improve performance 2016-03-11 08:42:25 +01:00
Ryan Ernst 96ec48afcd Fix dynamic mapper when its parent already has an update
The change to move dynamic mapping handling to the end of document
parsing has an edge case which can cause dynamic mappings to fail
document parsing. If field a.b is added as an as part of the root update,
followed by a.c.d, then we need to expand the mappers on the stack,
since a is hidden inside the root update which exists on the stack.

This change adds a test for this case, as well as tries to better
document how the logic works for building up the stack before adding a
dynamic mapper.
2016-03-10 18:00:07 -08:00
Ryan Ernst 42a6869bb1 Merge pull request #17059 from elastic/fix/16864-attachment-doctypes
Fix attachments plugins with docx
2016-03-10 17:27:02 -08:00
Ryan Ernst 2f3efc3fe1 Add doc and docx rest test to mapper attachment along with
getClassLoader permission
2016-03-10 13:28:19 -08:00
Zachary Tong 9d340e6b08 Fix import formatting - do not use wildcard 2016-03-10 16:08:18 -05:00
Zachary Tong ae36262a95 Merge pull request #14745 from polyfractal/bugfix/deriv_npe
Fix NPE in Derivative Pipeline when current bucket value is null
2016-03-10 15:34:31 -05:00
Zachary Tong 39a067aa3f Fix NPE in Derivative Pipeline when current bucket is null
Sequence of events that lead to the NPE:

- avg metric returns NaN for buckets
- Movavg skips NaN or null buckets, and simply re-uses the existing bucket (e.g. doesn't add
a 'movavg' field)
- Derivative references Movavg, the bucket resolution returns null because Movavg wasn't added
to the bucket, NPE when trying to subtract null values
2016-03-10 15:17:26 -05:00
Ryan Ernst f3195cb514 Merge pull request #16798 from rjernst/dots2
Moved dynamic field handling in doc parsing to end of parsing
2016-03-10 10:03:52 -08:00
Ryan Ernst ac73d97169 Merge branch 'master' into dots2 2016-03-10 09:22:31 -08:00
Yannick Welsch 266394c3ab Fail closing or deleting indices during a full snapshot
Closes #16321
2016-03-10 18:11:47 +01:00
Martijn van Groningen 2fa33d5c47 Added ingest statistics to node stats API
The ingest stats include the following statistics:
* `ingest.total.count`- The total number of document ingested during the lifetime of this node
* `ingest.total.time_in_millis` - The total time spent on ingest preprocessing documents during the lifetime of this node
* `ingest.total.current` - The total number of documents currently being ingested.
* `ingest.total.failed` - The total number ingest preprocessing operations failed during the lifetime of this node

Also these stats are returned on a per pipeline basis.
2016-03-10 13:21:43 +01:00
Boaz Leskes cd12241e9f Decouple the TransportService and ClusterService #16872
Currently, the cluster service is tightly coupled to the transport service by both managing node connections and requiring the bound address in order to create the local disco node. This commit introduces a new NodeConnectionsService which is in charge of node connection management and makes it possible to remove all network related calls from the cluster service. The local DiscoNode is now created by DiscoveryNodeService and is set both the cluster service and the transport service during node start up.

Closes #16788
Closes #16872
2016-03-10 11:45:15 +01:00
Christoph Büscher b4db26eaf9 Sort: Move up `order` field to SortBuilder
Currently all SortBuilder implementations have their separate order
field. This PR moves this up to SortBuilder, together with setter
and getter and makes sure the default is set to SortOrder.ASC
except for `_score` sorting where the default is SortOrder.DESC.
2016-03-10 10:47:34 +01:00
Isabel Drost-Fromm 7621c8875f Merge pull request #16999 from MaineC/sort-parser-simplification
Moves SortParser:parse(...) to only require QueryShardContext
2016-03-10 10:21:02 +01:00
Nik Everett 7d35db6cc7 Merge fix for expressions starting with * 2016-03-09 18:27:40 -05:00
Ryan Ernst 1bc8d0249f Merge pull request #16286 from fforbeck/fix/15269
Skipping hidden files compilation for script service
2016-03-09 14:45:24 -08:00
Nicholas Knize 61f39e6c92 GeoPointV2 update docs and query builders
This commit updates the documentation for GeoPointField by removing all references to the coerce and doc_values parameters. DocValues are enabled in lucene GeoPointField by default (required for boundary filtering). The QueryBuilders are updated to automatically normalize points (ignoring the coerce parameter) for any index created onOrAfter version 2.2.
2016-03-09 16:09:44 -06:00
Ryan Ernst 0344af0750 Remove unnecessary comment 2016-03-09 13:26:33 -08:00
Ryan Ernst c48e6b86f6 Limit update to fields and objects which were actually modified, and
simplify root update creation.
2016-03-09 13:24:46 -08:00
Jason Tedor 12a6f36a34 Log shard after translog snapshot during recovery 2016-03-09 15:15:58 -05:00
Ryan Ernst bbdbfe7373 Merge branch 'master' into dots2 2016-03-09 11:28:27 -08:00
Simon Willnauer 016bc3ea2b Merge pull request #17001 from s1monw/cut_over_to_uuid
Use index UUID to lookup indices on IndicesService

Today we use the index name to lookup index instances on the IndicesService
which applied to search requests but also to index deletion etc. This commit
moves the interface to expect an Index instance which is a tuple
and looks up the index by uuid rather than by name. This prevents accidental modification
of the wrong index if and index is recreated or searching from the wrong index in such a case.
Accessing an index that has the same name but different UUID will now result in an IndexNotFoundException.
2016-03-09 19:44:36 +01:00
Simon Willnauer e72dac91b3 Use index UUID to lookup indices on IndicesService
Today we use the index name to lookup index instances on the IndicesService
which applied to search reqeusts but also to index deletion etc. This commit
moves the interface to expcet and `Index` instance which is a <name, uuid> tuple
and looks up the index by uuid rather than by name. This prevents accidential modificaiton
of the wrong index if and index is recreated or searching from the _wrong_ index in such a case.
Accessing an index that has the same name but different UUID will now result in an IndexNotFoundException.

Closes #17001
2016-03-09 19:42:15 +01:00
Alexander Kazakov 2ce90c001c Don't return all indices immediately if count of expressions >1 and first expression is * #17027 2016-03-09 19:43:56 +03:00
Nicholas Knize d09ee3f174 Remove .geohash suffix from GeoDistanceQuery and GeoDistanceRangeQuery
Occasionally the .geohash suffix in Geo{Distance|DistanceRange}Query would conflict with a mapping that defines a sub-field by the same name. This occurs often with nested and multi-fields a mapping defines a geo_point sub-field using the field name "geohash". Since the QueryParser already handles parsing geohash encoded geopoints without requiring the ".geohash" suffix, the suffix parsing can be removed altogether.

This commit removes the .geohash suffix parsing, adds explicit test coverage for the nested query use-case, and adds random distance queries to the nested query test suite.
2016-03-09 09:35:27 -06:00
Ali Beyad e411cbb060 Fixes the DiscoveryWithServiceDisruptionsIT#testIndicesDeleted test
In particular, this test ensures we don't restart the master node until
we know the index deletion has taken effect on master and the master
eligible nodes.

Closes #16917
Closes #16890
2016-03-09 10:28:12 -05:00
Christoph Büscher 11b18a9963 Sort: Make ScoreSortBuilder implement NamedWriteable and add fromXContent parsing
This change makes ScoreSortBuilder implement NamedWriteable, adds
equals() and hashCode() and also implements parsing ScoreSortBuilder
back from xContent. This is needed for the ongoing Search refactoring.
2016-03-09 14:42:06 +01:00
Simon Willnauer f8ab6a6669 [TEST] Make boost more prominent in test since with new default similarity it might score lower without the boost 2016-03-09 11:43:38 +01:00
Martijn van Groningen b9b5c15fe1 test: ensure the each node sees 2 nodes. 2016-03-09 11:39:35 +01:00
Simon Willnauer 5fca3b6126 Merge pull request #16985 from elastic/remove_leniency_in_commitpoint_checks
Remove leniency from segments info integrity checks

Closes #16973
2016-03-09 11:25:42 +01:00
Isabel Drost-Fromm 7b5b0d4511 Move missing() from SortBuilder interface to class
As mentioned by @cbuescher on #16151 this method is really implemented only in
the FieldSortBuilder. Moving the method down.

Relates to #15178
2016-03-09 10:18:31 +01:00
Simon Willnauer 716e7267f3 Remove unused test-only constructor from IndexingSlowLog 2016-03-09 10:10:38 +01:00
Simon Willnauer 997fccde09 Remove unused delete logger in IndexingSlowLog
The delete logger is a leftover and has no usage in this class.
2016-03-09 10:10:38 +01:00
Ryan Ernst dedc45ea62 Fix tribe integ test to not try to pass through path settings 2016-03-09 01:03:27 -08:00
Simon Willnauer 91308d74c6 Merge pull request #17026 from s1monw/issues/17025
Add missing index name to indexing slow log
2016-03-09 09:49:06 +01:00
Simon Willnauer 98249507cf Add missing index name to indexing slow log
This was lost in refactoring even on the 2.x branch. The slow-log
is not per index not per shard anymore such that we don't add the
shard ID as the logger prefix. This commit adds back the index
name as part of the logging message not as a prefix on the logger
for better testabilitly.

Closes #17025
2016-03-09 09:38:46 +01:00
Ryan Ernst 712043315d Use Setting objects for tribe node client passthrough, and add scripts
path to passthrough
2016-03-09 00:37:15 -08:00