Commit Graph

5574 Commits

Author SHA1 Message Date
Clinton Gormley a6fffae6df Changed .gitignore to ignore all files in .settings except
for the ones that we want to preserve, to ensure a common
coding style between IDEA and Eclipse
2013-09-13 12:40:10 +02:00
Shay Banon d66d326ba9 mark test base classes as abstract 2013-09-13 12:14:52 +02:00
David Pilato e2400bc40e Fix possible NPE due to #3658 change 2013-09-13 11:49:16 +02:00
David Pilato b27e7d3cc9 Remove RestActions#splitXXX(String) methods
* `RestActions#splitIndices(String)`
* `RestActions#splitTypes(String)`
* `RestActions#splitNodes(String)`

And replace with `Strings.splitStringByCommaToArray(String)`

Closes #3680.
2013-09-13 11:36:43 +02:00
Clinton Gormley 17fb10689c The docs URLs have changed to include en/ 2013-09-13 11:23:37 +02:00
Clinton Gormley 9f59a85c26 Removed .settings from .gitignore - @jpountz intended
for it to be included to ensure consistent code styles
between eclipse and IDEA. Instead just ignore
the org.eclipse.m2e preferences
2013-09-13 09:29:06 +02:00
Igor Motov 714aaa40ea CompletionFieldMapper should use index name instead of full name
Fixes #3669
2013-09-12 17:39:03 -04:00
Simon Willnauer 507b6a6e8c Fix several places where resources are not closed
This commit adds a test that checks that we are closing
all files even if there are random IOExceptions happening. The test
found several places where due to IOExceptions streams were not
closed due to unsufficient exception handling.
2013-09-12 23:24:27 +02:00
Luca Cavanna 439413c626 Introduced common test methods in MatchedQueriesTests (e.g. createIndex, ensureGreen, refresh, assertHitCount) 2013-09-12 21:03:33 +02:00
Luca Cavanna 3a5b325b23 Added specific log level to check which shards were refreshed and which shards we searched on 2013-09-12 19:53:59 +02:00
Clinton Gormley d6ecdecc19 [DOCS] Deprecated the from/to/include_lower/include_upper params
in the range query, range filter and numeric range filter.
Better to use gt/gte/lt/lte as they are explicit.
2013-09-12 15:07:36 +02:00
David Pilato 169cd007b5 Fix typo
Thanks to @ybonnel for finding it ;-)
2013-09-12 11:00:59 +02:00
Martijn van Groningen 8ddb809f98 If all scroll ids should be removed then the `_all` value should be used instead of not specifying any scroll ids. 2013-09-12 10:41:38 +02:00
Martijn van Groningen 1fe72dcf56 Moved to use assertHitCount instead of just checking the total count 2013-09-12 10:25:42 +02:00
Martijn van Groningen d3aacba6c6 Set log level to trace for package action.support.broadcast in the RecoveryPercolatorTests#testSinglePercolator_recovery test. 2013-09-12 10:19:10 +02:00
Simon Willnauer fddb7420ae Add support for Lucene's MockDirectoryWrapper
MockDirectoryWrapper adds asserting logic to the low level directory
implementation that helps to track and catch resource leaks like
unclosed index inputs caused by dangling IndexReader or IndexSearcher
instances. It prevents double writes to files and allows low level
random exceptions to be thrown for testing index consistency etc.

Closes #3654
2013-09-11 22:47:34 +02:00
Simon Willnauer 0e936c99e3 Add -Dtests.integration support to pom.xml 2013-09-11 22:16:43 +02:00
Simon Willnauer c2675bac50 Added 'IntegrationTests' annotation to filter integration tests
Tests now support ignoring integartion tests by passing
'-Dtests.integration=false' to the test runner either via IDE or
maven to only run fast unittests.
2013-09-11 22:12:38 +02:00
Luca Cavanna ff54cba807 fixed typo in javadoc 2013-09-11 21:00:53 +02:00
Andrew Raines 6c9542d967 Fix misspellings. 2013-09-11 13:49:33 -05:00
Andrew Raines 7425b85b0b Collapse test.{unit,integration} into org.elasticsearch. 2013-09-11 12:49:49 -05:00
David Pilato b5c9807ba2 Reverting change in bin/plugin due to d3980ee184f11efcbd2b38421f4946de9198fe20 commit 2013-09-11 16:34:08 +02:00
Shay Banon bbce6e8588 Rare race condition when introducing new fields into a mapping
Dynamic mapping allow to dynamically introduce new fields into an existing mapping. There is a (pretty rare) race condition, where a new field/object being introduced will not be immediately visible for another document that introduces it at the same time.

closes #3667, closes #3544
2013-09-11 07:08:57 -07:00
Luca Cavanna 012797a82c Loggers#getLogger static method to take into account the logger prefix
Improved LoggingListener (which reads and applies @TestLogging annotation) to take into account the logger prefix. We can now use the @TestLogging annotation and specify either the whole package name (e.g. o.e.action.metadata) or only the package name without the logger prefix (action.metadata), the custom log level will be properly applied in both cases
2013-09-11 16:04:08 +02:00
Luca Cavanna daedf853a0 Removed logger prefixes when using @TestLogging annotation 2013-09-11 11:24:07 +02:00
Martijn van Groningen 1d8457394d Added more trace logging.
Enabled trace logging for RecoveryPercolatorTests#testMultiPercolator_recovery test
Cleaned up and removed unnecessary usage of concurrent collections.
2013-09-11 11:20:08 +02:00
Luca Cavanna 0b79ba9493 Rewrote SuggestResponse#toString method
It only prints out json now (as the SearchResponse does)
Added missing startObject & endObject (was causing JsonGenerationException)

Closes #3661
2013-09-10 22:33:51 +02:00
Martijn van Groningen 0efa78710b Added clear scroll api.
The clear scroll api allows clear all resources associated with a `scroll_id` by deleting the `scroll_id` and its associated SearchContext.

Closes #3657
2013-09-10 21:17:34 +02:00
David Pilato fafc4eef98 Plugin Manager: add silent mode.
Now with have proper exit codes for elasticsearch plugin manager (see #3463), we can add a silent mode to plugin manager.

```sh
bin/plugin --install karmi/elasticsearch-paramedic --silent
```

Closes #3628.
2013-09-10 18:31:35 +02:00
Britta Weber a91653cf1a change logging level of testTimeoutSendExceptionWithDelayedResponse to TRACE 2013-09-10 17:19:26 +02:00
Luca Cavanna 4032f1eb44 Configured TRACE logging to RecoveryWhileUnderLoadTests#recoverWhileUnderLoadAllocateBackupsTest
We want to log which shards we are searching on and which shards we are refreshing
2013-09-10 14:28:59 +02:00
Britta Weber 7c20603071 use ElasticsearchAssertions to get info on shard failures 2013-09-10 12:13:37 +02:00
Simon Willnauer 5c00dc5773 Rename IndexShard#searcher() to #acquireSearcher()
Based on recent bugs ( #3652 ) where searchers were acquired multiple times
but never released 'IndexShard#searcher()' has not a more accurate name.

Closes #3653
2013-09-09 21:21:27 +02:00
Simon Willnauer 777d7f47a5 Catch ESRejectedExecutionException on node close
When a node shuts down thread pools might throw
ESRejectedExecutionException and our test framework fails tests if
exceptions are not caught hitting uncaught exception handler.
2013-09-09 21:21:27 +02:00
David Pilato 764aa54f2d Plugin Manager should support -remove group/artifact/version naming
When installing a plugin, we use:

```sh
bin/plugin --install groupid/artifactid/version
```

But when removing the plugin, we only support:

```sh
bin/plugin --remove dirname
```

where `dirname` is the directory name of the plugin under `/plugins` dir.

Closes #3421.
2013-09-09 21:17:16 +02:00
Brad Fritz f3c0e39380 key is "index.store.type", not "index.storage.type" 2013-09-09 13:06:09 -04:00
Simon Willnauer 76cc8c3549 Only pull searcher once during completion stats
The inner call to the completion stats pulled a second searcher
that never got released causing the underlying readers to never
get closed unless the node is shut down. This was triggered
with literally each stats call including the completion stats
even if no completion service was used on the index.

Closes #3652
2013-09-09 17:50:41 +02:00
Lee Hinman 7d52d58747 Add AllocationDecider that takes free disk space into account
This commit adds two main pieces, the first is a ClusterInfoService
that provides a service running on the master nodes that fetches the
total/free bytes for each data node in the cluster as well as the
sizes of all shards in the cluster. This information is gathered by
default every 30 seconds, and can be changed dynamically by setting
the `cluster.info.update.interval` setting. This ClusterInfoService
can hopefully be used in the future to weight nodes for allocation
based on their disk usage, if desired.

The second main piece is the DiskThresholdDecider, which can disallow
a shard from being allocated to a node, or from remaining on the node
depending on configuration parameters. There are three main
configuration parameters for the DiskThresholdDecider:

`cluster.routing.allocation.disk.threshold_enabled` controls whether
the decider is enabled. It defaults to false (disabled). Note that the
decider is also disabled for clusters with only a single data node.

`cluster.routing.allocation.disk.watermark.low` controls the low
watermark for disk usage. It defaults to 0.70, meaning ES will not
allocate new shards to nodes once they have more than 70% disk
used. It can also be set to an absolute byte value (like 500mb) to
prevent ES from allocating shards if less than the configured amount
of space is available.

`cluster.routing.allocation.disk.watermark.high` controls the high
watermark. It defaults to 0.85, meaning ES will attempt to relocate
shards to another node if the node disk usage rises above 85%. It can
also be set to an absolute byte value (similar to the low watermark)
to relocate shards once less than the configured amount of space is
available on the node.

Closes #3480
2013-09-09 09:49:30 -06:00
Luca Cavanna 563111f0f9 Fixed typo: renamed test wamer package to warmer 2013-09-09 14:24:21 +02:00
Luca Cavanna 8ad583b35e Fixed typo: renamed test.listerners package to test.listener 2013-09-09 14:24:21 +02:00
Luca Cavanna 5fdae8ba10 Restored log lines to TRACE for notification post alias creation and open/close index
Introduced specific log level for those in OpenCloseIndexTests#testCloseOpenAliasMultipleIndices
2013-09-09 14:24:21 +02:00
Luca Cavanna 9e72683ba4 Added @TestLogging annotation to set a specific level per test method
It supports multiple logger:level comma separated key value pairs
 Use the _root keyword to set the root logger level
 e.g. @Logging("_root:DEBUG,org.elasticsearch.cluster.metadata:TRACE")
 or just @TestLogging("_root:DEBUG,cluster.metadata:TRACE") since we start the test with -Des.logger.prefix=
2013-09-09 14:24:21 +02:00
Simon Willnauer 453e7c1510 Use same index name for indexing that is used for creating the index 2013-09-09 13:01:53 +02:00
Simon Willnauer 732e38b8c7 Throw IAE if reserved completion suggester chars are used in input
The completion suggester reserves 0x00 and 0xFF as for internal use.
If those chars are used in the input string an IAE is thrown and the
input is rejected.

Closes #3648
2013-09-09 11:57:01 +02:00
Simon Willnauer d7b3ed7e8b Only use one document to test empty shards 2013-09-09 10:53:53 +02:00
Simon Willnauer a5bf8824d2 Remove createMapped and mapping helpers from AbstractSharedClusterTest
our tests should use the API we have in favor of hard to read / understand
test helpers.
2013-09-09 09:29:22 +02:00
Nik Everett da4c58d853 Beautify SuggestSearchTests.
SuggestSearchTests had tons of duplicate code and didn't use all of the
fancy new integration test helper method.  I've removed a ton of duplicate
code and used as many of the nice test helper method I could think of.

Closes #3611
2013-09-09 09:16:47 +02:00
Shay Banon 3c5dd43928 fix logging level 2013-09-08 00:32:44 +02:00
Martijn van Groningen 86d69bb41c field rename 2013-09-06 21:35:53 +02:00
Martijn van Groningen b01dececac Removed matched_filters in favor for matched_queries.
Closes #3644
2013-09-06 21:34:08 +02:00