Commit Graph

20959 Commits

Author SHA1 Message Date
Clinton Gormley 8c4aa75b0c Added version 2.4.0 to Version 2016-03-16 17:46:16 +01:00
Nik Everett 80f638b56a Support scheduled commands in current context
Adds support for scheduling commands to run at a later time on another
thread pool in the current thread's context:

```java
Runnable someCommand = () -> {System.err.println("Demo");};
someCommand = threadPool.getThreadContext().preserveContext(someCommand);
threadPool.schedule(timeValueMinutes(1), Names.GENERAL, someCommand);
```

This happens automatically for calls to `threadPool.execute` but `schedule`
and `scheduleWithFixedDelay` don't do that, presumably because scheduled
tasks are usually context-less. Rather than preserve the current context
on all scheduled tasks this just makes it possible to preserve it using
the syntax above.

To make this all go it moves the Runnables that wrap the commands from
EsThreadPoolExecutor into ThreadContext.

This, or something like it, is required to support reindex throttling.
2016-03-16 12:29:06 -04:00
Clinton Gormley 0543d46c1d Fixed regex in cat.recovery REST tes
The time column should accept integer ms or floating point seconds
2016-03-16 17:22:00 +01:00
Christoph Büscher 1908d6dc73 Add build() method to SortBuilder implementations
For the current refactoring of SortBuilders related to #10217,
each SortBuilder should get a build() method that produces a
SortField according to the SortBuilder parameters on the shard.

This change also slightly refactors the current parse method in
SortParseElement to extract an internal parse method that returns
a list of sort fields only needs a QueryShardContext as input
instead of a full SearchContext. This allows using this internal
parse method for testing.
2016-03-16 17:21:06 +01:00
Alexander Kazakov 51ac97000b Fix column aliases in _cat/indices, _cat/nodes and _cat/shards APIs #17101 2016-03-16 19:18:43 +03:00
Christoph Büscher 055234c893 Merge branch 'feature-suggest-refactoring'
Refactors all suggestion builders to be able to be parsed on
the coordinating node and serialized as objects to the shards.
Specifically, all SuggestionBuilder implementations implement
NamedWritable for serialization, a fromXContent() method that
handles parsing xContent and a build() method that is called
on the shard to create the SuggestionContext.

Relates to #10217
2016-03-16 16:51:09 +01:00
Christoph Büscher 6ddf9ae92f Merge branch 'master' into feature-suggest-refactoring 2016-03-16 15:27:02 +01:00
Igor Motov b10db19595 Bring back tests for missing elements in the diff-serialized cluster state
We can add it back now that we improved our compression framework.

Closes #11257
2016-03-16 09:13:52 -04:00
Yannick Welsch e32da555aa Fix Windows start script to pass parameters in last position
Relates to #15320
2016-03-16 13:43:32 +01:00
Nik Everett 7197172047 [reindex] Properly register status
Without this commit fetching the status of a reindex from a node that isn't
coordinating the reindex will fail. This commit properly registers reindex's
status so this doesn't happen. To do so it moves all task status registration
into NetworkModule and creates a method to register other statuses which the
reindex plugin calls.
2016-03-16 07:40:49 -04:00
Clinton Gormley d83e12094e Docs: Added redirect entries for multicast plugin and the cloud plugins 2016-03-16 12:31:00 +01:00
Christoph Büscher 39667b5793 Merge branch 'master' into feature-suggest-refactoring
Conflicts:
	docs/reference/migration/migrate_5_0/java.asciidoc
2016-03-16 12:06:42 +01:00
Christoph Büscher 79356c8a3b Query DSL: `constant_score` should throw error on more than one filter
When specifying more than one `filter` in a `constant_score`
query, the last one will be the only one that will be
executed, overwriting previous filters. It should rather
raise a ParseException to notify the user that only one
filter query is accepted.

Closes #17126
2016-03-16 10:59:48 +01:00
Christoph Büscher 43f71d1ff5 Merge pull request #17111 from cbuescher/fix-potential-parseBug-GeoDistanceSort
Fix a potential parsing problem in GeoDistanceSortParser.
For an input like `{ [...], "coerce" = true, "ignore_malformed" = false }` the parser will 
fail to parse the ignore_malformed boolean flag and will fall through to the last 
else-branch where the boolean flag will be parsed as geo-hash and `ignore_malformed`
treated as field name.
2016-03-16 10:17:08 +01:00
Jason Tedor d2db9cf95f Fix es.path.home on Windows 2016-03-16 04:46:25 -04:00
Simon Willnauer 302087d686 [TEST] Wait for ongoing merges in testRenewSyncFlush
Now that we also renew on forceMerge we might get a concurrent
flush while we are flushing on the test level
2016-03-16 09:37:50 +01:00
Ryan Ernst a90a2b34fc Build: Switch to maven-publish plugin
The build currently uses the old maven support in gradle. This commit
switches to use the newer maven-publish plugin. This will allow future
changes, for example, easily publishing to artifactory.

An additional part of this change makes publishing of build-tools part
of the normal publishing, instead of requiring a separate upload step
from within buildSrc. That also sets us up for a follow up to enable
precomit checks on the buildSrc code itself.
2016-03-15 19:16:37 -07:00
Jason Tedor 0f00c14afc Remove dead code in FTL#simpleMatchToFullName
This commit removes some dead code that resulted from removing the
ability for a field to have different names (after enforcing that fields
have the same full and index name).

Closes #17127
2016-03-15 22:11:48 -04:00
Jason Tedor 618441aea3 Merge pull request #17088 from jasontedor/simplify-bootstrap-settings
Bootstrap does not set system properties
2016-03-15 19:25:16 -04:00
Jason Tedor 66ba044ec5 Use setting in integration test cluster config 2016-03-15 17:45:17 -04:00
Jason Tedor 4ee90db13d Remove path.home command-line setting 2016-03-15 16:29:29 -04:00
Jason Tedor 5994e91b08 Fix systemd pidfile setting
This commit fixes the pidfile setting on systems that used systemd. The
issue is that the pidfile can only be set via the command line arguments
-p or --pidfile, and is no longer settable via a setting.
2016-03-15 15:57:37 -04:00
Clinton Gormley 432f0cc193 Docs: Added the ingest node to the modules/nodes page
Closes #17113
2016-03-15 19:03:18 +01:00
Yannick Welsch 7fb07a9a53 Merge pull request #17112 from ywelsch/enhance/forbid-sysout-for-tests
Forbid test sources to use System.out.println and Throwable.printStackTrace
2016-03-15 16:36:34 +01:00
Jason Tedor d1b85f69ef Shorter name for test class
This commit renames the ElasticsearchCommandLineParsingTests to
ElasticsearchCliTests.
2016-03-15 11:22:53 -04:00
Christoph Büscher 52852bdf39 Fix a potential parsing problem in GeoDistanceSortParser
Test revealed a potential problem in the current GeoDistanceSortParser.
For an input like `{ [...], "coerce" = true, "ignore_malformed" = false }
the parser will fail to parse the `ignore_malformed` boolean flag and
will fall through to the last else-branch where the boolean flag will be
parsed as geo-hash and `ignore_malformed` treated as field name.

Adding fix and test that will fail with the old parser code.
2016-03-15 15:41:54 +01:00
Yannick Welsch f5e6db4090 Remove System.out.println and Throwable.printStackTrace from tests 2016-03-15 15:40:37 +01:00
Simon Willnauer cbaa480c16 [TEST] Let the windows machine be slow as hell 2016-03-15 15:35:44 +01:00
Jason Tedor 2f7e181318 Fix typo inadvertently introduced 2016-03-15 10:05:28 -04:00
Yannick Welsch e91fd09692 Enable jdk-system-out Forbidden API checks on test sources 2016-03-15 15:03:37 +01:00
Yannick Welsch d14ae5f8b6 Remove Python and Javascript Benchmark classes 2016-03-15 15:02:50 +01:00
Jason Tedor 088dea8863 Fix javadoc comment on Elasticsearch#init
This commit fixes a stale javadoc comment on Elasticsearch#init; the
method is now visible for testing.
2016-03-15 09:35:58 -04:00
Jason Tedor fac0f990fc Rename "daemonize" to "foreground"
This commit renames the Bootstrap#init parameter "daemonize" to
"foreground" for clarity.
2016-03-15 09:31:33 -04:00
Simon Willnauer b4300da816 Merge pull request #17108 from s1monw/issues/17019
Try to renew sync ID if `flush=true` on forceMerge

Today we do a force flush which wipes the sync ID if there is one which
can cause the lost of all benefits of the sync ID ie. fast recovery.
This commit adds a check to renew the sync ID if possible. The flush call
is now also not forced since the IW will show pending changes if the forceMerge added new segments.
if we keep using force we will wipe the sync ID even if no renew was actually needed.

Closes #17019
2016-03-15 14:16:25 +01:00
Simon Willnauer 52c283cdee [TEST] Add test that ensures we never bump the minor version of lucene in a bugfix release 2016-03-15 14:15:41 +01:00
Simon Willnauer 2390eb5ed4 Add 2.2.1 to the version lookup table 2016-03-15 14:07:20 +01:00
Christoph Büscher 7ccf7adbdf Merge pull request #17074 from cbuescher/sort-serialization-scriptsort
Adding methods and tests to ScriptSortBuilder that makes it implement NamedWritable and adds a fromXContent() method needed to read itseld from xContent. Also changing sortMode() setters in 
FieldSortBuilder, GeoDistanceSortBuilder and ScriptSortBuilder to accept an enum instead of a String
value.

Relates to #15178
2016-03-15 13:59:10 +01:00
Clinton Gormley 0793f00cb9 Added version 2.2.1 and bwc indices for 2.2.1 2016-03-15 13:48:38 +01:00
Simon Willnauer 8b201fda46 Merge pull request #17106 from s1monw/fix_can_delete
IndicesStore checks for `allocated elsewhere` for every shard not alocated on the local node

On each cluster-state update we check on the local node if we can delete some shards content.
For this we linearly walk all shards and check if they are allocated and started on another node
and if we can delete them locally. if we can delete them locally we go and ask other nodes if we can
delete them and then if the shared IS active elsewhere issue a state update task to delete it. Yet,
there is a bug in IndicesService#canDeleteShardContent which returns `true` even if that shards
datapath doesn't exist on the node which causes tons of unnecessary node to node communication and
as many state update task to be issued. This can have large impact on the cluster state processing
speed. 

**NOTE:** This only happens for shards that have at least one shard allocated on the node ie. if an `IndexService` exists.
2016-03-15 12:59:45 +01:00
Simon Willnauer 10333e2f05 IndicesStore checks for `allocated elsewhere` for every shard not allocated on the local node
On each clusterstate update we check on the local node if we can delete some shards content.
For this we linearly walk all shards and check if they are allocated and started on another node
and if we can delete them locally. if we can delete them locally we go and ask other nodes if we can
delete them and then if the shared IS active elsewhere issue a state update task to delete it. Yet,
there is a bug in IndicesService#canDeleteShardContent which returns `true` even if that shards
datapath doesn't exist on the node which causes tons of unnecessary node to node communciation and
as many state update task to be issued. This can have large impact on the cluster state processing
speed.

**NOTE:** This only happens for shards that have at least one shard allocated on the node
ie. if an `IndexService` exists.

Closes #17106
2016-03-15 12:58:36 +01:00
Simon Willnauer e8152d375e Try to renew sync ID if `flush=true` on forceMerge
Today we do a force flush which wipes the sync ID if there is one which
can cause the lost of all benefits of the sync ID ie. fast recovery.
This commit adds a check to renew the sync ID if possible. The flush call
is now also not forced since the IW will show pending changes if the forceMerge added new segments.
if we keep using force we will wipe the sync ID even if no renew was actually needed.

Closes #17019
2016-03-15 12:50:57 +01:00
Christoph Büscher bc84cdfed1 Using SortMode enum in all sort builders 2016-03-15 12:43:19 +01:00
Christoph Büscher b4b874f0d8 Merge branch 'master' into feature-suggest-refactoring 2016-03-15 12:11:39 +01:00
Isabel Drost-Fromm be09778dc0 Fix compile error
that's what you get for a "let me quickly try something out here"
2016-03-15 11:12:38 +01:00
Christoph Büscher 1f1f6861b7 Merge branch 'master' into sort-serialization-scriptsort
Conflicts:
	core/src/test/java/org/elasticsearch/search/sort/AbstractSortTestCase.java
2016-03-15 11:03:28 +01:00
Isabel Drost-Fromm 4b5783bdd9 Merge pull request #16127 from MaineC/enhancement/15178-sort-fieldsortbuilder
Refactor FieldSortBuilder to add serialization support
2016-03-15 10:48:20 +01:00
Simon Willnauer e85d8b3817 Merge pull request #17103 from s1monw/followup_15853
Reenable CreateIndexIT#testCreateAndDeleteIndexConcurrently

Since #16442 is merged we should be able to reenable this test as a followup
of #15853 - all issues blocking it have been resolved I guess.
2016-03-15 09:46:22 +01:00
Simon Willnauer 29268f100b Reenable CreateIndexIT#testCreateAndDeleteIndexConcurrently
Since #16442 is merged we should be able to reenable this test as a followup
of #15853 - all issues blocking it have been resolved I guess.
2016-03-15 09:31:13 +01:00
David Pilato 84c862b825 Merge remote-tracking branch 'origin/master' 2016-03-15 09:25:26 +01:00
David Pilato a3bf57d116 Upgrade azure SDK to 0.9.3
We are ATM using azure SDK 0.9.0.

Azure latest release is now 0.9.3 (released in February 2016).

<img width="1024" alt="the central repository search engine google chrome aujourd hui at 08 41 12" src="https://cloud.githubusercontent.com/assets/274222/13662836/a806ba3a-e69d-11e5-8655-4a838db2ef47.png">

Artifacts are on [maven central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.microsoft.azure%22%20AND%20(a%3Aazure-serviceruntime%20OR%20a%3Aazure-servicebus%20OR%20a%3Aazure-svc-*))

Change log:

## 2016.2.18 Version 0.9.3

* Fix enum bugs in azure-svc-mgmt-websites

## 2016.1.26 Version 0.9.2

* Fix HTTP Proxy for Apache HTTP Client in Service Clients
* Key Vault: Fix KeyVaultKey to not attempt to load RSA Private Key

## 2016.1.8 Version 0.9.1

* Support HTTP Proxy
* Fix token expiration issue #557
* Service Bus: Add missing attributes: partitionKey, viaPartitionKey
* Traffic Manager: Update API version, add MinChildEndpoints for NestedEndpoints
* Media: Add support for Widevine (DRM) dynamic encryption

Closes #17042.
2016-03-15 09:18:34 +01:00