Commit Graph

18440 Commits

Author SHA1 Message Date
Simon Willnauer 387bdbd322 Don't limit recoveries in RoutingTableTests 2015-12-28 21:36:34 +01:00
Yannick Welsch 24ab66c694 Merge pull request #15678 from ywelsch/enhance/faster-balancer
Speed improvements for BalancedShardsAllocator
2015-12-28 19:38:11 +01:00
Yannick Welsch 7e134da7d3 Cache result of RoutingNodes.node(...) in ModelNode 2015-12-28 19:14:48 +01:00
Yannick Welsch eea791de15 Remove superfluous method numPrimaries 2015-12-28 19:14:48 +01:00
Yannick Welsch e855282258 Simplify numShards calculation 2015-12-28 19:14:48 +01:00
Yannick Welsch 1536d7fe37 For rebalancing an index, only consider nodes that currently have a shard of that index or where the index can be allocated
This allows to prune a large number of nodes in case of hot/warm setup
2015-12-28 19:14:48 +01:00
Yannick Welsch 207dfc457d Remove superfluous method 2015-12-28 19:14:48 +01:00
Yannick Welsch fc0a33be05 Eliminate adding/removing shard to simulate weight of added shard / removed shard
Removal of the pattern node.addShard() -> calculate weight -> node.removeShard() which is expensive as, beside map lookups, it invalidates caching of precomputed values in ModelNode and ModelIndex. Replaced by adding an additional parameter to the weight function which accounts for the added / removed shard.
2015-12-28 19:14:48 +01:00
Yannick Welsch 5bd31a6cca Fix typo in method name 2015-12-28 19:14:48 +01:00
Yannick Welsch 67905b384f Remove unused class 2015-12-28 19:14:48 +01:00
Yannick Welsch 1bb7ca8a85 Removed unused methods 2015-12-28 19:14:48 +01:00
Yannick Welsch 0fd19008b1 Precalculate avgShardsPerNode 2015-12-28 19:14:48 +01:00
Yannick Welsch 507bb11345 Split two-element array into proper variables 2015-12-28 19:14:48 +01:00
Adrien Grand c6cf84336f Merge pull request #15679 from jpountz/fix/text_parsing
Make text parsing less lenient.
2015-12-28 16:47:05 +01:00
Adrien Grand 5eb7555ffb Make text parsing less lenient.
It now requires that the parser is on a value.
2015-12-28 16:06:42 +01:00
Simon Willnauer ba755a554f Merge pull request #15372 from s1monw/trash_recovery_threads
Remove recovery threadpools and throttle outgoing recoveries on the master
2015-12-28 15:43:14 +01:00
Simon Willnauer dcb164db3b Merge pull request #15598 from lks21c/master
Put space into last comment line
2015-12-28 15:41:10 +01:00
Jason Tedor 84c4ab6c18 Correctly release threads from starting gate in o.e.c.ClusterServiceIT 2015-12-28 08:13:55 -05:00
Jason Tedor 35cc749c9a Correctly release threads from starting gate in o.e.c.c.CacheTests 2015-12-28 08:07:37 -05:00
Simon Willnauer e8daad66d1 apply more feedback from @dakrone 2015-12-28 12:52:38 +01:00
Simon Willnauer a20b07d581 Merge branch 'master' into trash_recovery_threads 2015-12-28 12:45:14 +01:00
Simon Willnauer 0a816cd343 Add tests for equals and hashCode and fix FiltersFunctionScoreQuery equals and hashCode impls
Relates to #15676
2015-12-28 12:34:34 +01:00
Adrien Grand baaeb0f578 Merge pull request #15664 from jpountz/remove/ParseContext_ignoredValue
Remove ParseContext.ignoredValue.
2015-12-28 12:05:26 +01:00
Adrien Grand 23f736a0c1 Remove ParseContext.ignoredValue.
This API is unused.
2015-12-24 15:28:09 +01:00
socurites 485915bbe7 comma(,) was duplicated
deleted it.
2015-12-24 14:31:26 +01:00
socurites 25d23091e2 Edge NGram: "side" setting was depercated
Edge NGram: "side" setting was depercated
2015-12-24 14:26:24 +01:00
Adrien Grand e2fbdcfb4f Merge pull request #15633 from jpountz/fix/dynamic_mappings
Improve cross-type dynamic mapping updates.
2015-12-24 10:24:08 +01:00
Adrien Grand 3015eb3088 Improve cross-type dynamic mapping updates.
Today when dynamically mapping a field that is already defined in another type,
we use the regular dynamic mapping logic and try to copy some settings to avoid
introducing conflicts. However this is quite fragile as we don't deal with every
existing setting. This proposes a different approach that will just reuse the
shared field type.

Close #15568
2015-12-24 10:22:35 +01:00
Adrien Grand 79b14215aa Merge pull request #15636 from jpountz/feature/bool_fields
Add sub-fields support to `bool` fields.
2015-12-24 10:21:49 +01:00
Robert Muir d144ba24a5 Merge pull request #15588 from rmuir/hdfs2-only
merge current hdfs improvements to master
2015-12-23 18:17:22 -05:00
Robert Muir f14a21639c add cleanups from simon 2015-12-23 18:15:33 -05:00
Jason Tedor 6ab922c5a0 Reduce runtime of CidrsTests#testValidCombinations
This commit reduces the running time of CidrsTests#testValidCombinations
by hoisting some costly repeated operations outside of the inner test
loop.
2015-12-23 18:02:41 -05:00
Adrien Grand f40b72633b Add sub-fields support to `bool` fields.
`bool` is our only core mapper that does not support sub fields.

Close #6587
2015-12-23 17:45:46 +01:00
Adrien Grand 76fa9023b6 Merge pull request #15488 from jpountz/remove/index_name_back_compat
Remove `index_name` back compat.
2015-12-23 14:55:41 +01:00
Adrien Grand d8d8666877 Remove `index_name` back compat.
Since 2.0 we enforce that fields have the same full and index names. So in 3.x
we can remove the ability to have different names on the same field.
2015-12-23 14:55:26 +01:00
Adrien Grand b771daa3c7 Merge pull request #15602 from jpountz/enhancement/function_score_two_phase
FunctionScoreQuery should implement two-phase iteration.
2015-12-23 14:54:23 +01:00
Alexander Reelsen 1e2919b03d Smoke Tester: Install mapper attachment & repository hdfs plugin 2015-12-23 13:26:23 +01:00
Alexander Reelsen a0b946ccab Smoke Tester: Dont install groovy/expression plugins
Those two plugins are modules now and thus dont need to be installed
explicitely when testing.
2015-12-23 13:15:56 +01:00
Adrien Grand 07658f58a8 FunctionScoreQuery should implement two-phase iteration.
FunctionScoreQuery should do two things that it doesn't do today:
 - propagate the two-phase iterator from the wrapped scorer so that things are
   still executed efficiently eg. if a phrase or geo-distance query is wrapped
 - filter out docs that don't have a high enough score using two-phase
   iteration: this way the score is only checked when everything else matches

While doing these changes, I noticed that minScore was ignored when scores were
not needed and that explain did not take it into account, so I fixed these
issues as well.
2015-12-23 12:02:21 +01:00
Alexander Reelsen 9cd618244a Docs: Remove deprecated documentation flag in profile docs 2015-12-23 10:59:38 +01:00
Adrien Grand 56d2dd701e Fix SizeMappingTests failure. 2015-12-23 10:48:00 +01:00
Adrien Grand a2072fe927 Merge pull request #15539 from jpountz/fix/immutable_document_mapper
Make mapping updates more robust.
2015-12-23 09:55:42 +01:00
Adrien Grand f535c27024 Make mapping updates more robust.
This changes a couple of things:

Mappings are truly immutable. Before, each field mapper stored a
MappedFieldTypeReference that was shared across fields that have the same name
across types. This means that a mapping update could have the side-effect of
changing the field type in other types when updateAllTypes is true. This works
differently now: after a mapping update, a new copy of the mappings is created
in such a way that fields across different types have the same MappedFieldType.
See the new Mapper.updateFieldType API which replaces MappedFieldTypeReference.

DocumentMapper is now immutable and MapperService.merge has been refactored in
such a way that if an exception is thrown while eg. lookup structures are being
updated, then the whole mapping update will be aborted. As a consequence,
FieldTypeLookup's checkCompatibility has been folded into copyAndAddAll.

Synchronization was simplified: given that mappings are truly immutable, we
don't need the read/write lock so that no documents can be parsed while a
mapping update is being processed. Document parsing is not performed under a
lock anymore, and mapping merging uses a simple synchronized block.
2015-12-23 09:55:07 +01:00
Lee Hinman 862cdad8dc Merge remote-tracking branch 'dakrone/freebsd-test-fix' 2015-12-22 15:41:35 -07:00
Jason Tedor 4c9a9b4b2d Reduce number of threads in o.e.c.c.CacheTests
This commit reduces the randomized number of threads in the cache tests
to reduce the amount of time that the tests take to execute.
2015-12-22 16:55:55 -05:00
Lee Hinman 482843e27b Fix build to run correctly on FreeBSD
This adds the required changes/checks so that the build can run on
FreeBSD.

There are a few things that differ between FreeBSD and Linux:

- CPU probes return -1 for CPU usage
- `hot_threads` cannot be supported on FreeBSD

From OpenJDK's `os_bsd.cpp`:

```c++
bool os::is_thread_cpu_time_supported() {
  #ifdef __APPLE__
  return true;
  #else
  return false;
  #endif
}
```

So this API now returns (for each FreeBSD node):

```
curl -s localhost:9200/_nodes/hot_threads
::: {Devil Hunter Gabriel}{q8OJnKCcQS6EB9fygU4R4g}{127.0.0.1}{127.0.0.1:9300}
   hot_threads is not supported on FreeBSD
```

- multicast fails in native `join` method - known bug:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193246

Which causes:

```
1> Caused by: java.net.SocketException: Invalid argument
1>    at java.net.PlainDatagramSocketImpl.join(Native Method)
1>    at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:179)
1>    at java.net.MulticastSocket.joinGroup(MulticastSocket.java:323)
1>    at org.elasticsearch.plugin.discovery.multicast.MulticastChannel$Plain.buildMulticastSocket(MulticastChannel.java:309)
```

So these tests are skipped on FreeBSD.

Resolves #15562
2015-12-22 12:36:04 -07:00
Robert Muir 7abd051734 better containing of hadoop for actual blobstore operations 2015-12-22 12:07:37 -05:00
Daniel Mitterdorfer f9a601c7da Make BulkProcessorRetryIT less sensitive
In this commit we increase the queue size of the bulk pool in
BulkProcessorRetryIT to make it less sensitive.

As this test case should stress the pool so bulk processor needs to
back off but not so much that the backoff policy will give up at
some point (which is a valid condition), we still keep it below the
default queue size of 50.
2015-12-22 17:37:30 +01:00
Yannick Welsch c91b0ed7b0 Merge pull request #15603 from ywelsch/fix/java-api-indexed-scripts
Fix Java API documentation for indexed scripts
2015-12-22 16:58:59 +01:00
Yannick Welsch 6d0114edb5 Fix Java API documentation for indexed scripts 2015-12-22 16:58:19 +01:00