Commit Graph

727 Commits

Author SHA1 Message Date
Lee Hinman 0cb3e21a3e [TEST] mark tests in IndicesCustomDataPathIT with AwaitsFix 2015-08-12 15:44:19 -06:00
Simon Willnauer 605253a39f Cut over master to 2.0.0-SNAPSHOT 2015-08-12 21:16:08 +02:00
Lee Hinman 79d1568b58 Remove the `node.enable_custom_paths` setting
This setting is useless now that we have the `path.shared_data` setting.

Resolves #12776
2015-08-12 12:23:05 -06:00
Lee Hinman ff5ad39c7a Add `path.shared_data`
This allows `path.shared_data` to be added to the security manager while
still allowing a custom `data_path` for indices using shadow replicas.

For example, configuring `path.shared_data: /tmp/foo`, then created an
index with:

```
POST /myindex
{
  "index": {
    "number_of_shards": 1,
    "number_of_replicas": 1,
    "data_path": "/tmp/foo/bar/baz",
    "shadow_replicas": true
  }
}
```

The index will then reside in `/tmp/foo/bar/baz`.

`path.shared_data` defaults to `null` if not specified.

Resolves #12714
Relates to #11065
2015-08-12 10:51:46 -06:00
Simon Willnauer fe3179d9cc Return `408 REQUEST_TIMEOUT` if `_cluster/health` times out
Today we return `200 OK` which is misleading since we really didn't
produce a valid response / didn't wait long enough.
2015-08-12 17:51:20 +02:00
Martijn van Groningen 777921dfb0 test: simplified percolator recovery tests 2015-08-12 16:51:27 +02:00
Simon Willnauer ed9eef92dd [TEST] Fix off-by-one bug in corruptFile util function
The upper bound must be 0-based since we are corrupting an offset into
the file but it can be a 1-based length of the file which results in an
uncorrupted file.
2015-08-12 16:43:31 +02:00
Nik Everett e4e60774c1 Merge pull request #12787 from nik9000/configured_plugin
QA: Add configuration to the jvm-example plugin
2015-08-12 07:36:34 -07:00
Tanguy Leroux 03c327ff12 Expose ClassloadingMXBean in Node Stats
Closes #12738
2015-08-12 14:29:13 +02:00
Konrad Beiske 44c667dac6 Merge pull request #12828 from s1monw/allow_master_elect_extension
Expose zen ElectMasterService as a Discovery extension point
2015-08-12 13:40:13 +02:00
Simon Willnauer fcb0427ed1 Expose zen ElectMasterService as a Discovery extension point
Some users need to override ElectMasterService from zen to add functionality
inside their infrastructure. This commit allows to extend it.
2015-08-12 13:00:51 +02:00
Colin Goodheart-Smithe 73c5c8fe79 Search: Split SearchModule.configure() into separate methods
This change splits SearchModule.configure() contents into separate methods so that sub-class of it (e.g. tests) can use only the parts they require
2015-08-12 12:00:14 +01:00
Adrien Grand 88da485015 Tests: Allow REST tests to run over https.
This adds new settings to the REST client, so that tests can be run over SSL
and optionally use an alternate truststore.
2015-08-12 11:46:57 +02:00
Simon Willnauer 6316718ae0 Flatten SearchService and clean up build-in registration
Relates to #12783
2015-08-12 09:01:09 +02:00
Jason Tedor 3b2f28fbe1 Reflect renaming of base test class 2015-08-11 23:58:03 -07:00
Jason Tedor d56dc7899d Merge pull request #12561 from jasontedor/feature/12560
Disallow type names to start with dots for new indices except for .percolator
2015-08-11 23:40:11 -07:00
Jason Tedor f9da6036a2 Disallow type names to start with dots for new indices except for .percolator
This commit will disallow type names to start with dots for version 2 and later indices except for .percolator.

Closes #12560
2015-08-11 23:34:41 -07:00
Ryan Ernst 1c5b49403b Fix type checking to work with java 7 2015-08-11 23:11:54 -07:00
Ryan Ernst 41af2ca75f Make module testcase abstract to appease test naming convetion checks 2015-08-11 22:17:38 -07:00
Ryan Ernst a4a43ea9ae Fix missing license headers 2015-08-11 22:03:47 -07:00
Ryan Ernst 50ba3bcdd6 Internal: Flatten Allocation modules and add back ability to plugin ShardsAllocators
There were two submodules of AllocationModule. This combines them into a
single module, adds a base test case for module testing, and adds back
the ability for plugins to provide custom ShardsAllocators.

closes #12781
2015-08-11 20:49:07 -07:00
Nik Everett 79d9f5b775 Logging: Log less source in slowlog
Instead of logging the entire `_source` in the indexing slowlog we log by
default just the first 1000 characters - this is controlled by the
`index.indexing.slowlog.source` settings and can be set to `true` to log the
whole `_source`, `false` to log none of it, and a number to log at most that
many characters.

Closes #4485
2015-08-11 13:16:04 -07:00
Ryan Ernst 57549a8133 Mappings: Validate parsed document does not have trailing garbage that is invalid json
This remerges PR #11414. The added validation for trailing garbage is
now only done when the parse method created the parser.
2015-08-11 10:42:18 -07:00
Ryan Ernst 80cca9e7ad Merge pull request #12779 from rjernst/fix/12753
Fix field type compatiblity check to work when only one previous type exists
2015-08-11 10:24:47 -07:00
Adrien Grand 99f4f09b84 Merge pull request #12756 from keety/terms_query_disable_coord
Add support for `disable_coord` param to `terms` query
2015-08-11 16:13:58 +02:00
Simon Willnauer 9c6ed8c238 Merge pull request #12260 from s1monw/issues/12239
Include stacktrace in rendered exceptions
2015-08-11 12:55:33 +02:00
javanna db7219901d simple query string: remove (not working) support for alternate formats
Removed attempt of parsing of `field` rather than `fields` and attempted support of the following syntax:

```
{
  "simple_query_string": {
    "body" : {
      "query": "foo bar"
    }
  }
}
```

Both these two syntaxes were undocumented, untested and not working.

Added test for case when `fields` is not specified, then the default field is queried.

Closes #12794
Closes #12798
2015-08-11 12:54:26 +02:00
Simon Willnauer ca20282e84 Include stacktrace in rendered exceptions
This commit includes the stacktrace into the structured exception rendering
to ensure we can find the reason / cause for certain things quicker. This
is enabled by default and is very verbose. Users can disable it via `rest.exception.stacktrace.skip = true|false`

Closes #12239
2015-08-11 11:55:59 +02:00
Simon Willnauer f9487f7451 Apply additional plugin settings only if settings are not explicit
We have a way to allow a plugin to specify additional settings. These
settings should only be applied if they are not already existing in the
node settings.
2015-08-11 10:06:55 +02:00
Ryan Ernst f4827e55e3 Test: More attempts at forcing netty test to always use netty 2015-08-11 00:43:29 -07:00
Ryan Ernst b81f5f6142 Revert "Merge pull request #11414 from rjernst/fix/2315"
This reverts commit 937732b17d, reversing
changes made to 6fea6c542c.
2015-08-10 23:13:19 -07:00
Ryan Ernst 8a587ead89 Mappings: Validate parsed document does not have trailing garbage that is invalid json
See #2315
2015-08-10 21:57:14 -07:00
Ryan Ernst 6fea6c542c Test: Fix netty integ test to ensure local mode is not used.
closes #12788
2015-08-10 20:57:55 -07:00
Igor Motov 3354a816fc Changes in unassigned info and version might not be transferred as part of cluster state diffs
The equalTo logic of ShardRouting doesn't take version and unassignedInfo into the account when compares shard routings.  Since cluster state diff relies on equal to detect the changes that needs to be sent to other cluster, this omission might lead to changes not being properly propagated to other nodes in the cluster.

Closes #12387
2015-08-10 19:58:36 -04:00
Ryan Ernst 1b3cd504a5 test: quiet netty integ test 2015-08-10 16:57:02 -07:00
Nik Everett dfb6d4d08f QA: Create a test plugin with configuration
In order to test the way plugins with configuration are installed and removed
we need a plugin with configuration in the repository. The simplest way to
get one is to make an "example" plugin.

In the process of making this example it became aparent that cat actions were
difficult to create outside of the org.elasticsearch.rest.action.cat package
because key methods in AbstractCatAction were package private. This makes them
protected and uses them to create the example configured plugin.

Relates to #12717 but is only one step of many to close it.
2015-08-10 14:51:49 -07:00
Ryan Ernst 40f119d85a This method on settings loaded a class, based on a setting value, using
the default classloader. It had all kinds of leniency in how the
classname was found, and simply cannot work with plugins having isolated
classloaders.

This change removes that method. Some of the uses of it were for custom
extension points, like custom repository or discovery types. A lot were
just there to plugin mock implementations for tests. For the settings
that were legitimate, all now support plugins adding the given setting
via onModule. For those that were specific to tests for mocks, they now
use Classes.loadClass (a helper around Class.forName). This is a
temporary measure until (in a future PR) tests can change the
implementation via package private statics.

I also removed a number of unnecessary intermediate modules, added a
"jvm-example" plugin that can be filled in in the future as a smoke test
for breaking plugins, and gave some documentation to "spawn" modules
interface.

closes #12643
closes #12656
2015-08-10 14:04:45 -07:00
Ryan Ernst b47f5976a5 Mappings: Fix field type compatiblity check to work when only one previous type exists.
This was a straight up bug found in #12753. If only one type existed,
the compatibility check for a new type was not strict, so changes to
an updateable setting like search_analyzer got through (but only
partially). This change fixes the check and adds tests (which were
previously a TODO).

This also fixes a bug in dynamic field creation which woudln't copy
fielddata settings when duplicating a pre-existing field with the
same name.

closes #12753
2015-08-10 12:41:36 -07:00
Christoph Büscher a269b96799 Merge pull request #12581 from cbuescher/fix/12531
Fix setting timezone on default DateTime formatter
2015-08-10 15:05:39 +02:00
Christoph Büscher cdb39cf5dc Aggregations: Fix setting timezone on default DateTime formatter
This PR prevents setting timezone on ValueFormatter.DateTime. Instead
the timezone information needed when printing buckets key-as-string
information is provided at constrution time of the ValueFormatter, making
sure we don't overwrite any constants. This, however, made it necessary to
be able to access the timezone information when resolving the format
in ValueSourseParser, so the `time_zone` parameter is now parsed alongside
the `format` parameter in ValueSourceParser rather than in DateHistogramParser.

Closes #12531
2015-08-10 15:04:46 +02:00
Simon Willnauer 9a7257c55a Remove lenient store type parsing
Today we accept store types like `nio_fs`, `nioFs`, `niofs` etc.
this commit removes the leniency and only accepts plain values without underscore.
Yet, this commit also has a BWC layer that upgrades existing indices to the new version.
Affected enums are:
 * `nio_fs`
 * `mmap_fs`
 * `simple_fs`
2015-08-10 13:39:08 +02:00
Alexander Reelsen e24b57e613 PluginManager: Do not try other URs if specific URL was configured
If an URL specified with --url on the command line cannot be reached,
the plugin manager tries URLs at download.elastic.co automatically.

This can lead to download wrong plugins and also exposes potentially
the name of an internal plugin to the download service.

This fix ensures, that the plugin manager simply aborts, if the specified
URL cannot be downloaded.
2015-08-10 13:09:02 +02:00
keety 9a385de077 fix to support disable_coord param in terms query 2015-08-09 18:50:34 -04:00
Clinton Gormley 205262c737 Enable the license checker over distribution/* and plugins/*
Moved the license checker config into the parent pom, and overrede
the license dir/target-to-check in distributions/pom.

Disabled the license checker explicitly for projects which run integration
tests but have no licenses dir:

* core
* distribution
* qa
* plugins/delete-by-query
* plugins/mapper-size
* plugins/site-example

Closes #12752
Closes #12754
2015-08-09 18:18:59 +02:00
Robert Muir 368c41666c WE CANT EVEN GET BIN/ELASTICSEARCH WORKING!!!! 2015-08-09 08:09:44 -04:00
Jason Tedor f8415ae7ca Avoid use of forbidden method in test 2015-08-07 19:09:52 -04:00
Jason Tedor 23b348040e Add script compilation stats
This commit adds basic support to track the number of times scripts are
compiled and compiled scripts are evicted from the script cache. These
statistics are tracked at the node level.

Closes #12673
2015-08-07 18:25:55 -04:00
javanna 56c0b46f96 [TEST] remove duplicated tests from SearchQueryIT
After merging filters and queries, tests against indices filter and indices query became exactly the same. we can remove one copy then.
2015-08-07 16:04:51 +02:00
Simon Willnauer d0b2566345 Make RoutingNodes read-only by default
ClusterState has 3 different methods to access RoutingNodes:
 * #routingNodes() - mutable version
 * #getRoutingNodes() - delegates to #getReadOnlyRoutingNodes()
 * #getReadOnlyRoutingNodes() - it's docs say `NOTE, the routing nodes are mutable, use them just for read operations`

The latter also reuses the instance that it creates. This has several problems beside the obvious:
 * creating RoutingNodes is costly and should be done only if really needed ie. use cached version as much as possible
 * the common case is ReadOnly but all kinds of things are called
 * mutable version are only needed in one place and should only be used in the AllocationService
 * RoutingNodes can freeze it's ShardRoutings but doesn't
 * RoutingNodes should check if it's read-only or not

This commit fixed all the problems and special cases the mutable case such that all accesses via ClusterState#getRoutingNodes()
is read-only and RoutingNodes enforces this.
2015-08-07 09:48:42 +02:00
Adrien Grand 137bfaaeff Merge pull request #12707 from jpountz/enhancement/filters_function_score_needs_score
Only compute scores when necessary with FiltersFunctionScoreQuery.
2015-08-07 08:53:19 +02:00