Commit Graph

2395 Commits

Author SHA1 Message Date
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
Michael McCandless a0bf253d16 upgrade lucene 5.4 snapshot 2015-11-16 14:38:05 -05:00
Ryan Ernst baa3fd814e Mappings: Make _type use doc values
_type should have got doc values with the change to default doc values.
However, due to how metadata fields have separate builders and special
constructors, it was not picking it up. This change updates the field
type for _type to have doc values.

closes #14781
2015-11-16 11:32:52 -08:00
Simon Willnauer 1bdf29e263 Translog recovery can repeatedly fail if we run out of disk
If we run out of disk while recoverying the transaction log
we repeatedly fail since we expect the latest tranlog to be uncommitted.
This change adds 2 safety levels:

 * uncommitted checkpoints are first written to a temp file and then atomically
   renamed into a committed (recovered) checkpoint
 * if the latest uncommitted checkpoints generation is already recovered it has to be
   identical, if not the recovery fails

This allows to fail in between recovering the latest uncommitted checkpoint and moving
the checkpoint generation to N+1 which can for instance happen in a situation where
we can run out of disk. If we run out of disk while recovering the uncommitted checkpoint
either the temp file writing or the atomic rename will fail such that we never have a
half written or corrupted recovered checkpoint.

Close #14695
2015-11-16 18:47:19 +01:00
Christoph Büscher 0623684521 Geo: Moving static factory methods to ShapeBuilders
Currently the abstract ShapeBuilder class serves too many different
purposes, making it hard to refactor and maintain the code. In order
to reduce the size and responsibilities, this PR moved all the
static factory methods used as a shortcut to create new shape builders
out to a new ShapeBuilders class, similar to how QueryBuilders is
used already.
2015-11-16 18:01:23 +01:00
Tanguy Leroux d538f0dcf5 Add FilterPath implementation that uses Jackson 2.6 streaming filtering feature 2015-11-16 17:08:06 +01:00
Tanguy Leroux 8b961bc0e0 Remove unused AbstractXContentGenerator 2015-11-16 17:08:06 +01:00
Christoph Büscher a34b555fff Merge pull request #14775 from cbuescher/fix/14746
Add unique id to query names to avoid naming conflicts
2015-11-16 15:34:09 +01:00
Daniel Mitterdorfer 267f726a7f Merge remote-tracking branch 'danielmitterdorfer/feature/11657' 2015-11-16 15:15:41 +01:00
Daniel Mitterdorfer e31d66d137 Log cluster health status changes
With this commit the cluster health status changes are logged
on INFO level. The change is only logged on master and actively
triggered in AllocationService in order to minimize the impact of
constantly reevaluating ClusterState in a ClusterStateListener
although we know that no health-relevant change happened.

Closes #11657
2015-11-16 15:14:43 +01:00
Christoph Büscher 0a0bca6f5b Tests: Add unique id to query names to avoid naming conflicts
In AbstractQueryTestCase we randomly add the `_name` property to
some of the queries. While this generally works, there are exceptional
cases where we assign the same name to two queries in the setup which
leads to test failures later. This PR adds an increasing counter value
to the base tests that gets appended to all random query names to
avoid this name clashes.
2015-11-16 15:08:25 +01:00
Boaz Leskes fa55a940f7 Test: move SearchQueryIT back to core
There is no groovy dependency there (it's now in lang groovy)

Closes #14770
2015-11-16 14:43:36 +01:00
Simon Willnauer 044b3d59cd Take ingored unallocated shards into account when makeing allocation decision
ClusterRebalanceAllocationDecider did not take unassigned shards into account
that are temporarily marked as ingored. This can cause unexpected behavior
when gateway allocator is still fetching shards or has marked shareds as ignored
since their quorum is not met yet.

Closes #14670
Closes #14678
2015-11-16 14:25:02 +01:00
Yannick Welsch fb10e59578 Merge pull request #14765 from ywelsch/fix/delayed-allocation-race
Fix calculation of next delay for delayed shard allocation
2015-11-16 14:07:35 +01:00
Yannick Welsch 2206030fe6 Fix calculation of next delay for delayed shard allocation
Currently the next delay is calculated based on System.currentTimeMillis() but the actual shards to delay based on the last time the GatewayAllocator tried to assign/delay the shard.

This introduces an inconsistency for the case where shards should have been delay-allocated between the GatewayAllocator-based timestamp and System.currentTimeMillis().

Closes #14765
2015-11-16 14:06:34 +01:00
Martijn van Groningen 293b2f6345 field data: Don't cache top level field data for fields that don't exist.
Just return an empty field data instance, like we do currently the same for segment level field data.
2015-11-16 06:27:48 +01:00
Boaz Leskes eff82fdbcd Tests: update the disco node id seed on node restart
To make sure the new node's id is changed.

Closes #14675
2015-11-15 21:49:54 +01:00
Jason Tedor 89172dfb02 Remove unused import in RecoverySourceHandler 2015-11-15 10:14:08 -05:00
Jason Tedor 3acd7800cb Transport options should be immutable
This commit changes TransportRequestOptions and TransportResponseOptions
to be immutable. This is to address an issue where the empty options
were being mutated permanently altering their state. Making these
objects immutable is just good, clean coding.
2015-11-14 18:21:40 -05:00
Nicholas Knize 42470c252c Correcting maxRadius units in GeoDistanceRangeQueryTest 2015-11-13 11:18:43 -06:00
Nicholas Knize 9b3920b52c Removing pole restriction on GeoDistanceRangeQueryTests
This commit corrects the maxRadialDistance computation for points at the poles to half the distance of the meridian.
2015-11-13 09:32:31 -06:00
Colin Goodheart-Smithe 12bb1b79f6 Aggregations: Pass extended bounds into HistogramAggregator when creating an unmapped aggregator
This fixes an issue where if the field for the aggregation was unmapped the extended bounds would get dropped and the resulting buckets would not cover the extended bounds requested.

Closes #14735
2015-11-13 14:49:15 +00:00
Boaz Leskes e848dcfbca java docs fix 2015-11-13 15:05:38 +01:00
Boaz Leskes ac0da91bf7 Extend usage of IndexSetting class
I decided to leave external listeners (used by plugins) alone, for now.

Closes #14731
2015-11-13 14:30:23 +01:00
Yannick Welsch 9673ddc5d0 Throw MasterNotDiscoveredException whenever retry logic of TransportMasterNodeAction times out
Closes #14737
2015-11-13 14:24:00 +01:00
Colin Goodheart-Smithe be64bfb135 Revert "Aggregations: Pass extended bounds into HistogramAggregator when creating an unmapped aggregator"
This reverts commit e1bf9798bf.
2015-11-13 12:48:51 +00:00
Colin Goodheart-Smithe e1bf9798bf Aggregations: Pass extended bounds into HistogramAggregator when creating an unmapped aggregator
This fixes an issue where if the field for the aggregation was unmapped the extended bounds would get dropped and the resulting buckets would not cover the extended bounds requested.

Closes #14735
2015-11-13 12:33:06 +00:00
Jason Tedor a9ab35a487 Add sync_id to cat shards API
This commit adds the ability to get the sync_id from the cat shards API.

Closes #14705
2015-11-13 05:13:08 -05:00
Robert Muir 776bb288b5 fix gradle check under jigsaw
closes #14726

Squashed commit of the following:

commit 5b591e98570e3fa481b2816a44063b98bff36ddf
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Nov 13 00:54:08 2015 -0500

    add assumption for self-signing in PluginManagerTests

commit ed11e5371b6f71591dc41c6f60d033502cfcf029
Author: Robert Muir <rmuir@apache.org>
Date:   Fri Nov 13 00:20:59 2015 -0500

    show error output from integ test startup

commit d8b187a10e95d89a0e775333dcbe1aaa903fb376
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Nov 12 22:14:11 2015 -0500

    fix gradle check under jigsaw
2015-11-13 00:57:12 -05:00
Nicholas Knize dc77815744 Enable GeoPointV2 with backward compatibility testing
This commit removes all noreleases and cuts over to Lucene 5.4 GeoPointField type. Included are randomized testing updates to unit and integration test suites for ensuring full backward compatability with existing geo_point indexes.
2015-11-12 23:01:51 -06:00
Robert Muir 720ebe347d Handle system policy correctly.
Just suck in the system policy, so its compatible with any version of java.
It means it also respects configuration (e.g. for monitoring agents)

Closes #14704
2015-11-12 18:08:13 -05:00
xuzha f33184329f Add extra validation into `cluster/stats`
The cluster health and cluster stats disagree on the status.
Add a extra validation step in `cluster/stats`.

closes #7390
2015-11-12 10:46:18 -08:00
Yannick Welsch 4729386347 Merge pull request #14494 from ywelsch/fix/delayed-allocation-reroute
Delayed allocation can miss a reroute
2015-11-12 17:58:08 +01:00
Yannick Welsch c32de1f72b [TEST] Use TransportService/TransportAddress instead of DiscoveryNode for disruption rules
The disruption rules are changed to work on all transport addresses that are bound by a node (not only publish address).
This is important as UnicastZenPing creates fake DiscoveryNode instances which match one of the bound addresses and not necessarily the publish address.

Closes #14625
Closes #14653
2015-11-12 17:20:07 +01:00
Jason Tedor fac472f90c Remove unused imports in o.e.c.a.s.ShardStateActionTests 2015-11-12 09:08:27 -05:00
Yannick Welsch 0220e45e2f Fix missing reroute in case of multiple delayed shards
After a delayed reroute of a shard, RoutingService misses to schedule a new delayed reroute of other delayed shards.

Closes #14494
Closes #14010
Closes #14445
2015-11-12 10:57:40 +01:00
Jason Tedor c2aec53b46 Move field to local variable 2015-11-11 12:50:21 -05:00
Jason Tedor 3a92012938 Use String#equals instead of reference equality 2015-11-11 12:50:21 -05:00