Commit Graph

16126 Commits

Author SHA1 Message Date
Jason Tedor 3d4fac6256 Remove unused import in o.e.t.UpdateThreadPoolSettingsTests 2015-09-15 10:48:01 -04:00
Jason Tedor 2357e65fcc Remove unused import in o.e.a.t.TermVectorsFilter 2015-09-15 10:46:59 -04:00
Jason Tedor b912ad7d56 Remove file that was inadvertently committed 2015-09-15 10:42:11 -04:00
Michael McCandless 028acdd06f Merge pull request #13548 from mikemccand/indexing_memory_controller
Improve IndexingMemoryController a bit:
      - promptly push indexing buffer changes to IndexWriter, instead of waiting for next refresh/flush
      - don't wait for merges to finish before dropping a shards's indexing buffer to 512 KB once it's inactive
      - fix NPE if indices.memory.index_buffer_size is in node's settings with a bytes (not %) unit
      - add some more logger.debug
2015-09-15 10:39:10 -04:00
Jason Tedor 2833ad4d6f Remove unused import in o.e.t.ESIntegTestCase 2015-09-15 10:37:57 -04:00
Jason Tedor d0221751a8 Merge pull request #13572 from jasontedor/joiner-be-gone
Remove and forbid use of com.google.common.base.Joiner
2015-09-15 10:30:56 -04:00
Jason Tedor b3c6327caf Remove and forbid use of com.google.common.base.Joiner
This commit removes and now forbids all uses of
com.google.common.base.Joiner across the codebase. This is one of many
steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-15 10:30:42 -04:00
Jason Tedor b15cf5f708 Merge pull request #13575 from jasontedor/long-math-be-gone
Remove and forbid use of com.google.common.math.LongMath
2015-09-15 10:28:48 -04:00
Jason Tedor 7a29febd72 Remove and forbid use of com.google.common.math.LongMath
This commit removes and now forbids all uses of
com.google.common.math.LongMath across the codebase. This is one step
of many in the eventual removal of Guava as a dependency.
2015-09-15 10:28:02 -04:00
Pedro Andujar 3961de3e56 Enable SSL for blob storage
In order to increase Security.

The Microsoft Azure storage services support both HTTP and HTTPS; however, using HTTPS is highly recommended.
2015-09-15 14:25:56 +01:00
Simon Willnauer ff4a11aa32 Replace and ban next batch of Guava classes
This commit replaces and bans:
 * com.google.common.util.concurrent.UncheckedExecutionException
 * com.google.common.util.concurrent.AtomicLongMap
 * com.google.common.primitives.Longs
 * com.google.common.io.ByteStreams
 * com.google.common.collect.UnmodifiableIterator
 * com.google.common.collect.ObjectArrays
 * com.google.common.collect.Multimap
 * com.google.common.collect.MultimapBuilder

Relates to #13224
2015-09-15 14:44:41 +02:00
Jason Tedor d472115ab3 Merge pull request #13559 from jasontedor/iterables-be-gone
Remove and forbid use of com.google.common.collect.Iterables
2015-09-15 07:49:50 -04:00
Jason Tedor 527ab95c39 Remove and forbid use of com.google.common.collect.Iterables
This commit removes and now forbids all uses of
com.google.common.collect.Iterables across the codebase. This is one of
many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-15 07:47:36 -04:00
Jason Tedor 6e3a4e21a1 Merge pull request #13540 from jasontedor/preconditions-be-gone
Remove and forbid use of com.google.common.base.Preconditions
2015-09-15 07:42:31 -04:00
Jason Tedor acbede48d7 Completely remove Preconditions.checkArgument 2015-09-15 07:23:35 -04:00
Jason Tedor 78bff93ab1 Completely remove Preconditions.checkState 2015-09-15 07:23:34 -04:00
Jason Tedor f5c408535d Remove and forbid use of com.google.common.base.Preconditions
This commit removes and now forbids all uses of
com.google.common.base.Preconditions across the codebase. This is one
of many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-15 07:23:34 -04:00
Christoph Büscher dbaa90a3f8 Merge branch 'master' into feature/query-refactoring 2015-09-15 11:47:42 +02:00
David Pilato a38bcc5d62 [test] plugins simple RestIT tests don't work from IDE
When running a RestIT test from the IDE, you actually start an internal node which does not automatically load the plugin you would like to test.

We need to add:

```java
    @Override
    protected Collection<Class<? extends Plugin>> nodePlugins() {
        return pluginList(PLUGIN_HERE.class);
    }
```

Everything works fine when running from maven because each test basically:

* installs elasticsearch
* installs one plugin
* starts elasticsearch with this plugin loaded
* runs the test

Note that this PR only fixes the fact we run an internal cluster with the expected plugin.

Cloud tests will still fail when run from the IDE because is such a case you actually start an internal node with many mock plugins.
And REST test suite for cloud plugins basically checks if the plugin is running by checking the output of NodesInfo API.

And we check:

```yml
- match:  { nodes.$master.plugins.0.name: cloud-azure  }
- match:  { nodes.$master.plugins.0.jvm: true  }
```

But in that case, this condition is certainly false as we started also `mock-transport-service`, `mock-index-store`, `mock-engine-factory`, `node-mocks`, `asserting-local-transport`, `mock-search-service`.

Closes #13479
2015-09-15 10:10:05 +02:00
Lee Hinman de2fcd4be4 [TEST] Use greaterThanOrEqualTo for testClusterInfoServiceCollectsInformation 2015-09-14 21:10:13 -06:00
Michael McCandless ceab9a898b remove index.buffer_size setting 2015-09-14 16:52:32 -04:00
Christoph Büscher 01ea42619a Tests: re-enable SearchQueryIT#testIndicesQuerySkipParsing and fixing exception message 2015-09-14 22:41:37 +02:00
Nik Everett 713009df37 Merge branch 'Output plugin info only in verbose mode'
https://github.com/elastic/elasticsearch/pull/12908

Moved output to verbose level and additionally changed the plugin info output format

Before:

```shell
PluginInfo{name='cloud-aws', description='The Amazon Web Service (AWS) Cloud plugin allows to use AWS API for the unicast discovery mechanism and add S3 repositories.', site=false, jvm=true, classname=org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin, isolated=true, version='2.1.0-SNAPSHOT'}
```

After:

```shell
- Plugin information:
Name: cloud-aws
Description: The Amazon Web Service (AWS) Cloud plugin allows to use AWS API for the unicast discovery mechanism and add S3 repositories.
Site: false
Version: 2.1.0-SNAPSHOT
JVM: true
* Classname: org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin
* Isolated: true
```

Fixes #12907
2015-09-14 15:36:20 -04:00
Britta Weber 6ea6876839 [test] wait until master actually has applied cluster state that contains second node
If we don't wait we might retrieve the cluster state before second node
was added when we try to add the delegate in which the discovery node for
node_2 is null.
2015-09-14 18:56:40 +02:00
Nik Everett 3fa3b1597f [test] PluginManager plugin info printing
Also removes @Test in keeping with Elasticsearch's slow migration away from
the annotation in favor of test methods named testSomeThing.
2015-09-14 11:32:33 -04:00
Britta Weber 20f757c187 Merge pull request #13481 from brwe/single-node-blocks
[test] make sure ESSingleNodeTestCase waits after starting node until…
2015-09-14 17:09:25 +02:00
Britta Weber ba4712fb38 [test] make sure ESSingleNodeTestCase waits after starting node until all blocks removed
When a single node starts up it will first elect itself as master and then tries to
recover the cluster state or, if there is none,  initialize an empty one and publish it.
Until it has done that, the cluster state will contain a global block and
requests might fail with
SERVICE_UNAVAILABLE/1/state not recovered / initialized
We need to wait for green.
2015-09-14 17:06:34 +02:00
Lee Hinman 004f23500e [TEST] Add AwaitsFix for https://github.com/elastic/elasticsearch/issues/13558 2015-09-14 08:40:36 -06:00
Britta Weber 997616a42b [test] test that shards are deleted if the first attempt after relocation failed and index deleted next 2015-09-14 16:09:15 +02:00
Alexander Reelsen 5f6aeb982d Release script: Improve automation for package repositories
* Automatic package repository creation for debian and rpm repositories using deb-s3 and rpm-s3 tools
* Fixing paths in email for repositories
* Add manual verification step for maven staging repo
* Do not create release directory in /tmp, because we might loose it on VMs
* Removed unused download-s3 script
* Add signage check for RPM
* Removed download-s3.py/upload-s3.py, as they are unused

Closes #13209
2015-09-14 15:03:30 +02:00
Michael McCandless 2edf9cf82d logger.trace not logger.debug; fix test to verify bytes-sized index buffer size in node settings on node init took 2015-09-14 08:41:31 -04:00
Christoph Büscher 90f24c1a79 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/index/query/GeoDistanceRangeQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/GeohashCellQuery.java
	core/src/main/java/org/elasticsearch/index/query/WrapperQueryBuilder.java
	core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
2015-09-14 14:31:01 +02:00
Nik Everett 9c91af9b7f Merge pull request #13422 from nik9000/java_8_for_package_tests
Packaging tests use Java 8
2015-09-14 08:26:04 -04:00
Simon Willnauer bd025080c4 Don't use forbidden API in FailableCache 2015-09-14 14:00:50 +02:00
Jason Tedor 57c5efacf6 Fix test bug in o.e.a.s.b.n.TransportBroadcastByNodeActionTests
This commit fixes a test bug in
o.e.a.s.b.n.TransportBroadcastByNodeActionTests. Namely, the randomized
test allowed for the creation of cluster states that allocated indices
having zero shards. This ultimately surfaced in a
NoSuchElementException when attempting to iterate over the nonexistent
shards. The fix is merely to draw the random number of shards from 1 to
10 instead of 0 to 10.
2015-09-14 07:54:05 -04:00
Simon Willnauer 30bd46ab25 Replace LoadingCache usage with a simple ConcurrentHashMap
This commit replaces the usage of LoadedCache with a simple CHM and calls
to computeIfAbsent and adds LoadingCache and CacheLoader to forbidden APIs

Relates to #13224
2015-09-14 13:25:58 +02:00
Alexander Reelsen a96350d785 Release: Add 1.7.2 bwc indices/versions
* Added BWC indices
* Added snapshot version to Version.java
* Fixed create_bwc_index to use localhost instead of localhost and 127.0.0.1 (problem with ipv4/6 setup)
2015-09-14 12:58:46 +02:00
Michael McCandless 698da29573 pull out string constants for settings, and add javadocs 2015-09-14 05:58:21 -04:00
Michael McCandless 8dc08f70b4 remove forced refresh on settings update 2015-09-14 05:32:59 -04:00
Michael McCandless 274044e7dd push settings change before refresh, when shard becomes inactive 2015-09-14 05:18:07 -04:00
Christoph Büscher adaa998225 Query Refactoring: adding illegal argument checks to MatchQueryBuilder 2015-09-14 11:12:56 +02:00
Michael McCandless 9148382be0 even if engineUnsafe() is null we still must update the EngineConfig 2015-09-14 05:12:06 -04:00
Simon Willnauer 40959068d5 Remove and forbid use of guava Function, Charsets, Collections2
This commit removes and now forbids all uses of
Function, Charsets, Collections2  across the codebase. This
is one of many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-14 10:27:12 +02:00
Robert Muir d0deb28336 Merge pull request #13550 from rmuir/this_test_is_fucked_up
NewPathForShardTests is broken every which way from Sunday.
2015-09-14 04:13:55 -04:00
Boaz Leskes 15f4863ef6 Discovery: Add two phased commit to Cluster State publishing
When publishing a new cluster state, the master will send it to all the node of the cluster, noting down how many *master* nodes responded successfully. The nodes do not yet process the new cluster state, but rather park it in memory. As soon as at least minimum master nodes have ack-ed the cluster state change, it is committed and a commit request is sent to all the node that responded so far (and will respond in the future). Once receiving the commit requests the nodes continue to process the cluster state change as they did before this change.

A few notable comments:
1. For this change to have effect, min master nodes must be configured.
2. All basic cluster state validation is done in the first phase of publish and is thus now part of `ShardOperationResult`
3. A new `COMMIT_TIMEOUT` settings is introduced, dictating how long a master should wait for nodes to ack the first phase. Unlike `PUBLISH_TIMEOUT`, if waiting for a commit times out, the cluster state change will be rejected.
4. Failing to achieve a min master node of acks, will cause the master to step down as it clearly doesn't have enough active followers.
5. Previously there was a short window between the moment a master lost it's followers and it stepping down because of node fault detection failures. In this short window, the master could process any change (but fail to publish it). This PR closes this gap to 0.
6. A dedicated pending cluster states queue was added to keep pending non-comitted cluster states and manage the logic around processing committed cluster states. See #13303 for details.

Closes #13062 , Closes #13303
2015-09-14 09:55:41 +02:00
Simon Willnauer 562126a332 Clenup InternalClusterInfoService
This commit allows to refresh the info service in a blocking fashion
which allows tests to prevent installing listeners alltogether and
makes the class easier to test. Installing a listnener is always subject
to concurrent modifications where the listener might be called mulitple times
or with stale information which causes tests to fail.
2015-09-14 09:37:19 +02:00
Simon Willnauer 95c83ba2b8 Fix compilation error 2015-09-14 09:29:41 +02:00
Simon Willnauer a77ee6e5dd Merge pull request #13545 from s1monw/use_supplier_instead_of_reflection
Use Supplier instead of Reflection
2015-09-14 09:21:15 +02:00
Simon Willnauer a0c10850d9 Use Supplier instead of Reflection
Java 8 allows for method references which in-turn will cause
compile errors if a method is not visible while reflection fails late
and maybe too late. We can now register Request instances via FooRequest::new
instead of passing FooRequest.class and call it's ctor via reflection.
2015-09-14 09:11:32 +02:00
Boaz Leskes 564e1eca42 merge from master 2015-09-14 09:03:45 +02:00