Commit Graph

16320 Commits

Author SHA1 Message Date
javanna e8653f5156 Java api: IdsQueryBuilder to accept only non null ids and types
Types are still optional, but if you do provide them, they can't be null. Split the existing constructor that accepted nnull into two, one that accepts no arguments, and another one that accepts the types argument, which must be not null.

Also trimmed down different ways of setting ids, some were misleading as they would always add the ids to the existing ones and not set them, the add prefix makes that clear. Left `addIds` method that accepts a varargs argument. Added check for ids not be null.
2015-10-05 15:10:30 +02:00
javanna 3a0d1841d9 Query refactoring: simplify IndexQueryParserService parse methods and prepare the field for #13859
Relates to #13859
2015-10-05 14:50:15 +02:00
Simon Willnauer e8d74bb9d9 Merge pull request #13881 from s1monw/astalavista_baby
Remove shard-level injector
2015-10-05 14:26:38 +02:00
Simon Willnauer efdecfa161 [TEST] Add tests to ensure that Get uses wrapped searcher / reader 2015-10-05 14:23:55 +02:00
Simon Willnauer 4676eb19a4 add tests for IndexSearcherWrapper 2015-10-05 14:07:18 +02:00
Simon Willnauer 623a519988 also wrap searcher when it's used for Get calls 2015-10-05 14:07:18 +02:00
Simon Willnauer 674a9851cf rename fooSafe into getFoo and getFooOrNull 2015-10-05 14:07:17 +02:00
Simon Willnauer e94f242456 more index level cleanups 2015-10-05 14:07:17 +02:00
Simon Willnauer d6b1f4ce6c Make Percolator a first class citizen in IndexShard and prevent premature index searcher access 2015-10-05 14:07:17 +02:00
Simon Willnauer a892a35f40 Hide engine entirely in IndexShard and do searcher wrapping only on top of the engine 2015-10-05 14:07:17 +02:00
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
Xu Zhang 83366e7017 Merge pull request #13862 from xuzha/index_name_dot
Forbid index name `.` and `..`
2015-10-04 20:20:31 -07: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
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
Xu Zhang fcdd8a29a9 Merge pull request #13882 from xuzha/single_datanode_early_terminate
Early terminate high disk watermark checks on single data node cluster
2015-10-03 16:18:53 -07: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
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
Jason Tedor aa4a63354b Forbid use of com.google.common.io.Resources 2015-10-02 16:58:14 -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
David Pilato a05fd19c6c Merge remote-tracking branch 'origin/master' 2015-10-02 20:09:34 +02:00
xuzha 8434c79429 Update `cat allocation` doc 2015-10-02 10:25:27 -07: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
Clinton Gormley 07b0a63c5f Merge pull request #13890 from veatch/patch-1
Clarify that aliases and indices can't share names
2015-10-02 18:11:54 +02:00
Jason Tedor ab9c117362 Merge pull request #13908 from jasontedor/resources-be-gone
Remove and forbid use of com.google.common.io.Resources
2015-10-02 18:09:00 +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
Clinton Gormley 5f1b867158 Update get-settings.asciidoc
Fixed docs for filtering index settings in get-settings API

Closes #13872
2015-10-02 16:46:45 +02:00
David Pilato 216dcd9dd5 Merge branch 'pr/ec2-start-if-discovery-type' 2015-10-02 16:29:13 +02:00
Clinton Gormley 8788516e1b Merge pull request #13868 from hafkensite/patch-1
Update example with parameters
2015-10-02 16:24:05 +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 4a49f4d928 Merge pull request #13891 from josegonzalez/patch-1
Update link to Jepsen related test class
2015-10-01 22:51:39 +02:00
Jose Diaz-Gonzalez 8782c8e08d Update link to Jepsen related test class 2015-10-01 16:34:19 -04:00
Jason Veatch cb0003ff6c Clarify that aliases and indices can't share names 2015-10-01 15:21:34 -04: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
Alexander Reelsen 6436cd52f2 Smoke tester: Remove deprecated verbose flag for run() method 2015-10-01 15:14:23 +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
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