2050 Commits

Author SHA1 Message Date
Simon Willnauer
d2e3e8cc7b more cleanups 2015-10-05 14:07:17 +02:00
Simon Willnauer
c0eca94a04 Remove shard-level injector
Today we use a hirachical injector on the shard level for each shard
created. This commit removes the shard level injetor and replaces
it with good old constructor calls. This also removes all shard level plugin
facilities such that plugins can only have node or index level modules.
For plugins that need to track shard lifecycles they should use the relevant
callback from the lifecycle we already provide.
2015-10-05 14:07:17 +02:00
Simon Willnauer
188aa684ac Merge pull request #13923 from s1monw/off_by_one
Record all bytes of the checksum in VerifyingIndexOutput
2015-10-05 14:03:47 +02:00
Britta Weber
6e29facd0a Merge pull request #13934 from brwe/log-config-order
settings in log config file should not overwrite custom parameters
2015-10-05 13:49:55 +02:00
Britta Weber
ceefb06752 settings in log config file should not overwrite custom parameters 2015-10-05 13:29:35 +02:00
xuzha
668371c945 Forbid index name with '.' and '..'.
Fixes #13858
2015-10-04 20:05:43 -07:00
Jason Tedor
d3cef85352 Remove unnecessary call to MessageDigest.reset 2015-10-04 21:02:50 -04:00
Robert Muir
8ff42834e9 lock down javascript and python permissions 2015-10-04 17:13:47 -04:00
Jason Tedor
bde4889daf Add field for expiration conditions 2015-10-04 16:56:15 -04:00
Jason Tedor
e5a10e9520 Merge pull request #13907 from jasontedor/hash-be-gone
Remove and forbid use of com.google.common.hash.*
2015-10-04 16:26:12 -04:00
Jason Tedor
67d1c70c2d Remove and forbid use of com.google.common.hash.*
This commit removes and now forbids all uses of
com.google.common.hash.HashCode, com.google.common.hash.HashFunction,
and com.google.common.hash.Hashing across the codebase. This is one of
the few remaining steps in the eventual removal of Guava as a
dependency.

Relates #13224
2015-10-04 16:01:24 -04:00
Simon Willnauer
96206dfd2a [TEST] Work around how OS / GIT handles line separator 2015-10-04 21:46:40 +02:00
Simon Willnauer
95406c4701 Record all bytes of the checksum in VerifyingIndexOutput
The fix in #13848 has an off by one issue where the first byte of the checksum
was never written. Unfortunately most tests shadowed the problem and the first
byte of the checksum seems to be very likely a 0 which causes only very rare
failures.

Relates to #13896
Relates to #13848
2015-10-04 21:11:02 +02:00
xuzha
b19be2c34a DiskThresholdDecider check data nodes number
Right now, we allow allocation if there is only a single node in the
cluster. it would be nice to fail open when there is only one data node
(instead of only one node total).

closes #9391
2015-10-03 16:16:51 -07:00
Michael McCandless
19ab16b9a5 set last indexing time before invoking IMC 2015-10-03 17:29:01 -04:00
Michael McCandless
934cc091e6 fix tests; pull out translog buffer size constant 2015-10-03 17:15:59 -04:00
Yannick Welsch
cdb00371da Merge pull request #13828 from ywelsch/fix-snapshot-restore-throttling
Snapshot restore operations throttle more than specified
2015-10-03 16:40:27 +02:00
Yannick Welsch
03a4e226f1 Snapshot restore operations throttle more than specified
Lucene's RateLimiter can do too much sleeping on small values (see also #6018).
The issue here is that calls to "pause" are not properly guarded in "restoreFile".

Instead of simply adding the guard, this commit uses the RateLimitingInputStream similar as for "snapshotFile".

Closes #13828
2015-10-03 16:39:00 +02:00
Michael McCandless
f27c0adb0b a start 2015-10-03 05:09:07 -04:00
Simon Willnauer
04e892634e Verify Checksum once it has been fully written to fail as soon as possible
Today we are relying on calling Store.verify on the closed stream to validate the
checksum. This is still necessary to catch file truncation but for an actually corrupted
file or checksum we can fail early and check the checksum against the actual metadata
once it's been fully written to the VerifyingIndexOutput.
2015-10-02 21:49:07 +02:00
Jason Tedor
5fbf3494fe Merge pull request #13909 from jasontedor/immutable-collections-be-gone
Remove and forbid use of com.google.common.collect.ImmutableCollection
2015-10-02 15:18:34 -04:00
Jason Tedor
7447eb9842 Remove and forbid use of com.google.common.collect.ImmutableCollection
This commit removes and now forbids all uses of
com.google.common.collect.ImmutableCollection across the codebase. This
is one of the final steps in the eventual removal of Guava as a
dependency.

Relates #13224
2015-10-02 18:27:30 +02:00
Jason Tedor
a5f9cd98d8 Remove and forbid use of com.google.common.o.Resources
This commit removes and now forbids all uses of
com.google.common.io.Resources across the codebase. This is one of the
few remaining steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-10-02 17:42:40 +02:00
Michael McCandless
5278cf0d5e Merge pull request #13870 from mikemccand/close_tokenstream
Close TokenStream in finally clause
2015-10-02 14:43:26 +01:00
Nik Everett
a378cc6866 Remove ImmutableMap#copyOf from core/src/main
Mostly favoring unmodifiableMap and making sure to only wrap maps that aren't
otherwise returned and so cannot be copied.

MapMaker#immutableMap has to go next.
2015-10-02 13:22:05 +02:00
Jason Tedor
105d830114 Correct condition for when time is needed 2015-10-02 11:55:36 +02:00
Nik Everett
ab7fa7fe9e Remove multi-arg ImmutableMap#of variants 2015-10-02 04:01:40 +02:00
Nik Everett
e75f1137f2 Finish removing ImmutableMap#of from tests 2015-10-02 02:44:28 +02:00
Nik Everett
f68dabe615 Finish removing ImmutableMap#of
We'll need to be more careful with CopyOnWriteHashMap than I was at first.
2015-10-02 01:35:32 +02:00
Nik Everett
e6303302e6 Remove more ImmutableMap#of
TODO - look for places where CopyOnWriteHashMap will do.
2015-10-02 00:40:38 +02:00
Nik Everett
9430e17f70 Yet more ImmutableMap#of removal
Did some refactoring of PathTrie along the way to remove warnings. Added a
simple toString to it to make it easier to debug.
2015-10-02 00:18:05 +02:00
Nik Everett
a9d59024b9 More removing ImmutableMap#of() 2015-10-01 23:29:29 +02:00
Nik Everett
bd2202bf21 Start removing ImmutableMap#of 2015-10-01 22:52:07 +02:00
Nik Everett
a0288742e7 Remove and ban unmodifiableMap in cluster package
We're concerned that unmodifiableMap uses significantly more memory than
ImmutableMap did - especially in cluster state - so we ban it there outright
and move to ImmutableOpenMap.

Removes ClusterState$Builder#routingTable(RoutingTable$Builder) because that
method had the side effect of building the routing table which can only be
done once per RoutingTable$Builder now that it uses ImmutableOpenMap.
2015-10-01 21:48:40 +02:00
Xu Zhang
7b74f0ddc9 Merge pull request #13783 from andrestc/feature/disk-used-by-es
Adds disk used by indices to _cat/allocation

closes #13529
2015-10-01 11:26:58 -07:00
Simon Willnauer
d9b68a7674 Call verify on index input after copying 2015-10-01 16:48:37 +02:00
Simon Willnauer
bd66c4bb0d [TEST] Add some debug output to HasChildQueryBuilderTests 2015-10-01 16:13:34 +02:00
André Carvalho
03c6e8e1cb Adds disk used by indices to _cat/allocation
Sets Store flag on request
2015-10-01 08:16:58 -03:00
Simon Willnauer
edac9c17fa [TEST] ensure files are synced otherwise MDW will corrupt them afterwards 2015-10-01 10:46:55 +02:00
David Pilato
264fb5f3a2 Merge remote-tracking branch 'origin/master' 2015-10-01 07:14:08 +02:00
Jason Tedor
01e7378804 Cache#computeIfAbsent loader can throw checked exceptions 2015-10-01 02:08:14 +02:00
Jason Tedor
c100d18f86 Start test threads at the same time 2015-10-01 01:41:29 +02:00
Jason Tedor
50cfe71b2a Forbidden means verboten! 2015-10-01 01:18:26 +02:00
Jason Tedor
4efe7b9c18 Replace CyclicBarrier with CountDownLatch 2015-10-01 01:16:33 +02:00
Jason Tedor
716be91345 Remove hidden synchronization from test 2015-10-01 01:04:20 +02:00
Robert Muir
8c4bc7d10b Nuke ES_CLASSPATH appending, JarHell fail on empty classpath elements
Closes #13880

Squashed commit of the following:

commit 316a328e5032e580ba840db993d907631334aac0
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Sep 30 16:57:47 2015 -0400

    windows is terrible

commit 0406b560c58bf833f8d77af9c7cf3386771dd9c5
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Sep 30 16:43:09 2015 -0400

    Nuke ES_CLASSPATH appending

    Out of box, ES expects its stuff to be in particular places. We should not be appending to ES_CLASSPATH, allowing users to specify stuff there, like we do in elasticsearch.bin.sh

    If the user sets it, its not going to work out of box.

    Closes #13812

commit 415d8972df28eddec322bb6d70100a1993fa95f6
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Sep 30 16:26:35 2015 -0400

    Fail hard on empty classpath elements.

    This can happen easily, if somehow old 1.x shellscripts survive and try to launch 2.x code.
    I have the feeling this happens maybe because of packaging upgrades or something.
    Either way: we can just fail hard and clear in this situation, rather than the current situation
    where CWD might be /, and we might traverse the entire filesystem until we hit an error...

    Relates to #13864
2015-09-30 18:59:27 -04:00
Jason Tedor
7a5e90fc45 Lookups from computeIfAbsent should propogate now 2015-10-01 00:47:08 +02:00
Jason Tedor
30bfea741e Cleanup formatting 2015-10-01 00:37:49 +02:00
David Pilato
28f82fb568 Update version incompatibility message for plugin manager
When the plugin manager does not find in `plugin-descriptor.properties` the exact same elasticsearch version it was built on
as the current elasticsearch version, it fails with a message like:

```
ERROR: Elasticsearch version [2.0.0-beta1] is too old for plugin [elasticsearch-mapper-attachments]
```

Actually, the message should be:

```
Plugin [elasticsearch-mapper-attachments] is incompatible with Elasticsearch [2.0.0.beta2]. Was designed for version [2.0.0.beta1].
```

The opposite is true. If you try to install a version of a plugin which was built with a newer version of elasticsearch, it will fail the same way:

```
Plugin [elasticsearch-mapper-attachments] is incompatible with Elasticsearch [2.0.0.beta1]. Was designed for version [2.0.0.beta2].
```
2015-10-01 00:35:17 +02:00
Jason Tedor
11d75226a9 Ensure that computeIfAbsent loader is invoked at-most once 2015-10-01 00:32:44 +02:00