Commit Graph

4145 Commits

Author SHA1 Message Date
Jun Ohtani 3d13c27fa0 fix checkstyle error 2016-03-08 17:32:14 +09:00
Adrien Grand ad7fbe7251 Add test for the index_options on a keyword field. #16990
This found a bug in the validation, which was checking the wrong IndexOptions.
2016-03-08 09:24:20 +01:00
Jun Ohtani 48cb81e30b Analysis : Allow string explain param in JSON
Fix typo
Remove unused import

Closes #16925
2016-03-08 16:19:02 +09:00
Jun Ohtani 071d578953 Analysis : Allow string explain param in JSON
Move some test methods from AnalylzeActionIT to RestAnalyzeActionTest
Allow string explain param if it can parse
Fix wrong param name in rest-api-spec

Closes #16925
2016-03-08 16:19:02 +09:00
Ryan Ernst 7e16afbbf2 Added transport network settings to whitelist for tribe node
Also fail on any path settings within tribe sections
2016-03-07 12:58:55 -08:00
Ryan Ernst 55cf49420c Merge branch 'master' into more_tribe_node_settings 2016-03-07 12:43:50 -08:00
Robert Muir 2dd8ed90ab Merge pull request #16986 from rmuir/mmap_java9
Enable unmap hack for java 9
2016-03-07 15:22:55 -05:00
Simon Willnauer 53cc8bdc45 fix typo 2016-03-07 17:52:23 +01:00
Simon Willnauer 9cbc602487 Remove SNAPSHOT from versions in plugin descriptors
We removed leniencey from version parsing which caught problems with
-SNAPSHOT suffixes on plugin properies. This commit removes the -SNAPSHOT
from both es and the extension version and adds tests to ensure we can
parse older versions that allowed -SNAPSHOT in BWC way.
2016-03-07 17:41:38 +01:00
Simon Willnauer 887b69b58b Add support for alpha versions
Elasticsearch 5.0 will come with alpha versions which is not supported
in the current version scheme. This commit adds support for aplpha starting
with es 5.0.0 in a backwards compatible way.
2016-03-07 16:39:15 +01:00
Christoph Büscher 350e3a4850 Merge pull request #16955 from cbuescher/timezone-dateRangeAgg
Date range aggregations used to be unable to use a `time_zone` parameter to e.g. be applied 
int date math roundings like in `now/d` (see #10130 as an example). After the aggregation 
refactoring, the time_zone parameter has been pulled up to ValuesSourceAggregatorBuilder 
and can now be used in date range aggregations as well. 

This change adds randomized time zone settings to the existing IT tests to verify that the 
`time_zone` parameter is honored when calculating the bucket boundaries. Also moving 
the DateRangeTests from module-groovy/messy back to core as DateRangeIT, sharing 
common script mocks with DateHistogramIT and adding documentation for the 
`time_zone` parameter in the date range aggregation docs.

Closes #10130
2016-03-07 16:11:55 +01:00
Simon Willnauer a40587b377 Merge pull request #16982 from s1monw/remove_old_version
Remove old and unsupported version constants

All version <= 2.0 are not supported anymore. This commit removes all
uses of these versions.
2016-03-07 16:03:14 +01:00
Robert Muir a0191dff01 Enable unmap hack for java 9 2016-03-07 09:45:55 -05:00
Christoph Büscher ff46303f15 Simplify mock scripts 2016-03-07 15:39:35 +01:00
Christoph Büscher 5ff413074a Adding tests for `time_zone` parameter for date range aggregation 2016-03-07 15:38:24 +01:00
Martijn van Groningen 82d01e4315 Added ingest info to node info API, which contains a list of available processors.
Internally the put pipeline API uses this information in node info API to validate if all specified processors in a pipeline exist on all nodes in the cluster.
2016-03-07 14:44:50 +01:00
Simon Willnauer d9ddd3fa45 Remove leniency from segments info integrity checks
Closes #16973
2016-03-07 12:23:30 +01:00
Simon Willnauer 7e4c4cd8d9 bring back accidentially removed MockScriptEngine plugin 2016-03-07 12:17:32 +01:00
Simon Willnauer 46c295d029 use true/false rather than yes/no in tests 2016-03-07 12:03:05 +01:00
Simon Willnauer a29f734b75 Only assert that analyzers are the same if lucene version is the same 2016-03-07 11:55:56 +01:00
Simon Willnauer f071f327db Remove old and unsupported version constants
All version <= 2.0 are not supported anymore. This commit removes all
uses of these versions.
2016-03-07 11:49:06 +01:00
Martijn van Groningen 050bfc31b6 Don't call IR#leaves() after global field data has been constructed
This IR may already be closed and GlobalFieldData is cached and this can cause AlreadyClosedException while checking the assert.
2016-03-07 11:25:52 +01:00
Christoph Büscher 7ec5075a87 Merge branch 'master' into feature-suggest-refactoring 2016-03-07 10:45:43 +01:00
Adrien Grand c69fc008d4 Merge pull request #16972 from alexshadow007/fix-16812
Build empty extended stats aggregation if no docs collected for bucket
2016-03-07 10:44:20 +01:00
Robert Muir 54018a5d37 upgrade to lucene 6.0.0-snapshot-bea235f
Closes #16964

Squashed commit of the following:

commit a23f9d2d29220991aa498214530753d7a5a148c6
Merge: eec9c4e 0b0a251
Author: Robert Muir <rmuir@apache.org>
Date:   Mon Mar 7 04:12:02 2016 -0500

    Merge branch 'master' into lucene6

commit eec9c4e5cd11e9c3e0b426f04894bb2a6dae4f21
Merge: bc67205 675d940
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 13:45:00 2016 -0500

    Merge branch 'master' into lucene6

commit bc67205bdfe1526eae277ab7856fc050ecbdb7b2
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 09:56:31 2016 -0500

    fix test bug

commit a60723b007ff12d97b1810cef473bd7b553a0327
Author: Simon Willnauer <simonw@apache.org>
Date:   Fri Mar 4 15:35:35 2016 +0100

    Fix SimpleValidateQueryIT to put braces around boosted terms

commit ae3a49d7ba7ced448d2a5262e5d8ec98671a9090
Author: Simon Willnauer <simonw@apache.org>
Date:   Fri Mar 4 15:27:25 2016 +0100

    fix multimatchquery

commit ae23fdb88a8f6d3fb7ba60fd1aaf3fd72d899aa5
Author: Simon Willnauer <simonw@apache.org>
Date:   Fri Mar 4 15:20:49 2016 +0100

    Rewrite DecayFunctionScoreIT to be independent of the similarity used

    This test relied a lot on the term scoring and compared scores
    that are dependent on the similarity. This commit changes the base query
    to be a predictable constant score query.

commit 366c2d518c35d31251033f1b6f6a93f6e2ae327d
Author: Simon Willnauer <simonw@apache.org>
Date:   Fri Mar 4 14:06:14 2016 +0100

    Fix scoring in tests due to changes to idf calculation.

    Lucene 6 uses a different default similarity as well as a different
    way to calculate IDF. In contrast to older version lucene 6 uses docCount per field
    to calculate the IDF not the # of docs in the index to overcome the sparse field
    cases.

commit dac99fd64ac2fa71b8d8d106fe68825e574c49f8
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 08:21:57 2016 -0500

    don't hardcoded expected termquery score

commit 6e9f340ba49ab10eed512df86d52a121aa775b0f
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 08:04:45 2016 -0500

    suppress deprecation warning until migrated to points

commit 3ac8908424b3fdad44a90a4f7bdb3eff7efd077d
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 07:21:43 2016 -0500

    Remove invalid test: all commits have IDs, and its illegal to do this.

commit c12976288124ad1a26467e7e848fb810548e7eab
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 07:06:14 2016 -0500

    don't test with unsupported back compat

commit 18bbfe76128570bc70883bf91ff4c44c82d27817
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 07:02:18 2016 -0500

    remove now invalid lucene 4 backcompat test

commit 7e730e572886f0ef2d3faba712e4256216ff01ec
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 06:58:52 2016 -0500

    remove now invalid lucene 4 backwards test

commit 244d2ab6868ba5ac9e0bcde3c2833743751a25ec
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 06:47:23 2016 -0500

    use 6.0 codec

commit 5f64d4a431a6fdaa1234adca23f154c2a1de8284
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Mar 4 06:43:08 2016 -0500

    compile, javadocs, forbidden-apis, etc

commit 1f273cd62a7fe9ca8f8944acbbfc5cbdd3d81ccb
Merge: cd33921 29e3443
Author: Simon Willnauer <simonw@apache.org>
Date:   Fri Mar 4 10:45:29 2016 +0100

    Merge branch 'master' into lucene6

commit cd33921ac742ef9fb351012eff35f3c7dbda7264
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Mar 3 23:58:37 2016 -0500

    fix hunspell dictionary loading

commit c7fdbd837b01f7defe9cb1c24e2ec65604b0dc96
Merge: 4d4190f d8948ba
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Mar 3 23:41:53 2016 -0500

    Merge branch 'master' into lucene6

commit 4d4190fd82601aaafac6b8254ccb3edf218faa34
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Mar 3 23:39:14 2016 -0500

    remove nocommit

commit 77ca69e288b1a41aa9595c921ed166c272a00ea8
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Mar 3 23:38:24 2016 -0500

    clean up numericutils vs legacynumericutils

commit a466d696fbaad04b647ffbc0857a9439b583d0bf
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Mar 3 23:32:43 2016 -0500

    upgrade spatial4j

commit 5412c747a8cfe638bacedbc8233163cb75cc3dc5
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Mar 3 23:19:28 2016 -0500

    move to 6.0.0-snapshot-8eada27

commit b32bfe924626b87e540692375ece09e7c2edb189
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 11:30:09 2016 +0100

    Fix some test compile errors.

commit 6ccde35e9840b03c68d1a2cd47c7923a06edf64a
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 11:25:51 2016 +0100

    Current Lucene version is 6.0.0.

commit f62e1015d931b4cc04c778298a8fa1ba65e97ad9
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 11:20:48 2016 +0100

    Fix compile errors in NGramTokenFilterFactory.

commit 6837c6eabf96075f743649da9b9b52dd39611c58
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 10:50:59 2016 +0100

    Fix the edge ngram tokenizer/filter.

commit ccd7f070de5efcdfbeb34b9555c65c4990bf1ba6
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 10:42:44 2016 +0100

    The missing value is now accessible through a getter.

commit bd3b77f9b28e5b05daa3d49683a9922a6baf2963
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 10:41:51 2016 +0100

    Remove IndexCacheableQuery.

commit 05f3091c347aeae80eeb16349ac51d2b53cf86f7
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 10:39:43 2016 +0100

    Fix compilation of function_score queries.

commit 81cda79a2431ac78f56b0cc5a5765387f662d801
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Mar 3 10:35:02 2016 +0100

    Fix compile errors in BlendedTermQuery.

commit 70994ce8dd1eca0b995870974a38e20f26f96a7b
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 23:33:03 2016 -0500

    add bug ID

commit 29d4f1a71f36f646b5a6060bed3db019564a279d
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 21:02:32 2016 -0500

    easy .store changes

commit 5e1a1e6fd665fa455e88d3a8987362fad5f44bb1
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 20:47:24 2016 -0500

    cleanups mostly around boosting

commit 333a669ec6c305ada5645d13ed1da0e19ec1d053
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 20:27:56 2016 -0500

    more simple fixes

commit bd5cd98a1e089c866b6b4a5e159400b110140ce6
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 19:49:38 2016 -0500

    more easy fixes and removal of ancient cruft

commit a68f419ee47da5f9c9ce5b372f01d707e902474c
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 19:35:02 2016 -0500

    cutover numerics

commit 4ca5dc1fa47dd5892db00899032133318fff3116
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 18:34:18 2016 -0500

    fix some constants

commit 88710a17817086e477c6c021ec346d0534b7fb88
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 18:14:25 2016 -0500

    Add spatial-extras jar as a core dependency

commit c8cd6726583e5ce3f546ed355d4eca037164a30d
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Mar 2 18:03:33 2016 -0500

    update to lucene 6 jars
2016-03-07 04:12:23 -05:00
Ryan Ernst 8455624884 Merge branch 'master' into mock_terminal 2016-03-06 11:35:22 -08:00
Ryan Ernst 5a94f8b3e6 Remove outdated nocommit and tweak assert to output bad exception message on failure. 2016-03-06 11:34:10 -08:00
Ryan Ernst ed7934ee79 Cli: Simplify test terminals
This commit simplifies and consolidates the two different
implementations of terminals used in tests. There is now a single
MockTerminal which captures output, and allows accessing as one large
string (with unix style \n as newlines), as well as configuring
input.
2016-03-06 11:30:30 -08:00
Simon Willnauer 8ca284862d Notify GatewayRecoveryListener on failure
If the recovery throws an exception we miss to notify the recovery
listener and bubble up the uncaught exception. This commit uses
an AbstractRunnable that also catches rejected execution exceptions
etc. and notifies the listener accordingly.
2016-03-06 16:43:12 +01:00
Simon Willnauer 17e28d05b7 Delete ShardsAllocatorModuleIT, it's been replaced by ClusterModuleTests
ClusterModuleTests tests what ShardsAllocatorModuleIT tests without starting
a cluster. Unittests should be preferrred over IT tests anyway and the instantiation
of the balanced shards allocator is tested with every other integration test.
2016-03-06 13:42:56 +01:00
Simon Willnauer a283a2526b Merge pull request #16956 from s1monw/only_wait_unless_master
Only wait for initial state unless we already got a master
2016-03-06 09:16:07 +01:00
Alexander Kazakov 3674774b73 Build empty extended stats aggregation if no docs are collected for bucket #16812 2016-03-05 22:50:54 +03:00
Adrien Grand 0322d490a8 Temporarily re allow string fields to give Kibana more time to switch to text/keyword. 2016-03-05 19:09:45 +01:00
Simon Willnauer 9135c3c967 Only wait for initial state unless we already got a master
This seems to be an error introduced in refactoring around #16821
where we now wait 30seconds by default if the node already joined
a cluster and got a master. This can slow down tests dramatically
espeically on slow boxes and notebooks.

Closes #16956
2016-03-05 12:00:25 +01:00
George P. Stathis 198a79edf5 Fix spacing, assert key contains period 2016-03-04 19:32:44 -05:00
Yannick Welsch 250db4999e Speed up shard balancer by reusing shard model while moving shards that can no longer be allocated to a node
Decommissioning a node or applying a filter inclusion / exclusion can potentially lead to many shards that need to be moved to other nodes. This commit reuses the model across all
shard movements in an allocation round: It calculates the shard model once and simulates the application of all shards that can be moved on this model.

Closes #16926
2016-03-04 19:10:56 +01:00
Lee Hinman 809bb9e5a1 [TEST] Increase timeout for awaiting alias & document creation
Test waits 10 seconds for all 10 aliases and documents to be created,
but it can take longer that that on slower machines.
2016-03-04 08:25:40 -07:00
Simon Willnauer 8652cd8aa3 Handle RejectedExecution gracefully in TransportService
Today we might run into a rejected execution exception when
we shutdown the node while handling a transport exception. The
exception is run in a seperate thread but that thread might
not be able to execute due to the shutdown. Today we barf and fill
the logs with large exception. This commit catches this exception
and logs it as debug logging instead.
2016-03-04 12:18:07 +01:00
Jim Ferenczi 927303e7a9 Change the field mapping index time boost into a query time boost.
Index time boost will still be applied for indices created before 5.0.0.
2016-03-04 11:47:35 +01:00
Simon Willnauer 5008694ba1 Remove support for legacy checksums
Elasticsearch 5.0 doesn't support indices wiht legacy checksums anymore.
The last time we write legacy checksums was in 1.3.0 which was based
on lucene 4.9 already which means that all files have CRC32 checksums.
All indices that Elasticsearch can read today must be written with
lucene version >= 4.8 anyway so we can drop this layer of backwards
compatibility entirely.

Since we are close to upgrading to Lucene 6.0 we should get rid of this
in a more contiained change than the lucene upgrade.
2016-03-03 22:58:18 +01:00
Simon Willnauer 6a76fa3382 Use SleepingWrapper on shared filesytems
On shared FS / shadow replicas we rely on a lock retry if the lock has
not yet been relesed on a relocated primary. This commit adds this `hack`
for shared filesystems only.

Closes #16936
2016-03-03 21:43:12 +01:00
Christoph Büscher 30a788d87c Suggestions: Make field name mandatory ctor argument
The field name is a required argument for all suggesters, but
it was specified via a field() setter in SuggestionBuilder so far.
This changes field name to being a mandatory constructor argument
and lets suggestion builders throw an error if field name is missing
or the empty string.
2016-03-03 21:35:53 +01:00
Lee Hinman 6adbbff97c Fix organization rename in all files in project
Basically a query-replace of "https://github.com/elasticsearch/" with "https://github.com/elastic/"
2016-03-03 12:04:13 -07:00
Lee Hinman f9d1f95e84 [TEST] mark IndexWithShadowReplicasIT with awaitsfix 2016-03-03 11:14:06 -07:00
Jason Tedor 166259db64 Use and test relative time in TransportBulkAction
This commit modifies TransportBulkAction to use relative time instead of
absolute time when measuring how long a bulk request took to be
processed, and adds tests for this functionality.

Closes #16916
2016-03-03 11:53:53 -05:00
Jason Tedor e75a0da4d5 Add max number of processes check
This commit adds a bootstrap check on Linux for the max number of
processes available to the user running the Elasticsearch process.

Closes #16919
2016-03-03 11:40:10 -05:00
Simon Willnauer 244caa3618 Remove writeLockTimeout from InternalEngine
`writeLockTimeout` has been removed in Lucene 6 completely and since we have
the shard locking mechanism now for quite a while we don't need this anymore.
Shards should only be allocated once all resources are released such that there
can't be any other shard holding the lock to that index in any sane situation.
2016-03-03 16:40:24 +01:00
Martijn van Groningen 7a3da93551 Merge branch 'pr/16923' 2016-03-03 15:58:38 +01:00
Martijn van Groningen f0e80e1a7a replaced integration test with unit test.
Closes #16692
2016-03-03 15:31:57 +01:00
Adrien Grand 2c3e4840f2 Store _all payloads on 1 byte instead of 4. #16899
This changes the `_all` field to store per-field boosts using a single byte
similarly to norms.
2016-03-03 15:00:23 +01:00
Jim Ferenczi c996db731a Merge pull request #16922 from jimferenczi/fix_match_query_tests
Fix sporadic error on match query test when a fuzziness of 0s is used.
2016-03-03 14:29:47 +01:00
Jim Ferenczi c76949ddd5 After review 2016-03-03 12:19:07 +01:00
Christoph Büscher ef4db5c1e4 Merge branch 'master' into feature-suggest-refactoring 2016-03-03 12:18:03 +01:00
Jim Ferenczi 06bef0ca6b Fix sporadic error on match query test when a fuzziness of 0s is used on a date field. 2016-03-03 11:54:07 +01:00
Alexander Kazakov 98c164c3f0 Check that parent_type in HasParent query has child types #16692 2016-03-03 13:32:22 +03:00
Adrien Grand eef19be072 Deprecate string in favor of text/keyword. #16877
This commit removes the ability to use string fields on indices created on or
after 5.0. Dynamic mappings now generate text fields by default for strings
but there are plans to also add a sub keyword field (in a future PR).

Most of the changes in this commit are just about replacing string with
keyword or text. Some tests have been removed because they existed because of
corner cases of string mappings like setting ignore-above on a text field or
enabling term vectors on a keyword field which are now impossible.

The plan is to remove strings entirely in 6.0.
2016-03-03 10:20:56 +01:00
Daniel Mitterdorfer f70e5aca50 Merge remote-tracking branch 'danielmitterdorfer/simplify-azure-settings' 2016-03-03 10:02:35 +01:00
Daniel Mitterdorfer 52acf0e6e1 Use new settings infra to parse AzureStorageSettings
With this commit we simplify the parsing logic in AzureStorageSettings
by leveraging the new settings infrastructure.

Closes #16363
2016-03-03 10:01:14 +01:00
Jason Tedor f35bad808c Fix case in mlockall check error message 2016-03-02 22:43:20 -05:00
Jason Tedor 62638b8212 Fix case in mlockall check error message 2016-03-02 22:12:18 -05:00
javanna 45b7b5175c [TEST] add unit test for DiscoveryNodes node selectors 2016-03-02 21:59:20 +01:00
javanna 04947a5fef Remove DiscoveryNode#shouldConnectTo method
This method was originally introduced to prevent client nodes from connecting to other client nodes directly in the cluster. That said, it worked only if node.client was set to true and not when node.master and node.data were both set to false. It looks safe to remove, which allows to solve all kinds of problems around monitoring that happen wherever there are 2 or more clients nodes in the cluster, and a REST call hits one of them (node counts are off, clients nodes are missing).
2016-03-02 21:59:20 +01:00
Simon Willnauer 1e70e16c89 Merge pull request #16866 from s1monw/only_address_for_http
Use HttpInfo in cat/_nodes instead of node attribute
2016-03-02 21:48:35 +01:00
Simon Willnauer 8fbdd3334f Use HttpInfo in cat/_nodes instead of node attribute
The node attribute also renders the type of the inet address
as well as the host name which is unneeded in the cat action.
2016-03-02 21:33:36 +01:00
Michael McCandless 4df83dc9a5 Merge pull request #16661 from camilojd/feature/disk-segments-stats
Segments stats in indices stats API now optionally includes aggregated file sizes by file extension / index component
2016-03-02 13:58:20 -05:00
javanna 72e4c26d0e _cat/nodeattrs: remove unnecessary nodes stats call 2016-03-02 17:14:49 +01:00
javanna fd70d60457 Remove http_address from _cat/nodeattrs
This was recently added with #16770 but it turns out it is not a proper node attribute, so it is enough to print out as part of _cat/nodes only.
2016-03-02 17:14:49 +01:00
Jason Tedor 99aa4942d2 Add more missed final keywords in BootstrapChecks 2016-03-02 10:00:44 -05:00
Jason Tedor 0c914b51c7 Add missed final keywords in BootstrapChecks 2016-03-02 09:57:26 -05:00
Jason Tedor f2220c9786 Add mlockall bootstrap check
This commit adds a boostrap check for the situation bootstrap.mlockall
is enabled, but memory was not able to be locked.

Closes #16909
2016-03-02 09:51:31 -05:00
Jason Tedor 6caec9bc25 Display if node is snapshot build on startup
Recent simplifications to org.elasticsearch.Version led to "-SNAPSHOT"
to not be displayed in the node version upon startup. Yet, this is
useful information to have. This simple commit adds back the display of
"-SNAPSHOT" in the version on startup if the build is a snapshot build.

Closes #16908
2016-03-02 09:41:23 -05:00
Martijn van Groningen 27ea143c3f Revert "bulk api: use `System.nanoTime()` instead of `System.currentTimeMillis()` to compute the estimated took time"
This reverts commit 82567f1bdf.

`System.nanoTime()` was being called from multiple threads causing the timing to be incorrect.
2016-03-02 15:20:54 +01:00
Jason Tedor 9ad5919002 Refactor bootstrap checks
This commit refactors the bootstrap checks into a dedicated class. The
refactoring provides a model for different limits per operating system,
and provides a model for unit tests for individual checks.

Closes #16844
2016-03-02 08:47:16 -05:00
Christoph Büscher c0e5e40e02 Merge branch 'master' into feature-suggest-refactoring 2016-03-02 14:22:03 +01:00
Christoph Büscher 299b9d9b63 Fix NPE in SearchSourceBuilder
Prevent a NPE when parsing `fields` parameter and internal field name
list has not been initialized.

Closes #16902
2016-03-02 12:25:29 +01:00
Martijn van Groningen 82567f1bdf bulk api: use `System.nanoTime()` instead of `System.currentTimeMillis()` to compute the estimated took time
In this case we compute elapsed time and `System.nanoTime()` is designed to do just do that.
The absolute timing `System.currentTimeMillis()` provides in not needed and the relative timing `System.nanoTime()` provides is likely to be more accurate.
2016-03-02 09:20:24 +01:00
Camilo Díaz Repka 356364810c Implementation of Segment disk stats aggregating sizes by index file extension.
Use 'includeSegmentFileSizes' as the flag name to report disk usage.
Added test that verifies reported segment disk usage is growing accordingly after adding a document.
Documentation: Reference the new parameter as part of indices stats.
2016-03-01 23:16:49 -03:00
Ryan Ernst 3bd33f839f Add test for ignoring path settings in tribe client 2016-03-01 15:07:59 -08:00
Ryan Ernst 6566327159 Add test for per tribe client overrides 2016-03-01 14:49:27 -08:00
Ryan Ernst 6ca7666646 Tribe: Passthrough environment and network settings to tribe client nodes
In 2.2, the client nodes created internally by a tribe node were changed
to be explicit about which settings the client nodes use, no longer
loading all settings from elasticsearch.yml. However, some settings were
missed, notably network bind settings. This change adds those settings
to be passed through, as well as adds unit tests for building the tribe
client node settings.
2016-03-01 14:42:28 -08:00
Chris Earle ea2792e278 Adjusting based on comments. 2016-03-01 17:18:09 -05:00
Chris Earle 8fa0d8e905 Add LifecycleRunnable
I've noticed throughout the code that we have a need to remove the boilerplate lifecycle check when starting/rescheduling certain runnables. This provides a simpler implementation to get this functionality without duplicating it.
2016-03-01 17:18:09 -05:00
Jason Tedor aa8ee74c6c Bump Elasticsearch version to 5.0.0-SNAPSHOT
This commit bumps the Elasticsearch version to 5.0.0-SNAPSHOT in line
with the alignment of versions across the stack.

Closes #16862
2016-03-01 17:03:47 -05:00
Ali Beyad 72ed01c304 Add AwaitsFix annotation to the sporadically failing test
DiscoveryWithServiceDisruptionIT.testIndicesDeleted pending a fix for
that test (see issue #16890).
2016-03-01 14:04:04 -05:00
Martijn van Groningen 75387001df Added `ingest_took` to bulk response to indicate how much time was spent on ingest preprocessing.
The `ingest_took` is separate from `took`, which keeps track how much time is spent on indexing/deleting/updating.
The `ingest_took` is only visible in the rest response if at least for one bulk item has ingest enabled.
2016-03-01 18:24:26 +01:00
Christoph Büscher be8ed737bc Suggest: Move name of suggestion to SuggestBuilder
Currently each suggestion keeps track of its own name. This has
the disadvantage of having to pass down the parsed name property
in the suggestions fromXContent() and the serialization methods
as an argument, since we need it in the ctor.

This change moves the naming of the suggestions to the surrounding
SuggestBuilder and by this eliminates the need for passind down
the names in the parsing and serialization methods. By making
`name` a required argument in SuggestBuilder#addSuggestion() we
also make sure it is always set and prevent using the same name twice,
which wasn't possible before.
2016-03-01 17:34:47 +01:00
Christoph Büscher aecf51cb42 Merge branch 'master' into feature-suggest-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
2016-03-01 17:20:15 +01:00
Yannick Welsch d5304c7d41 Add additional fallback to http.publish_port and transport.publish_port
In case where the publish address is different to all bound addresses and an explicit publish_port
setting is not provided, the publish_port is now selected as the unique port of bound addresses.
An exception is thrown in case of ambiguities.

Closes #16626
2016-03-01 16:28:13 +01:00
Nik Everett c7c8bb357a Merge pull request #16861 from nik9000/reindex_is_ready
Reindex required some parsing changes for search requests to support
differing defaults from the regular search api.
2016-03-01 10:02:48 -05:00
Ali Beyad 83d1e0985d Index deletes not applied when cluster UUID has changed
If a node was isolated from the cluster while a delete was happening,
the node will ignore the deleted operation when rejoining as we couldn't
detect whether the new master genuinely deleted the indices or it is a
new fresh "reset" master that was started without the old data folder.
We can now be smarter and detect these reset masters and actually delete
the indices on the node if its not the case of a reset master.

Note that this new protection doesn't hold if the node was shut down. In
that case it's indices will still be imported as dangling indices.

Closes #16825
Closes #11665
2016-03-01 09:49:42 -05:00
javanna 5fb4d73e89 Cat nodes api: fix typo in help output 2016-03-01 15:36:54 +01:00
javanna a70be3a10f Cat nodes api: prevent NPEs in case there are multiple client nodes
If you connect to a client node and call _cat/nodes, and there is at least another client node in the cluster, the http address cannot be retrieved thus we get an NPE. This commit prevents an NPE from being thrown. This bug was introduced with #16770
2016-03-01 15:36:42 +01:00
Martijn van Groningen 8182a282d4 removed unused imports and an unused field 2016-03-01 14:12:26 +01:00
Martijn van Groningen a5c0f77f1d ingest: use diffs for ingest metadata 2016-03-01 13:57:31 +01:00
Luca Cavanna d81bfe6f30 Merge pull request #16880 from javanna/enhancement/rename_search_service_transport_action
Rename SearchServiceTransportAction to SearchTransportService
2016-03-01 12:58:28 +01:00
Boaz Leskes b224cc8898 Node.stop() should stop Discovery
It used to do so through the DiscoveryService but that was removed in #16821 , but I forgot to add an explicit discovery stop
2016-03-01 12:51:38 +01:00
Felipe Forbeck 95a76a5921 testing script compiled once dot files detected 2016-03-01 08:38:28 -03:00
Felipe Forbeck f65f84e0ef Ignoring hidden script files and files with invalid names 2016-03-01 08:38:28 -03:00
Felipe Forbeck 5478c97a36 Minor fixes after review 2016-03-01 08:38:27 -03:00
Felipe Forbeck cc743049cf Skipping hidden files compilation for script service 2016-03-01 08:38:27 -03:00