Commit Graph

7678 Commits

Author SHA1 Message Date
Benjamin Devèze f38d6f8a1b Minor improvements to Table class and add tests 2014-03-18 17:23:07 -05:00
Shay Banon 1f15c1e7de BytesReference usage to properly work when hasArray is not available
fix spelling in comment, + remove overcautious assert
2014-03-18 21:06:04 +01:00
Shay Banon 0f6c24d0c5 BytesReference usage to properly work when hasArray is not available
when a BytesReference doesn't have a backing array, properly handle the case in places where its applicable
closes #5455
2014-03-18 21:02:31 +01:00
Martijn van Groningen 7d3f49c43b [TEST] Added the option to specify on what ES version a node should run with. Useful for testing. 2014-03-18 21:36:46 +07:00
Alexander Reelsen 0ca7fddb66 Geo Point Fieldmapper: Allow distance for geohash precision
Even though mentioned differently in the docs, the geohash precision needed to
be an integer instead of a DistanceUnit.

Closes #5448
2014-03-18 14:09:57 +01:00
Shay Banon 0ef3b03be1 Move to use serial merge schedule by default
Today, we use ConcurrentMergeScheduler, and this can be painful since it is concurrent on a shard level, with a max of 3 threads doing concurrent merges. If there are several shards being indexed, then there will be a minor explosion of threads trying to do merges, all being throttled by our merge throttling.
Moving to serial merge scheduler will still maintain concurrency of merges across shards, as we have the merge thread pool that schedules those merges. It will just be a serial one on a specific shard.
Also, on serial merge scheduler, we now have a limit of how many merges it will do at one go, so it will let other shards get their fair chance of merging. We use the pending merges on IW to check if merges are needed or not for it.
Note, that if a merge is happening, it will not block due to a sync on the maybeMerge call at indexing (flush) time, since we wrap our merge scheduler with the EnabledMergeScheduler, where maybeMerge is not activated during indexing, only with explicit calls to IW#maybeMerge (see Merges).
closes #5447
2014-03-18 13:17:00 +01:00
Nik Everett 917c93d7ee Speed up phrase suggestion scoring
Two changes:
1.  In the StupidBackoffScorer only look for the trigram if there is a bigram.
2.  Cache the frequencies in WordScorer so we don't look them up again and
again and again.  This is implemented by wrapping the TermsEnum in a special
purpose wrapper that really only works in context of the WordScorer.

This provides a pretty substantial speedup when there are many candidates.

Closes #5395
2014-03-18 12:16:32 +01:00
Nik Everett d88ac0a95a Make indexRandom handle many documents better
* Index one at a time only rarely if doing more then 300.
* When launching async actions, take some care to make sure you don't already
have more then 150 other async actions in flight.
* When indexing in bulk split into chunks of 1000 documents.
2014-03-18 12:16:32 +01:00
Martijn van Groningen c501d9960a Made p/c override the clone() method. This is necessary since by default clone will make a shallow copy of the original object, while for p/c queries we need to make sure that the wrapped queries are also cloned. 2014-03-18 17:30:45 +07:00
Igor Motov a1192044f2 Add ability to get snapshot status for running snapshots
Closes #4946
2014-03-17 20:13:49 -04:00
Bill Hwang fe487373e6 Revert "Findbug warning supression"
This reverts commit 744eabad03.
2014-03-17 13:55:39 -07:00
Bill Hwang 744eabad03 Findbug warning supression
Added logic to enable findbug warnings supression via annotations
2014-03-17 13:35:37 -07:00
David Pilato 8dfdc6f647 [TEST] pre check download service working
Seen during CI tests, it could appears that the download service is not available for any reason.

This fix in test will check before each test which requires an internet access (annotated with @Network) that the download service we are testing is still working.

It won't fail the test but will mark the test as `Ignored` in case of failure.
2014-03-17 21:31:17 +01:00
David Pilato 0805c01984 [DOCS] Add Azure storage repositories 2014-03-17 19:40:28 +01:00
Simon Willnauer b17e074f07 [TEST] Print tests.jvms and tests.client.ratio if set
We need to print options that can modify stream of events we need
to print it otherwise a seed might not reproduce the failure in
the tests.
2014-03-17 17:14:13 +01:00
uboness 35696aeb75 cleanup formatting in significant aggs package 2014-03-17 14:43:10 +01:00
Dridi Boukelmoune 9500dddad3 Move systemd files from /etc to /usr/lib
As documented in systemd's manual pages tmpfiles.d(5) and systemd.unit(5),
a package should install its default configuration in /usr/lib, which can
be overriden by system administrators in /etc.

New locations in the rpm:
/usr/lib/systemd/system/elasticsearch.service
/usr/lib/tmpfiles.d/elasticsearch.conf
2014-03-17 14:06:34 +01:00
Simon Willnauer ff039019c5 [TEST] Use client node such that we always have to do a round-trip to do a fetch. 2014-03-17 13:55:37 +01:00
markharwood 5f1d9af9fe Documentation fix for significant_terms heading levels 2014-03-17 12:17:54 +00:00
Randy Stauner 933852768d [DOCS] Fixing contributing.md indentation
Add a whitespace to make these separate paragraphs inside of a list.
2014-03-17 12:20:48 +01:00
Randy Stauner 1486188a3b [DOCS] Reword clear-scroll sentence 2014-03-17 12:08:49 +01:00
lzhoucs 5a5171cb70 [DOCS] Fix typo in the reference doc. SuSe -> SUSE
SUSE, as a Linux distribution, is never lower cased

fixes #5354
2014-03-17 12:03:25 +01:00
Justin Etheredge 36219a1786 [DOCS] Updating scripting docs for geo functions
Added a few functions are corrected the default unit where necessary
2014-03-17 11:59:02 +01:00
Boaz Leskes ee8743f3f2 [Docs] added a missing reference to significantterms-aggergations
Also fix header level mismatch issue reported by the build
2014-03-17 11:45:55 +01:00
Boaz Leskes 2a31bd83ef [Tests] QuorumLocalGatewayTests - Set mini_master_nodes earlier to make sure it has effect. ClusterServiceTests - remove a thread.sleep in favor of awaitBusy 2014-03-17 11:01:43 +01:00
Boaz Leskes fcfeab3a52 [Test] FullRollingRestartTests - correctly setting minimum_master_nodes
Also added a ElasticsearchIntegrationTest.setMinimumMasterNodes() helper function.
2014-03-17 10:37:56 +01:00
Boaz Leskes 6f0b15a27a [Test] IndexLifecycleActionTests - set minimum master node earlier to make sure it's in effect when needed. 2014-03-17 09:53:24 +01:00
David Pilato c6915ef4d6 Enforce java version 1.7
When building elasticsearch, we now require to use java 1.7.

Maven will check that before compiling any class. If Java version is incorrect, you will get the following message:

```
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.6.0-65 is not in the allowed range [1.7,).
```

Closes #5428.
2014-03-17 08:43:33 +01:00
Martijn van Groningen 9f52f755a3 [TEST] In PercolatorTests#testPercolateSorting_unsupportedField we need to be sure that the .percolator type exists 2014-03-17 10:50:57 +07:00
Martijn van Groningen b2a3904819 [TEST] Make sure that the facet fields exist. 2014-03-17 10:21:44 +07:00
Simon Willnauer ba8e34755f MulticastChannel returned wrong channel in shared mode
If the shared channel is used a wrong refrence was returned and
close calls couldn't find the listener since it go never registered
in that instance.
2014-03-16 18:19:21 +01:00
Simon Willnauer 43617cf5dc Count latch down if sendsPing throws exception
if the async sendPingsHandler throws an unexpected exception the
corresponding latch is never counted down. This might only happen
during node shutdown but can still cause starvation or test failures.
2014-03-16 16:08:36 +01:00
David Pilato f54e9246c1 Add _cat/plugins endpoint
If we want to have a full picture of versions running in a cluster, we need to add a `_cat/plugins` endpoint.

Response could look like:

```sh
% curl es2:9200/_cat/plugins?v
node component                        version   type url                                   desc
es1  mapper-attachments               1.7.0       j                                        Adds the attachment type allowing to parse difference attachment formats
es1  lang-javascript                  1.4.0       j                                        JavaScript plugin allowing to add javascript scripting support
es1  analysis-smartcn                 1.9.0       j                                        Smart Chinese analysis support
es1  marvel                           1.1.0      j/s http://localhost:9200/_plugins/marvel Elasticsearch Management & Monitoring
es1  kopf                             0.5.3       s  http://localhost:9200/_plugins/kopf   kopf - simple web administration tool for ElasticSearch
es2  mapper-attachments               2.0.0.RC1   j                                        Adds the attachment type allowing to parse difference attachment formats
es2  lang-javascript                  2.0.0.RC1   j                                        JavaScript plugin allowing to add javascript scripting support
es2  analysis-smartcn                 2.0.0.RC1   j                                        Smart Chinese analysis support
```

Closes #4824.
2014-03-16 12:16:09 +01:00
Simon Willnauer 965b85a663 [TEST] add mapping to MoreLikeThisActionTests to make sure doc mapper exists on all shards / nodes 2014-03-16 07:29:24 +01:00
Boaz Leskes 7f49d027b9 [Tests] RecoveryWhileUnderLoadTests - made sure background indexing threads are closed on errors.
Fixed minor logging discrepancies introduced with randomized shard count.
Added logging to recoverWhileUnderLoadWithNodeShutdown
Added logging ElasticsearchIntegrationTest.allowNodes to indicate what nodes were excluded.
recoverWhileRelocating's shard setting were potentially ignored (depending on key order in hashmaps)
2014-03-15 23:06:36 +01:00
EvanYellow 43b5d91de2 BulkProcessor process every n+1 docs instead of n
When you set a BulkProcessor with a bulk actions size of 100, it executes the bulk after 101 documents.

```java
BulkProcessor.builder(client(), listener).setBulkActions(100).setConcurrentRequests(1).setName("foo").build();
```

Same for size. If you set the bulk size to 1024 bytes, it will actually execute the bulk after 1025 bytes.

This patch fix it.

Closes #4265.
2014-03-15 12:32:09 +01:00
Clinton Gormley fb934aff57 [DOCS] Documented gateway.local.auto_import_dangled
Relates to #4996
2014-03-15 12:07:17 +01:00
Simon Willnauer 8bc73531c2 [TEST] Fix CircuitBreakerServiceTests from failing due to rounding errors 2014-03-14 23:19:23 +01:00
Bill Hwang fd89c66668 Remove PMD clone warning
Removed PMD clone warning on class ElasticsearchMergePolicy
2014-03-14 13:40:57 -07:00
Simon Willnauer b622fd18a2 Improve exception handling in HttpDownloadHelper 2014-03-14 21:11:40 +01:00
Simon Willnauer d670575d74 [TEST] Reduce iterations in RandomAllocationDeciderTests 2014-03-14 20:39:07 +01:00
Simon Willnauer b708ab3944 Add slop to prefix phrase query after parsing query string
This fixes a regression introduced by #5005 where the query slop
was simply ignored when a `match_phrase_prefix` type was set.

Closes #5437
2014-03-14 20:26:03 +01:00
Simon Willnauer aa654a26c9 Improve resource handling in Parent/ChildQuery 2014-03-14 20:18:09 +01:00
Simon Willnauer 821173b5cf Enforce query instance checking before it wrapper as a filter
We have the default QueryWrapperFilter as well as our custom one while
our wrapper is explicitly marked as no_cache such that it will never
be included in a cache. This was not consistenly used and caused several
problems during tests where p/c related queries were used as filters
and ended up in the cache. This commit adds the QueryWrapperFilter
ctor to the forbidden APIs to enforce the query instance checks.
2014-03-14 20:18:01 +01:00
rphadake 36a0cb99d7 [Doc] doc updates for date histogram interval
Close #5308
2014-03-14 18:55:32 +01:00
Adrien Grand 65d3b61b97 Add an option to force _optimize operations.
When forced, the index will be merged even if it contains a single segment with
no deletions.

Close #5243
2014-03-14 18:21:56 +01:00
markharwood b6dc7cecd5 Tidy significant terms warnings from Jenkins 2014-03-14 17:03:14 +00:00
Martijn van Groningen d73172c844 Also wrap p/c queries in CustomQueryWrappingFilter in the fquery qparser, because they otherwise p/c queries may work incorrectly. 2014-03-14 22:54:58 +07:00
Holger Hoffstätte 7b26e1fbf8 equals()/hashCode() & tests for ByteArrays to avoid materializing a
full byte[].

Fixes #5435
2014-03-14 16:32:03 +01:00
David Pilato 84b5b45644 Support externalValue() in mappers
Some mappers do not support externalValue() to be set. So plugin developers can't use it while building their own mappers.

Support added in this PR for:

* `BinaryFieldMapper`
* `BooleanFieldMapper`
* `GeoPointFieldMapper`
* `GeoShapeFieldMapper`

Closes #4986.
Relative to #4154.
2014-03-14 16:26:39 +01:00