Commit Graph

5082 Commits

Author SHA1 Message Date
Jason Tedor 5f0cc79562 Sort plugins in list plugins command
This commit modifies the list plugins command to produce deterministic
output by sorting the plugins by comparing paths.

Relates #18260
2016-05-10 22:06:37 -04:00
Yannick Welsch a0ffe6ea89 [TEST] Ensure creation of valid routing table
An additional sanity check introduced by #17821 makes some tests fail. This check verifies that
only one shard with same shard id is allocated to a node. This commit fixes a bug in
ClusterStateCreationUtils which would construct a cluster state that allocated two shards with same
id to the same node.
2016-05-10 19:40:19 +02:00
Yannick Welsch 7753420540 Make ShardRouting and UnassignedInfo immutable (#17821)
This makes defensive copying of ShardRouting objects obsolete whenever we do a reroute and trashes less objects.
2016-05-10 19:11:04 +02:00
Jason Tedor 81c0b7bfa9 Log exception when join validation fails
Today when join validation fails, we log a warning but do not log the
exception that led to the join validation failing. This commit modifies
this so that we do log this exception.
2016-05-10 11:56:57 -04:00
Yannick Welsch ad5ce598db Use uppercase 'L' for long literal 2016-05-10 17:32:21 +02:00
Gabriel Moskovicz 0660386976 Add plugin information for Verbose mode
Relates #18051
2016-05-10 11:23:17 -04:00
Lee Hinman a45e1cc750 Add test for NullPointerException in SQS when analyzing text produces null query 2016-05-10 08:35:48 -06:00
Lee Hinman 1c54033e92 Merge branch 'pr/18068' 2016-05-10 08:27:43 -06:00
Colin Goodheart-Smithe 319ca82510 Improving parsing of sigma param for Extended Stats Bucket Aggregatio
Improving parsing of sigma param for Extended Stats Bucket Aggregation
2016-05-10 15:11:02 +01:00
Alexander Kazakov 93d1b385a4 Improving parsing of sigma param for Extended Stats Bucket Aggregation #17499 2016-05-10 14:54:54 +03:00
Daniel Mitterdorfer 8972f39a9c Reenable CircuitBreakerServiceIT#testParentChecking() 2016-05-10 12:24:49 +02:00
Colin Goodheart-Smithe 17225d9ac1 Removes the now obsolete SearchParseElement implementations
All implementations of SearchParseElement have been removed since they are no longer used now that parsing is done on the coordinating node. The SearchParseElement and FetchSubPhaseParseElement classes are not removed as currently they are needed for plugins that add a custom fetch sub phase. These will be removed in a follow up PR that will allow fetch sub phase plugins to register a parser in a different way.
2016-05-10 10:06:54 +01:00
Adrien Grand b6556e275a Remove code duplication in FieldsVisitor. #18218
It currently has twice the same method, once with a MapperService instance and
once with a DocumentMapper. This commits only keeps the former.
2016-05-10 08:17:59 +02:00
Adrien Grand f481492af3 Remove FieldMapper.Builder.indexName. #18219
The ability to configure index names that are different from the full name was
removed in 2.0.
2016-05-10 08:17:00 +02:00
Adrien Grand 68e7ac4166 Remove old backward compatibility layer for version lookups. #18215
The current code tries to handle the case that document versions are either
missing or stored in payloads rather than doc values. Since none of the 2.x
releases allowed this, we can remove this logic.
2016-05-10 08:16:05 +02:00
Adrien Grand 5d8f684319 Mapping cleanups. #18180
This removes dead/duplicate code and makes the `_index` field not configurable.
(Configuration used to jus be ignored, now we would throw an exception if any
is provided.)
2016-05-10 08:14:18 +02:00
Jason Tedor eed5b0be4f Increaes timeout on Netty handshake tests
This commit increases the timeout on the Netty handshake tests because
the previous value could cause timeout exceptions on slow machines.
2016-05-09 19:02:54 -04:00
Johnny Lim 0970c59608 Use Strings.toString() for toString() in SearchResponse and GetResponse (#18102) 2016-05-09 16:56:02 -04:00
Jim Ferenczi aef78ceb13 Do not return fieldstats information for fields that exist in the mapping
but not in the index.
2016-05-09 19:24:03 +02:00
Daniel Mitterdorfer 0f36c744d0 Merge remote-tracking branch 'danielmitterdorfer/eager-content-length' 2016-05-09 15:10:01 +02:00
Daniel Mitterdorfer 3a46812a33 Free bytes reserved on request breaker
With this commit we free all bytes reserved on the request
circuit breaker.

Closes #18144
2016-05-09 15:07:41 +02:00
Daniel Mitterdorfer 000dd62318 Determine content length eagerly in HttpServer
With this commit we eagerly evaluate content length in HttpServer
and also pass the same value to ResourceHandlingHttpChannel. With
this change it easier to reason about the content length that is
freed leaving no doubt that it must be identical to the reserved
amount.
2016-05-09 11:11:59 +02:00
Ryan Ernst c740feb3a7 Mappings: Fix ip mapper to correctly serialize a null null_value
We recently added correct serialization for null values, but the helper
method used does not allow null. This fixes serialization to handle the
null.
2016-05-06 17:07:24 -07:00
Tal Levy c1afcb543e add check for non-existent pipelines provided to simulate requests (#18190)
fixes #18139
2016-05-06 13:34:22 -07:00
Jason Tedor d0d2d2be8c Fix exception message in lifecycle
This commit fixes the exception messages for lifecycles when stopping in
illegal states.

Relates #18189
2016-05-06 16:14:43 -04:00
Ryan Ernst 2c3d3d91cb Remove unnecessary nebula source or javadoc plugins 2016-05-06 13:09:48 -07:00
Ryan Ernst 3d1be071c9 Merge branch 'master' into pom_gen 2016-05-06 12:56:51 -07:00
Chris Earle 5be79ed02c Add Failure Details to every NodesResponse
Most of the current implementations of BaseNodesResponse (plural Nodes) ignore FailedNodeExceptions.

- This adds a helper function to do the grouping to TransportNodesAction
- Requires a non-null array of FailedNodeExceptions within the BaseNodesResponse constructor
- Reads/writes the array to output
- Also adds StreamInput and StreamOutput methods for generically reading and writing arrays
2016-05-06 14:59:43 -04:00
Chris Earle 1d5b9f1ce6 Test was not updated with #18187 2016-05-06 13:17:43 -04:00
Tanguy Leroux 0ff5652fff Add node name to Cat Recovery
closes #8041
2016-05-06 16:59:53 +02:00
Britta Weber 901c25b7ff Merge pull request #18183 from brwe/exclude-all-but-text-from-wildcard-highlighting
Exclude all but string fields from highlighting if wildcards are used…
2016-05-06 16:57:25 +02:00
Britta Weber f270ed26c3 fix highlighing for old version indices with string fields 2016-05-06 16:27:31 +02:00
Jason Tedor d52537dc7b Add semicolon query string parameter delimiter
This commit adds support for the semicolon character as a valid query
string parameter delimiter.

Relates #18186
2016-05-06 09:54:26 -04:00
Jason Tedor e90d00ffce Remove handshake from transport client
This commit removes handshaking from the transport client. This
handshaking is not needed because of the existence of the liveness
check.

Relates #18174
2016-05-06 09:17:18 -04:00
Nik Everett b6698c3145 Random script fields can't overlap
This causes round tripping through xcontent to fail.

Closes #18166
2016-05-06 09:01:09 -04:00
Alexander Reelsen b12a42351e Pipeline Stats: Fix concurrent modification exception (#18177)
Due to trying to modify a map while iterating it, a concurrent modification
in the pipeline stats could be thrown. This uses an iterator to prevent this.

Closes #18126
2016-05-06 15:00:41 +02:00
Britta Weber 7b69e4ef43 keyword fields should also be highlighted 2016-05-06 14:29:19 +02:00
Britta Weber d3c5f865be Exclude all but string fields from highlighting if wildcards are used in fieldname
We should prevent highlighting if a field is anything but a text or keyword field.
However, someone might implement a custom field type that has text and still want to
highlight on that. We cannot know in advance if the highlighter will be able to
highlight such a field and so we do the following:
If the field is only highlighted because the field matches a wildcard we assume
it was a mistake and do not process it.
If the field was explicitly given we assume that whoever issued the query knew
what they were doing and try to highlight anyway.

closes #17537
2016-05-06 13:41:16 +02:00
Adrien Grand 93567a2f1b Remove StringBuilder reuse for uid creation. #18181
This would be better handled by escape analysis.
2016-05-06 13:16:58 +02:00
Adrien Grand e88ac11633 Add back Version.V_5_0_0. #18176
This was lost whene releasing alpha2 since the version constant got renamed.
2016-05-06 12:30:22 +02:00
Christoph Büscher 7d14728960 Add xContent shuffling to some more tests
This adds some random shuffling of xContent to some more test cases.

Relates to #5831
2016-05-06 10:46:39 +02:00
Adrien Grand b91df36a62 Fix and test handling of `null_value`. #18090
This was mostly untested and had some bugs.

Closes #18085
2016-05-06 09:28:23 +02:00
Adrien Grand de8354dd7f Allow binary sort values. #17959
The `ip` field uses a binary representation internally. This breaks when
rendering sort values in search responses since elasticsearch tries to write a
binary byte[] as an utf8 json string. This commit extends the `DocValueFormat`
API in order to give fields a chance to choose how to render values.

Closes #6077
2016-05-06 09:27:02 +02:00
Adrien Grand 7d8708716e QueryBuilder does not need generics. #18133
QueryBuilder has generics, but those are never used: all call sites use
`QueryBuilder<?>`. Only `AbstractQueryBuilder` needs generics so that the base
class can contain a default implementation for setters that returns `this`.
2016-05-06 08:38:20 +02:00
Ryan Ernst e16af604bf Build: Add pom generation to assemble task
In preparation for a unified release process, we need to be able to
generate the pom files independently of trying to actually publish. This
change adds back the maven-publish plugin just for that purpose. The
nexus plugin still exists for now, so that we do not break snapshots,
but that can be removed at a later time once snapshots are happenign
through the unified tools. Note I also changed the dir jars are written
into so that all our artifacts are under build/distributions.
2016-05-05 17:57:44 -07:00
Jason Tedor 1199cd8e2a Mark IHBT#testFromAndToXContent as awaits fix
This commit marks InnerHitsBuilderTests#testFromAndToXContent as
awaiting a fix.
2016-05-05 20:16:57 -04:00
Robert Muir e3ce6c9048 Painless: add fielddata accessors (.value/.values/.distance()/etc)
This gives better coverage and consistency with the scripting APIs, by
whitelisting the primary search scripting API classes and using them instead
of only Map and List methods.

For example, accessing fields can now be done with `.value` instead of `.0`
because `getValue()` is whitelisted. For now, access to a document's fields in
this way (loads) are fast-pathed in the code, to avoid dynamic overhead.

Access to geo fields and geo distance functions is now supported.

TODO: date support (e.g. whitelist ReadableDateTime methods as a start)
TODO: improve docs (like expressions and groovy have for document's fields)
TODO: remove fast-path hack

Closes #18169

Squashed commit of the following:

commit ec9f24b2424891a7429bb4c0a03f9868cba0a213
Author: Robert Muir <rmuir@apache.org>
Date:   Thu May 5 17:59:37 2016 -0400

    cutover to <Def> instead of <Object> here

commit 9edb1550438acd209733bc36f0d2e0aecf190ecb
Author: Robert Muir <rmuir@apache.org>
Date:   Thu May 5 17:03:02 2016 -0400

    add fast-path for docvalues field loads

commit f8e38c0932fccc0cfa217516130ad61522e59fe5
Author: Robert Muir <rmuir@apache.org>
Date:   Thu May 5 16:47:31 2016 -0400

    Painless: add fielddata accessors (.value/.values/.distance()/etc)
2016-05-05 18:38:41 -04:00
Ali Beyad c4090a1841 Remove the Snapshot class in favor of using SnapshotInfo
o/e/snapshots/Snapshot and o/e/snapshots/SnapshotInfo contain the same
fields and represent the same information.  Snapshot was used to
maintain snapshot information to the snapshot repository, while
SnapshotInfo was used to represent the snapshot information as presented
through the REST layer.  This removes the Snapshot class and combines
all uses into the SnapshotInfo class.

Closes #18167
2016-05-05 16:53:13 -04:00
Nik Everett 4b1c116461 Generate and run tests from the docs
Adds infrastructure so `gradle :docs:check` will extract tests from
snippets in the documentation and execute the tests. This is included
in `gradle check` so it should happen on CI and during a normal build.

By default each `// AUTOSENSE` snippet creates a unique REST test. These
tests are executed in a random order and the cluster is wiped between
each one. If multiple snippets chain together into a test you can annotate
all snippets after the first with `// TEST[continued]` to have the
generated tests for both snippets joined.

Snippets marked as `// TESTRESPONSE` are checked against the response
of the last action.

See docs/README.asciidoc for lots more.

Closes #12583. That issue is about catching bugs in the docs during build.
This catches *some* bugs in the docs during build which is a good start.
2016-05-05 13:58:03 -04:00
Jason Tedor e11b96ca9c Default to server VM and add client VM check
Today we softly warn about running with the client VM. However, we
should really refuse to start in production mode if running with the
client VM as the performance of the client VM is too devastating for a
server application. This commit adds an option to jvm.options to ensure
that we are starting with the server VM (on all 32-bit non-Windows
platforms on server-class machines (2+ CPUs, 2+ GB physical RAM) this is
the default and on all 64-bit platforms this is the only option) and
adds a bootstrap check for the client VM.

Relates #18155
2016-05-05 10:36:21 -04:00