Commit Graph

2436 Commits

Author SHA1 Message Date
Christoph Büscher be9dd035e2 Merge pull request #14887 from cbuescher/merge-base-shapebuilders
Merging BaseLineString and BasePolygonBuilder with subclass
2015-11-21 12:52:31 +01:00
Camilo Díaz Repka d683e10172 Return a better exception message when regexp query is used on a numeric field 2015-11-21 00:21:24 -03:00
Jason Tedor 22187113b6 Merge pull request #14909 from jasontedor/release-after-successful-acquire
Do not release unacquired semaphore
2015-11-20 18:20:22 -05:00
Jason Tedor d541be462b Do not release unacquired semaphore
This commit adds an acquired flag to BulkProcessor#execute that is set
only after successful acquisition of a permit on the semaphore
there. This flag is used to ensure that we do not release a permit on
the semaphore when we did not obtain a permit on the semaphore.

Closes #14908
2015-11-20 18:03:48 -05:00
Ryan Ernst 88ee2e23a6 Merge branch 'master' into javadocs 2015-11-20 12:20:59 -08:00
markharwood c3a50d7ca2 Search: shift SearchTimeoutTests into core tests minus the Groovy dependency and renamed with IT test suffix 2015-11-20 18:50:17 +00:00
markharwood 5a5f05a0e9 Aggregations: Shift significant terms score test back into core without the Groovy dependency 2015-11-20 18:32:04 +00:00
Colin Goodheart-Smithe 5a18f740ba Aggregations: Moves SumTests out of lang-groovy and back into core
Renames SumTests to SumIT and puts it in the same package as the other aggregation tests. Also updates the tests to not require Groovy
2015-11-20 12:42:08 +00:00
Daniel Mitterdorfer c95c142829 Merge remote-tracking branch 'danielmitterdorfer/fix/ValueCountTests' 2015-11-20 13:21:15 +01:00
Daniel Mitterdorfer 7d6b0fc481 Move ValueCountTests to core
This script moves ValueCountTests from plugins back to core
by using a mock script engine instead of Groovy.
2015-11-20 13:19:55 +01:00
Adrien Grand 4602b8177b Move AvgTests back to core.
This makes AvgTests use a mock plugin engine. I also removed the
textScriptExplicit* methods for the base class since they only make sense for
a groovy script, not a mock script.
2015-11-20 11:58:38 +01:00
Christoph Büscher a2dca2f6cb Geo: Merging BaseLineString and BasePolygonBuilder with subclass
After the removal of some internal shape builders in #14482 the
BaseLineStringBuilder has only one implementation, the LineStringBuilder.
Same for the BasePolygonBuilder. This PR removes the abstract classes
and merges them with their concrete implementation to simplify the
inheritance hierarchy.
2015-11-20 11:37:55 +01:00
William Bowling 18c9eba40a Allow CIDR notation in a query string query
Close #14773
2015-11-20 11:17:56 +01:00
Boaz Leskes 6d9e82311a Don't delete temp recovered checkpoint file if it was renamed
Closes #14872
2015-11-20 10:44:40 +01:00
Boaz Leskes b001e20a83 Disable RecoveryWhileUnderLoadIT for now
Working on a fix http://build-us-00.elastic.co/job/es_core_master_windows-2012-r2/2074/testReport/
2015-11-20 10:38:48 +01:00
Christoph Büscher aa1507d349 Merge pull request #14482 from cbuescher/remove-internal-linestring-builder
Remove InternalLineStringBuilder and InternalPolygonBuilder
2015-11-20 00:06:04 +01:00
Michael McCandless 201318a6f5 include root-cause exception when we fail to change shard's index buffer 2015-11-19 14:50:41 -05:00
Ryan Ernst c3cb1fd08c Merge branch 'master' into javadocs 2015-11-19 10:43:43 -08:00
Yannick Welsch 0a902bfe1c Fix concurrency issue when accessing field UnassignedInfo.lastComputedLeftDelayNanos from TransportClusterHealthAction 2015-11-19 13:12:44 +01:00
Christoph Büscher b5b3ff5eb0 Also removing Ring and replacing it by LineStringBuilder
The Ring subclass is just a LineStringBuilder that has an additional
close() method and keeps a reference to a parent shape builder so
builders can be chained. This PR removes it and replaces it by
using LineStringBuilder instead. The close() method is moved there
and tests are adapted.
2015-11-19 11:54:02 +01:00
Christoph Büscher 39f45496f2 Also removing InternalPolygonBuilder 2015-11-19 11:51:17 +01:00
Christoph Büscher 12941bd4b7 Geo: remove InternalLineStringBuilder
This is a first step in reducing the number of ShapeBuilders since
before we start making the remaining implement Writable for the
search request refactoring. This shape builder seems to have been
only used in tests, and those tests didn't do much to begin with,
so this removed them.

Relates to #14416
2015-11-19 11:51:17 +01:00
Yannick Welsch 6a2fa73fb5 Merge pull request #14808 from ywelsch/refactor/delayed-allocation
Simplify delayed shard allocation
2015-11-19 09:58:52 +01:00
Yannick Welsch 2084df825f Simplify delayed shard allocation
- moves calculation of the delay to a single place (ReplicaShardAllocator)
- reduces coupling between GatewayAllocator and RoutingService
- in master failover situations, elapsed delay time is forgotten

Closes #14808
2015-11-19 09:53:07 +01:00
Xu Zhang 2e6d72de27 Catch exception when reading corrupted snapshot.
Single corrupted snapshot file shouldn't prevent listing all other
snapshot in repository.
2015-11-18 21:43:46 -08:00
Nicholas Knize 0d349854d3 Add CONTAINS relation to geo_shape query
At the time of geo_shape query conception, CONTAINS was not yet a supported spatial operation in Lucene. Since it is now available this commit adds ShapeRelation.CONTAINS to GeoShapeQuery. Randomized testing is included and documentation is updated.
2015-11-18 14:15:35 -06:00
Nicholas Knize 9ed77afe1d Fix assertion precision for legacy GeoDistanceRangeQuery tests
This bug existed for GeoDistanceRangeQuery exclusion limits only (e.g., min/max included == false).

closes #14838
2015-11-18 14:09:27 -06:00
Jason Tedor 756f7876a9 Set ReplicationRequest.internalShardId to null
This commit sets ReplicationRequest.internalShardId to null when the
stream indicates that no ShardId is present in the stream.

Additionally, the use of StreamOutput#writeOptionalStreamable is
changed to be explicit for clarity since the use of
StreamInput#readOptionalStreamable is not possible due to the
no-argument constructor on ShardId being private.
2015-11-18 14:46:45 -05:00
Martijn van Groningen 1661ce5b8c field stats: Fix NPE when index constraint has been set on mapped field but the index is empty 2015-11-18 18:27:29 +01:00
Daniel Mitterdorfer a7bd9e8275 Merge remote-tracking branch 'danielmitterdorfer/fix/14798' 2015-11-18 17:13:06 +01:00
Daniel Mitterdorfer 96724e198a Restore thread interrupt flag after an InterruptedException
This commit replaces all occurrences of Thread.interrupted() with
Thread.currentThread().interrupt(). While the former checks and clears the current
thread's interrupt flag the latter sets it, which is actually intended.

Closes #14798
2015-11-18 17:11:53 +01:00
Christoph Büscher 3e483b5626 Merge pull request #14587 from cbuescher/move-datehistogramtests-core
Move DateHistogramTests back to core module
2015-11-18 16:35:59 +01:00
Jason Tedor d6c40fea20 Fix typo in TransportDeleteAction#shardOperationOnPrimary 2015-11-18 10:30:43 -05:00
Martijn van Groningen 8a454dae33 field stats: Added a `format` option to index constraint that allows to specify date index constraint values in a different format then the for specified in the mapping.
Closes #14804
2015-11-18 14:19:07 +01:00
Jason Tedor 3b2bba64ba Add unit test for LinkedHashMap serialization
This commit adds a unit test for LinkedHashMap serialization that tests
that the method of serialization writes the entries in the LinkedHashMap
in iteration order and that the reconstructed LinkedHashMap preserves
that order. This test is randomized and tests iteration order is
preserved whether the LinkedHashMap is ordered by insertion order or
access order.

Closes #14743
2015-11-17 18:52:28 -05:00
Jason Tedor c1ee90356a Add timeout mechanism for sending shard failures
This commit adds a timeout mechanism for sending shard failures. The
requesting thread can attach a listener to the timeout event so that
handling it is part of the event chain.

Relates #14252
2015-11-17 15:00:27 -05:00
Jason Tedor e08e137aeb Add license header to o.e.c.i.s.StreamTests.java 2015-11-17 14:02:12 -05:00
Jason Tedor 6872d545ac Add system CPU percent to OS stats
This commit adds the system CPU percent reflecting the recent CPU usage
for the whole system.
2015-11-17 13:48:46 -05:00
Jason Tedor 043319c482 Merge pull request #14806 from jasontedor/read-optional-streamable
Use Supplier for StreamInput#readOptionalStreamable
2015-11-17 13:41:35 -05:00
Jason Tedor 1cd4a29b6f Use Supplier for StreamInput#readOptionalStreamable
This commit changes the signature of StreamInput#readOptionalStreamable
to accept a Supplier to create new streamables rather than requiring
callers to construct new instances. This has the advantage of avoiding
an allocation in cases when the stream indicates the resulting
streamable is null
2015-11-17 13:40:22 -05:00
Nik Everett 0119caa4a6 Make Build work without git
If you build elasticsearch without a git repository it was creating a null
shortHash which was causing Elasticsearch not to be able to form transport
connections.

Closes #14748
2015-11-17 13:25:09 -05:00
Jason Tedor d2ffcba890 Merge pull request #14780 from jasontedor/variable-length-long
Add variable-length long encoding
2015-11-17 09:04:13 -06:00
Jason Tedor 9a11e75cf5 Add variable-length long encoding
This commit adds a method of encoding longs using a variable-length
representation. This encoding is an implementation of the zig-zag
encoding from protocol buffers. Numbers that have a small absolute value
will use a small number of bytes. This is achieved by zig-zagging
through the space of longs in order of increasing absolute value (0, -1,
1, -2, 2, …, Long.MAX_VALUE, Long.MIN_VALUE) -> (0, 1, 2, 3, 4, …, -2,
-1). The resulting values are then encoded as if they represent unsigned
numbers.
2015-11-17 09:01:54 -06:00
Daniel Mitterdorfer 2522645123 Fix race in ClusterStatsIT
ClusterStatsIT#testClusterStatus() contained a race where the
test cluster might still be initializing while test already checks
for a green health status.

With this commit the test waits until the cluster status changed and
checks health afterwards.

Checked with @bleskes.
2015-11-17 13:22:28 +01:00
Christoph Büscher d6a756fbe2 Merge pull request #14529 from cbuescher/introduce-shapebuilders
Geo: Moving static factory methods to ShapeBuilders
2015-11-17 11:08:35 +01:00
Ryan Ernst 4975422a35 Merge pull request #14783 from rjernst/type_doc_values
Make _type use doc values
2015-11-16 13:09:49 -08:00
Michael McCandless 01f12fc8d5 Merge pull request #14784 from mikemccand/upgrade_lucene_1714615
Upgrade Lucene to 5.4.0-snapshot-1714615
2015-11-16 16:07:46 -05:00
Nicholas Knize 7f5da1d6a3 Fix reproducible GeoDistanceRangeQueryTests.testToQuery error
This issue occurs if the center latitude of the GeoPointDistance query is set to one of the poles. Since this issue is set to be fixed in LUCENE-6897 this commit temporarily limits the random latitudinal location to not include the poles.
2015-11-16 14:45:02 -06:00
Michael McCandless e4cc94c11e remove confusing private default constant 2015-11-16 15:17:16 -05:00
Michael McCandless c3f7638f81 add comment about confusing constant value 2015-11-16 14:55:11 -05:00