Commit Graph

4694 Commits

Author SHA1 Message Date
Isabel Drost-Fromm 453ffebb96 Merge pull request #13825 from MaineC/bug-fix/10021-logging-only
Add stack traces to logged exceptions where missing
2016-03-30 12:31:45 +02:00
Isabel Drost-Fromm d33197c4a2 Add stack traces to logged exceptions where missing
Relates to #10021
2016-03-30 12:30:29 +02:00
Britta Weber eed885eeab [TEST] use random ascii instead of random unicode
Otherwise fields might not have values after analysis and the docCount
and hence the score will be unpredictable.
2016-03-30 11:45:47 +02:00
Isabel Drost-Fromm f27399dc0e Merge pull request #17282 from MaineC/deprecation/sort-option-reverse-removal
Remove deprecated reverse option from sorting
2016-03-30 11:02:19 +02:00
Simon Willnauer 3e67b808a0 Add created flag to IndexingOperationListener#postIndex
This adds a `created` flag to `IndexingOperationListener#postIndex` to
easily differentiate between updates and creates on the listener level.

Closes #17333
Merges #17340
2016-03-30 10:52:59 +02:00
Simon Willnauer 76fd1b4777 Fix test bug 2016-03-30 10:52:38 +02:00
Simon Willnauer 1110e5bdb6 Merge branch 'master' into pr-17340 2016-03-30 10:49:16 +02:00
Alexander Reelsen 48951aeb86 PluginManager: Rename xpack plugin to x-pack 2016-03-30 09:50:01 +02:00
Boaz Leskes 977c93be3c make GsubProcessorFactoryTests.testCreateInvalidPattern windows friendly. 2016-03-30 08:45:28 +02:00
Camilo Diaz Repka 7be11a36cd Refactor: replace all ocurrences of ESTestCase.getRandom() for random().
Remove getRandom().
2016-03-29 23:18:05 -04:00
Jason Tedor aa583c4064 Fix spelling of linear interpolation scorer class
This commit fixes the spelling of LinearInterpoatingScorer to
LinearInterpolatingScorer. Note that there was a missing ell.

Closes #17384
2016-03-29 20:18:29 -04:00
Jason Tedor c63415d091 Cleanup format in LinearInterpoatingScorer.java
This commit fixes a few style issues in LinearInterpoatingScorer.java.
2016-03-29 20:17:55 -04:00
Nik Everett df08854c60 Remove PROTOTYPEs from suggesters
Also stops using guice for suggesters at all and lots of checkstyle.
2016-03-29 17:55:01 -04:00
javanna 19eeb68bc4 Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-29 21:53:22 +02:00
Igor Motov 4f5f3fe895 Increase the total number of allowed fields in UpdateMappingIntegrationIT#testDynamicUpdates
With restriction for the total number of fields introduced in #17357 this test can fail if a large number of records is randomly selected for indexing.
2016-03-29 15:25:21 -04:00
javanna 061f09d9a4 Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-29 20:19:33 +02:00
Yanjun Huang 361adcf387 Add limit to total number of fields in mapping. #17357
This is to prevent mapping explosion when dynamic keys such as UUID are used as field names. index.mapping.total_fields.limit specifies the total number of fields an index can have. An exception will be thrown when the limit is reached. The default limit is 1000. Value 0 means no limit. This setting is runtime adjustable

Closes #11443
2016-03-29 19:39:46 +02:00
javanna 0c70a9d5bd fix bug introduced with refactoring of DiscoveryNode constructors
Transport client was replacing the address of the nodes connecting to with the ones received from the liveness api rather keeping the original listed nodes. Written a test for that.
2016-03-29 18:36:09 +02:00
Jason Tedor 27448dc3d0 Adjust for long random timeout in acked indexing 2016-03-29 12:11:09 -04:00
Jason Tedor 649bcdc4eb Enable acked indexing test 2016-03-29 11:43:15 -04:00
Jason Tedor c4324f9964 Merge branch 'master' into enable_acked
* master: (25 commits)
  Replication operation that try to perform the primary phase on a replica should be retried
  split long line in ConvertProcessorTests
  add  type conversion support to ConvertProcessor
  percolator: Make explain use the two phase iterator
  test: make sure we don't flush during indexing the percolator queries
  Added experimental annotation to the update-by-query and reindex docs
  Fixed bad YAML in reindex REST test: 50_routing.yaml
  Update-by-query rest tests: fixed bad yaml and deleted a client-dependent test
  Prevents exception being raised when ordering by an aggregation which wasn't collected
  The reindex body is now required, which changes the exception thrown by the REST test
  Docs: Included Nodes Task API and tidied reindex/update-by-query
  Rename update-by-query REST tests to update_by_query
  REST: The body is required in the reindex API
  The source parameter should not be defined in the delete-by-query REST spec
  Renamed update-by-query REST spec to update_by_query
  Fix test bug in TypeQueryBuilderTests.
  Add comment why it is safe to check the number of nested fields in MapperService.merge.
  Automatically add a sub keyword field to string dynamic mappings. #17188
  Type filters should not have a performance impact when there is a single type. #17350
  Add API to explain why a shard is or isn't assigned
  ...
2016-03-29 11:42:34 -04:00
Boaz Leskes 48b4f086e0 Replication operation that try to perform the primary phase on a replica should be retried
In extreme cases a local primary shard can be replaced with a replica while a replication request is in flight and the primary action is applied to the shard (via `acquirePrimaryOperationLock()).  #17044 changed the exception used in that method to something that isn't recognized as `TransportActions.isShardNotAvailableException`, causing the operation to fail immediately instead of retrying. This commit fixes this by check the primary flag before
acquiring the lock. This is safe to do as an IndexShard will never be demoted once a primary.

Closes #17358
2016-03-29 17:21:14 +02:00
Jason Tedor 0e5b22a648 Remove pending locks assertions from TRA 2016-03-29 11:20:04 -04:00
Jason Tedor 85d3d51a74 Clarify message on out-of-order state publish 2016-03-29 11:20:03 -04:00
Tal Levy 833fc8420f split long line in ConvertProcessorTests 2016-03-29 08:19:15 -07:00
Tal Levy 16e888fac3 Merge pull request #17260 from talevy/fix-regex-exceptions
Handle regex parsing errors in Gsub and Grok Processors
2016-03-29 08:12:26 -07:00
Tal Levy 9ac3887139 Merge pull request #17263 from talevy/auto-convert
add  type conversion support to ConvertProcessor
2016-03-29 07:57:57 -07:00
Tal Levy 2064fe3985 add type conversion support to ConvertProcessor 2016-03-29 07:56:53 -07:00
Martijn van Groningen 9d37f459b5 percolator: Make explain use the two phase iterator
So that we don't eveluate percolator queries that don't match.

Closes #17314
2016-03-29 16:26:31 +02:00
Martijn van Groningen 60793a848e test: make sure we don't flush during indexing the percolator queries 2016-03-29 16:24:49 +02:00
Isabel Drost-Fromm 778a447ef0 Do not fail if providing coordinates for same field name 2016-03-29 14:38:48 +02:00
Colin Goodheart-Smithe ff3fd99074 Prevents exception being raised when ordering by an aggregation which wasn't collected
If a terms aggregation was ordered by a metric nested in a single bucket aggregator which did not collect any documents (e.g. a filters aggregation which did not match in that term bucket) an ArrayOutOfBoundsException would be thrown when the ordering code tried to retrieve the value for the metric. This fix fixes all numeric metric aggregators so they return their default value when a bucket ordinal is requested which was not collected.

Closes #17225
2016-03-29 13:28:03 +01:00
javanna 8fc9dbbb99 Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-29 14:27:04 +02:00
javanna f9a5e1a03a wrap EnumSet into unmodifiableSet directly, plus minor changes 2016-03-29 14:26:09 +02:00
Isabel Drost-Fromm 46e4ea9d16 Refine dealing with removed reverse sort option.
For geo distance sort parsing: Disallow anything but
VALUE_STRING as geo hash, disallow resetting field
name for geo fields.

Also make error message for wrong lat/lon values more
verbose by including the affected field name.
2016-03-29 13:16:33 +02:00
javanna 36f446759f fix silly serialization mistake in DiscoveryNode 2016-03-29 12:44:31 +02:00
javanna f7becf1f53 Move Set<Role> to EnumSet<Role> in DiscoveryNode 2016-03-29 12:33:14 +02:00
Adrien Grand cb31e591f1 Fix test bug in TypeQueryBuilderTests. 2016-03-29 11:43:27 +02:00
javanna 5794455912 Use regular Map for attributes in DiscoveryNode, get rid of attributes getter in favour of regular getter 2016-03-29 11:42:44 +02:00
Isabel Drost-Fromm 5a913fcc69 Fix build errors after last merge. 2016-03-29 11:26:41 +02:00
javanna 30ac3dcf01 use ordinary incrementing loops in ClusterStatsNodes 2016-03-29 11:05:58 +02:00
Isabel Drost-Fromm 407e2cdcf9 Merge branch 'master' into deprecation/sort-option-reverse-removal
Conflicts:
	core/src/main/java/org/elasticsearch/search/sort/ScoreSortBuilder.java
	core/src/test/java/org/elasticsearch/search/sort/FieldSortBuilderTests.java
2016-03-29 11:04:02 +02:00
javanna 66a8e4efeb less streams more loops 2016-03-29 11:01:49 +02:00
javanna 8034e13365 adapt cluster allocation explain to DiscoveryNode changes 2016-03-29 10:53:42 +02:00
javanna de5cbda8e7 Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-29 10:48:47 +02:00
Adrien Grand c7bdfb1126 Add comment why it is safe to check the number of nested fields in MapperService.merge. 2016-03-29 10:02:29 +02:00
Adrien Grand 0eedc784fe Automatically add a sub keyword field to string dynamic mappings. #17188
If you add a string field to a document, it will have the following default
mapping:

```
{
  "type": "text",
  "fields": {
    "keyword": {
      "type": "keyword",
      "ignore_above": 256
    }
  }
}
```
2016-03-29 09:49:16 +02:00
Adrien Grand 4bd27bc2a0 Type filters should not have a performance impact when there is a single type. #17350
Today, if you call /index/type/_search instead of /index/_search, elasticsearch
will automatically insert a type filter to only match documents of the given
type. This commit uses a new TypeQuery instead of a TermQuery for this filter,
which rewrites to a MatchAllDocsQuery when all documents of a shard match the
filtered type. This is helpful because BooleanQuery has a special rewrite rule
to remove MatchAllDocsQuery as FILTER clauses. So for instance if your query is
`+body:"quick fox" #_type:my_type`, it will be rewritten to
`+body:"quick fox" #*:*` which is then rewritten to `body:"quick fox"`.
2016-03-29 08:52:49 +02:00
Lee Hinman c63cb21745 Merge remote-tracking branch 'dakrone/allocation-explain' 2016-03-28 16:06:49 -06:00
Lee Hinman 80ab366de4 Add API to explain why a shard is or isn't assigned
This adds a new `/_cluster/allocation/explain` API that explains why a
shard can or cannot be allocated to nodes in the cluster. Additionally,
it will show where the master *desires* to put the shard, according to
the `ShardsAllocator`.

It looks like this:

```
GET /_cluster/allocation/explain?pretty
{
  "index": "only-foo",
  "shard": 0,
  "primary": false
}
```

Though, you can optionally send an empty body, which means "explain the
allocation for the first unassigned shard you find".

The output when a shard is unassigned looks like this:

```
{
  "shard" : {
    "index" : "only-foo",
    "index_uuid" : "KnW0-zELRs6PK84l0r38ZA",
    "id" : 0,
    "primary" : false
  },
  "assigned" : false,
  "unassigned_info" : {
    "reason" : "INDEX_CREATED",
    "at" : "2016-03-22T20:04:23.620Z"
  },
  "nodes" : {
    "V-Spi0AyRZ6ZvKbaI3691w" : {
      "node_name" : "Susan Storm",
      "node_attributes" : {
        "bar" : "baz"
      },
      "final_decision" : "NO",
      "weight" : 0.06666675,
      "decisions" : [ {
        "decider" : "filter",
        "decision" : "NO",
        "explanation" : "node does not match index include filters [foo:\"bar\"]"
      } ]
    },
    "Qc6VL8c5RWaw1qXZ0Rg57g" : {
      "node_name" : "Slipstream",
      "node_attributes" : {
        "bar" : "baz",
        "foo" : "bar"
      },
      "final_decision" : "NO",
      "weight" : -1.3833332,
      "decisions" : [ {
        "decider" : "same_shard",
        "decision" : "NO",
        "explanation" : "the shard cannot be allocated on the same node id [Qc6VL8c5RWaw1qXZ0Rg57g] on which it already exists"
      } ]
    },
    "PzdyMZGXQdGhqTJHF_hGgA" : {
      "node_name" : "The Symbiote",
      "node_attributes" : { },
      "final_decision" : "NO",
      "weight" : 2.3166666,
      "decisions" : [ {
        "decider" : "filter",
        "decision" : "NO",
        "explanation" : "node does not match index include filters [foo:\"bar\"]"
      } ]
    }
  }
}
```

And when the shard *is* assigned, the output looks like:

```
{
  "shard" : {
    "index" : "only-foo",
    "index_uuid" : "KnW0-zELRs6PK84l0r38ZA",
    "id" : 0,
    "primary" : true
  },
  "assigned" : true,
  "assigned_node_id" : "Qc6VL8c5RWaw1qXZ0Rg57g",
  "nodes" : {
    "V-Spi0AyRZ6ZvKbaI3691w" : {
      "node_name" : "Susan Storm",
      "node_attributes" : {
        "bar" : "baz"
      },
      "final_decision" : "NO",
      "weight" : 1.4499999,
      "decisions" : [ {
        "decider" : "filter",
        "decision" : "NO",
        "explanation" : "node does not match index include filters [foo:\"bar\"]"
      } ]
    },
    "Qc6VL8c5RWaw1qXZ0Rg57g" : {
      "node_name" : "Slipstream",
      "node_attributes" : {
        "bar" : "baz",
        "foo" : "bar"
      },
      "final_decision" : "CURRENTLY_ASSIGNED",
      "weight" : 0.0,
      "decisions" : [ {
        "decider" : "same_shard",
        "decision" : "NO",
        "explanation" : "the shard cannot be allocated on the same node id [Qc6VL8c5RWaw1qXZ0Rg57g] on which it already exists"
      } ]
    },
    "PzdyMZGXQdGhqTJHF_hGgA" : {
      "node_name" : "The Symbiote",
      "node_attributes" : { },
      "final_decision" : "NO",
      "weight" : 3.6999998,
      "decisions" : [ {
        "decider" : "filter",
        "decision" : "NO",
        "explanation" : "node does not match index include filters [foo:\"bar\"]"
      } ]
    }
  }
}
```

Only "NO" decisions are returned by default, but all decisions can be
shown by specifying the `?include_yes_decisions=true` parameter in the
request.

Resolves #14593
2016-03-28 15:21:02 -06:00
Igor Motov 8a5c19b25f Handle RejectedExecution gracefully in TransportService during shutdown
Today we might run into a rejected execution exception when we shutdown the node while handling a transport exception. The exception is run in a seperate thread but that thread might not be able to execute due to the shutdown. Today we barf and fill the logs with large exception. This commit catches this exception and logs it as debug logging instead.

Extends changes made in 8652cd8
2016-03-28 15:12:50 -04:00
Areek Zillur 976b8d2cee Remove dead code
This commit removes dead DeleteByQuery class from core.
2016-03-28 14:48:40 -04:00
Jason Tedor 4de57fc5aa Simplify test out of order commit messages 2016-03-28 13:48:28 -04:00
Jason Tedor 5576526c91 For now do not guard against already failed engine 2016-03-28 13:44:41 -04:00
Jason Tedor 2a9388912b Add clarifying comment on disrupted in-flight ops 2016-03-28 13:34:18 -04:00
Jason Tedor 4e1f62eae9 Clarify exceptions when failing to fail a replica 2016-03-28 13:19:12 -04:00
Jason Tedor 97be38353a Fix formatting in DWSDIT#TCJDOPI 2016-03-28 12:49:56 -04:00
Jason Tedor 37d739a3cd Simplify doc creation check in acked indexing test
This commit simplifies the doc creation check while indexing in the
acked indexing test.
2016-03-28 12:46:54 -04:00
Jason Tedor 14ba0c31b4 Use longer timeout on nightly tests, but rarely
This commit increases the timeout while indexing during the acked
indexing test when running nightly tests, but only rarely.
2016-03-28 12:44:09 -04:00
Jason Tedor 4793630eb8 Merge branch 'master' into enable_acked
* master: (419 commits)
  Remove PROTOTYPE from ShapeBuilders
  Take filterNodeIds into consideration while sending tasks actions requests to nodes
  test: cleanup imports and method rename
  Remove PROTOTYPE from SortBuilders
  percolator: Add query extract support for the blended term query and the common terms query.
  Don't iterate over shard routing if it's null
  [TEST] Reduce size of random shapes
  Add some debug logging to testPrimaryRelocationWhileIndexing
  Order methods in IndicesClusterStateService according to execution
  Tidied up percolator doc annotations
  In cat.snapshots, repository is required
  Do not retrieve all indices stats when checking for cache resets
  Enforce `discovery.zen.minimum_master_nodes` is set when bound to a public ip #17288
  Port Primary Terms to master #17044
  Revert "Add debug logging for Vagrant upgrade test"
  Ownership for data, logs, and configs for packages
  add on_failure exception metadata to ingest document for verbose simulate
  Revert "Merge pull request #16843 from xuzha/s3-encryption"
  Update Format, add new settings into the setting test
  Update and rebase the init implementation.
  ...
2016-03-28 12:29:53 -04:00
Nik Everett 9402251eaf Remove PROTOTYPE from ShapeBuilders
Also cuts lots of tests over to expectThrows and fixes DistanceUnit's
serialization.
2016-03-26 13:58:33 -04:00
Igor Motov ee49081bc7 Take filterNodeIds into consideration while sending tasks actions requests to nodes
This commit fixes a bug that was causing the result of TransportTasksAction#filterNodeIds to be ignored and as a result the tasks actions were executed on all nodes.
2016-03-26 13:15:39 -04:00
Martijn van Groningen 444641ac55 test: cleanup imports and method rename 2016-03-26 15:13:56 +01:00
Nik Everett 8a89482555 Remove PROTOTYPE from SortBuilders 2016-03-25 22:08:50 -04:00
Martijn van Groningen 6cb82965bf percolator: Add query extract support for the blended term query and the common terms query. 2016-03-25 23:22:44 +01:00
Simon Willnauer 3b753ea4c9 Don't iterate over shard routing if it's null 2016-03-25 23:05:55 +01:00
javanna e6c6632e6f add explicit check for Role enum ordinal when reading from StreamInput 2016-03-25 22:58:37 +01:00
javanna 1852b6627f fix failing ZenDiscoveryIT 2016-03-25 21:48:48 +01:00
javanna 947e9ed2c7 fix checkstyle problems 2016-03-25 21:37:40 +01:00
javanna f9e6163365 fix line length problems 2016-03-25 20:29:24 +01:00
javanna a6211c72eb removed needless statis import changes to simplify review 2016-03-25 20:28:23 +01:00
javanna a9f4982c40 Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-25 20:16:40 +01:00
javanna 93ce36a198 separated attributes from node roles in DiscoveryNode
Node roles are now serialized as well, they are not part of the node attributes anymore. DiscoveryNodeService takes care of dividing settings into attributes and roles. DiscoveryNode always requires to pass in attributes and roles separately.
2016-03-25 20:14:27 +01:00
Nicholas Knize 43d0d3e11f [TEST] Reduce size of random shapes
This commit reduces the size of the random generated shapes for eliminating stalled `geo_shape` testing.

closes #17245
2016-03-25 13:41:20 -05:00
Boaz Leskes 6c15e782af Add some debug logging to testPrimaryRelocationWhileIndexing 2016-03-25 17:25:52 +01:00
Boaz Leskes 749a851f93 Order methods in IndicesClusterStateService according to execution 2016-03-25 17:09:50 +01:00
Boaz Leskes b8227a7222 Enforce `discovery.zen.minimum_master_nodes` is set when bound to a public ip #17288
discovery.zen.minimum_master_nodes is the single most important setting to set on a production cluster. We have no way of supplying a good default so it must be set by the user. Binding a node to a public IP (as opposed to the default local host) is a good enough indication that a node will be part of a production cluster cluster and thus it's a good tradeoff to enforce the settings. Note that nothing prevent users from setting it to 1 in a single node cluster.

Closes #17288
2016-03-25 12:56:20 +01:00
Boaz Leskes fe43eef1b5 Port Primary Terms to master #17044
Primary terms is a way to make sure that operations replicated from stale primary are rejected by shards following a newly elected primary.

Original PRs adding this to the seq# feature branch #14062 , #14651 . Unlike those PR, here we take a different approach (based on newer code in master) where the primary terms are stored in the meta data only (and not in `ShardRouting` objects).

Relates to #17038

Closes #17044
2016-03-25 12:01:00 +01:00
javanna 7bc4a35f9a adapt ZenDiscoveryUnitTests to removal of INGEST_ATTR, MASTER_ATTR and DATA_ATTR 2016-03-25 10:47:02 +01:00
Tal Levy cabc4b1636 add on_failure exception metadata to ingest document for verbose simulate 2016-03-24 16:11:47 -07:00
Dan Jasek e366a45203 Add created flag to IndexingOperationListener#postIndex
fixes #17333
2016-03-24 16:50:13 -06:00
javanna dd32bcea7a remove needless settings from transport client 2016-03-24 18:21:40 +01:00
javanna d2931b97e9 adapt to upstream changes 2016-03-24 18:18:27 +01:00
javanna 27d4994aff Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-24 18:10:11 +01:00
Nik Everett 584ba6133d Remove PROTOTYPE from RescorerBuilders
This changes the serialization order for QueryRescorerBuilder's but
that is ok because 5.0.0 doesn't need to be wire compatible with anything.
2016-03-24 13:04:37 -04:00
Nik Everett 5e8656aff0 Throw an exception if Writeable.Reader reads null
If a Writeable.Reader returns null it is always a bug, probably one that
will cause corruption in the StreamInput it was trying to read from. This
commit adds a check that attempts to catch these errors quickly including
the name of the reader.
2016-03-24 13:02:22 -04:00
Boaz Leskes 6dd164d0bd Include pings from client nodes in master election
We currently have a `discovery.zen.master_election.filter_client` setting that control whether their ping responses are ignored for master election (which is the current default). With the push to treat client nodes as normal nodes (and promote the transport/rest clients for client work), this should be changed. This commit remove this setting and it's companion `discovery.zen.master_election.filter_data` setting (currently defaulting to  false) in favor of singe `discovery.zen.master_election.ignore_non_master_pings` setting with more intuitive name (defaulting to false).

Resolves #17325
Closes #17329
2016-03-24 17:48:05 +01:00
Simon Willnauer d0413f0f0e Merge pull request #17327 from s1monw/harden_test
Improve test to not rely on thread slowness

We have to swap the second latch before we count it down otherwise
threads might be faster than the test. This has happend on a recent
CI failure: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-os-compatibility/os=ubuntu/121/console

This commit also adds a synchronized on the close method since it's
canceling and modifying a member varialbe that is assigned under lock.
2016-03-24 16:51:48 +01:00
Simon Willnauer f81fb89ea5 simplify test to not use lambda at all 2016-03-24 16:48:50 +01:00
Simon Willnauer 49d868b491 Improve test to not rely on thread slowness
We have to swap the second latch before we count it down otherwise
threads might be faster than the test. This has happend on a recent
CI failure: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-os-compatibility/os=ubuntu/121/console

This commit also adds a synchronized on the close method since it's
canceling and modifying a member varialbe that is assigned under lock.
2016-03-24 16:30:34 +01:00
Nik Everett 93ab4cfc99 Stop using PROTOTYPE in NamedWriteableRegistry
readFrom is confusing because it requires an instance of the type that it
is reading but it doesn't modify it. But we also have (deprecated) methods
named readFrom that *do* modify the instance. The "right" way to implement
the non-modifying readFrom is to delegate to a constructor that takes a
StreamInput so that the read object can be immutable. Now that we have
`@FunctionalInterface`s it is fairly easy to register things by referring
directly to the constructor.

This change modifying NamedWriteableRegistry so that it does that. It keeps
supporting `registerPrototype` which registers objects to be read by
readFrom but deprecates it and delegates it to a new `register` method
that allows passing a simple functional interface. It also cuts Task.Status
subclasses over to using that method.

The start of #17085
2016-03-24 11:26:44 -04:00
Isabel Drost-Fromm 5dd481bfe3 Disallow reverse option and check it throws an exception
This adds tests to check that using reverse as sort option is disallowed
and throws an exception.
2016-03-24 15:55:21 +01:00
javanna ce86fc5647 Cluster Stats: remove mem section
The available memory metric was always set to `0` since 2.0.beta1 (bug).  was left behind but never set. Turns out the section wasn't that useful, as it would only output the total memory available throughout all nodes in the cluster. We decided to remove the section then.
2016-03-24 15:49:27 +01:00
javanna 2c6e78e16c more Writeable in ClusterStatsNodes 2016-03-24 15:28:10 +01:00
Jason Tedor f522fa1df3 Settings loader local variables can be final 2016-03-24 10:25:46 -04:00
javanna 82014ebec3 use read/writeOptionalWriteable 2016-03-24 15:22:31 +01:00
javanna 06fd61fb00 make roles final 2016-03-24 15:20:50 +01:00
javanna 2ea694b4bc renaming of discovery.zen.master_election.filter_client setting will be a follow-up, make it a TODO, opened #17325 2016-03-24 15:20:02 +01:00
Jason Tedor ad5438a6a9 Use expectThrows in YamlSettingsLoaderTests
This commit refactors the unit tests in YamlSettingsLoaderTests to use
exceptThrows for simplification.
2016-03-24 10:14:04 -04:00
Jason Tedor 84a308db80 Fix line-length issues in YamlSettingsLoaderTests
This commit fixes a line-length checkstyle violation in
YamlSettingsLoaderTests.java and removes this file from the checkstyle
line-length suppressions.
2016-03-24 10:14:04 -04:00
Jason Tedor f9500b1d6a Use expectThrows in JsonSettingsLoaderTests
This commit refactors the unit tests in JsonSettingsLoaderTests to use
exceptThrows for simplification.
2016-03-24 10:14:03 -04:00
Jason Tedor 7841b439ec Fix line-length issue in JsonSettingsLoaderTests
This commit fixes a line-length checkstyle violation in
JsonSettingsLoaderTests.java and removes this file from the checkstyle
line-length suppressions.
2016-03-24 10:14:03 -04:00
javanna df2923ced4 roles to become unmodifiableSet 2016-03-24 15:11:51 +01:00
javanna cd05cf91f0 remove PROTOTYPE from DiscoveryNode 2016-03-24 15:09:47 +01:00
Jason Tedor ca5e48d39a Test that NoDuplicatesProperties throws for null value
This commit adds a test that NoDuplicatesProperties throws a
NullPointerException if an attempt is made to put a key that corresponds
to a null value. This behavior ultimately comes from the super class
Properties but the test ensures that we retain this behavior.
2016-03-24 09:47:01 -04:00
Jason Tedor cf92151513 Fix line-length issue in PropertiesSettingsLoader
This commit fixes a line-length checkstyle violation in
PropertiesSettingsLoader.java and removes this file from the checkstyle
line-length suppressions.
2016-03-24 09:47:01 -04:00
Jason Tedor c0fa00a2fd Use expectThrows in PropertiesSettingsLoaderTests
This commit refactors the unit tests in PropertiesSettingsLoaderTests to
use exceptThrows for simplification.
2016-03-24 09:47:01 -04:00
Jason Tedor 7323c37339 Refactor PropertiesSettingsLoader
This commit refactors PropertiesSettingsLoader to remove some duplicate
code.
2016-03-24 09:44:21 -04:00
Jason Tedor bb364cc793 Merge pull request #17310 from jasontedor/null-valued-settings
Add guard against null-valued settings
2016-03-24 07:53:58 -04:00
Jason Tedor 0c1b15f617 Clarify Javadocs for SettingsLoaderFactory 2016-03-24 07:45:39 -04:00
Jason Tedor f4db2e2691 Mark two local variables as final in PSLT.java 2016-03-24 07:36:45 -04:00
Jason Tedor 4d27328a83 Reverse meaning of XContentSettingsLoader flag
The sole constructor of XContentSettingsLoader accepts a boolean flag
that indicates whether or not null values parsed from the source should
be rejected or not. Previously a true value for this flag meant that
null values should be rejected. With this commit, the meaning of this
flag is reversed so that a true value means that null values should be
accepted (note that this is needed due to the way that settings are
unset via the cluster update settings API). The name of this flag has
been changed from guardAgainstNullValuedSettings to allowNullValues, for
clarity.
2016-03-24 07:35:57 -04:00
Isabel Drost-Fromm 08d989d9b6 Merge branch 'master' into deprecation/sort-option-reverse-removal
Conflicts:
	core/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java
	core/src/main/java/org/elasticsearch/search/sort/ScoreSortBuilder.java
2016-03-24 12:06:10 +01:00
Martijn van Groningen 9399f673d1 percolator: Add support to extract terms from TermsQuery 2016-03-24 10:25:30 +01:00
Adrien Grand e5074e2b1b Make `parseMultiField` part of `parseField`. #17313
All our fields are supposed to support multi fields, so we could put the logic in
`TypeParsers.parseField` instead of duplicating the logic in every type parser.
2016-03-24 10:15:04 +01:00
Jim Ferenczi da42f199bd Enforce isolated mode for all plugins
This commit removes the isolated option, each plugin have its own classloader.
2016-03-24 09:17:33 +01:00
Alexander Reelsen 69b71e66f3 Fix compilation error 2016-03-24 08:49:36 +01:00
Alexander Reelsen b2573858b6 Version: Set version to 5.0.0-alpha1
Change version, required a minor fix in the RPM building.
In case of a alpha/beta version, the release will contain alpha/beta
as the RPM version cannot contains dashes/tildes.
2016-03-24 08:36:08 +01:00
Igor Motov 8202bf212c Don't wait for completion of list tasks tasks when wait_for_completion flag is set
Waiting for completion of list tasks tasks can cause an infinite loop of a list tasks task waiting for its own completion or completion of its children. To reproduce run:

```
curl "localhost:9200/_tasks?wait_for_completion"
```
2016-03-23 23:00:15 -04:00
Jason Tedor 4aa5426361 Add guard against null-valued settings
This commit adds a guard against null-valued settings that are loaded
from yaml or json settings files, and also adds a test that ensures
the same remains true for settings loaded from properties files.
2016-03-23 22:35:50 -04:00
Igor Motov 201fc06f8d Fix TaskId#isSet to return true when id is set and not other way around
During refactoring the name was changed, but the logic wasn't. This commit fixes the logic to match the name.
2016-03-23 18:52:22 -04:00
Jason Tedor 7d7faa7fcc Merge pull request #17293 from jasontedor/property-placeholder-null-value
Useful error message for null property placeholder
2016-03-23 18:45:14 -04:00
Jason Tedor 17dd60dd31 Merge pull request #17208 from jasontedor/install-plugin-permissions
Install plugin permissions
2016-03-23 18:44:47 -04:00
Areek Zillur e16e113691 Remove suggest threadpool
In #17198, we removed suggest transport action, which
used the `suggest` threadpool to execute requests. Now
`suggest` threadpool is unused and suggest requests are
executed on the `search` threadpool.
2016-03-23 18:01:45 -04:00
Areek Zillur b1ceaaddf4 remove dead code 2016-03-23 16:37:57 -04:00
Areek Zillur de78621c95 simplify handling suggest-only search request 2016-03-23 16:37:56 -04:00
Areek Zillur 59513b308e rename to isSuggestOnly 2016-03-23 16:37:56 -04:00
Areek Zillur 91dd9b3301 Merge suggest stats into search stats 2016-03-23 16:37:56 -04:00
Areek Zillur ed49ec437f remove suggest transport action 2016-03-23 16:37:56 -04:00
Areek Zillur 0eb2032189 Disable DFS search types and request caching for suggest-only requests 2016-03-23 16:37:56 -04:00
Areek Zillur b0437c3f22 Optimize search execution for suggest-only requests
We skip context preprocessing and only execute
suggest phase for suggest-only requests
2016-03-23 16:37:56 -04:00
Areek Zillur 5ed2bb5f18 [REST] use search transport for suggest rest endpoint 2016-03-23 16:37:56 -04:00
Jason Tedor 0647638a99 Guard against null key for property placeholder 2016-03-23 14:57:01 -04:00
Ryan Ernst 6e74d1d0c9 Merge pull request #17289 from rjernst/cli-args
Cli: Reject positional argument for bin/elasticsearch
2016-03-23 11:53:32 -07:00
Ryan Ernst 0fe6c9f3b4 Add elasticsearch cli test for options plus illegal args 2016-03-23 11:52:25 -07:00
David Pilato 6e80b5f2dd Merge branch 'fix/17244-s3-chunk-buffer-sizes' 2016-03-23 18:51:54 +01:00
Jason Tedor 0654b84d2c Useful error message for null property placeholder
This commit adds the key to the error message when encountering a
missing property placeholder.
2016-03-23 13:25:39 -04:00
Jason Tedor 3f73ef9aa4 Protect max size virtual memory check from Windows 2016-03-23 12:35:01 -04:00
Ryan Ernst f91a046b6f Cli: Reject positional argument for bin/elasticsearch
This exits with a usage error when bin/elasticsearch recieves any
positional args.

closes #17287
2016-03-23 09:03:29 -07:00
Christoph Büscher a3fc4c0370 Merge pull request #17205 from cbuescher/sort-use-sortbuilders
Switch to using SortBuilder instead of BytesReference in serialization of SearchSource and elsewhere.
2016-03-23 16:25:02 +01:00
Christoph Büscher e319985d93 Adding test for parsing sort on single fields as list 2016-03-23 15:27:53 +01:00
Isabel Drost-Fromm 9e1059be2b Remove deprecated reverse option from sorting
Relates to #17047
2016-03-23 15:03:57 +01:00
Adrien Grand 940fc3f864 Move dynamic template matching logic to the MatchType enum. #17281 2016-03-23 14:53:26 +01:00
Adrien Grand c2ba4448b0 Fix test bug. 2016-03-23 14:42:36 +01:00
Christoph Büscher 41ddc6fa3f Merge branch 'master' into sort-use-sortbuilders
Conflicts:
	core/src/main/java/org/elasticsearch/common/io/stream/StreamInput.java
2016-03-23 14:30:53 +01:00
Jay Modi ae1a68c10a Merge pull request #17218 from jaymode/streaminput_availble
Implement available for all StreamInput classes
2016-03-23 09:15:24 -04:00
Christoph Büscher f8e7462725 SortBuilder#toXContent should render full object 2016-03-23 14:10:47 +01:00
Christoph Büscher b614e3e075 Switch to using refactored SortBuilder in SearchSourceBuilder and elsewhere
Switching from using list of BytesReference to real SortBuilder list in
SearchSourceBuilder, TopHitsAggregatorBuilder and TopHitsAggregatorFactory.
Removing SortParseElement and related sort parsers.
2016-03-23 13:49:52 +01:00
Simon Willnauer 4826782b37 wrap line at 140chars 2016-03-23 13:31:50 +01:00
Christoph Büscher ececff357b Merge pull request #17248 from cbuescher/sort-add-parse-list
Moving the current top level parsing for the "sort" element into a static "fromXContent" method in SortBuilder.
2016-03-23 13:04:37 +01:00
Christoph Büscher 2bb57b6f2c Remove SortBuilderParser interface, using abstract methods in SortBuilder 2016-03-23 12:47:10 +01:00
javanna 030453d320 Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-23 11:25:34 +01:00
David Pilato e907b7c11e Check that S3 setting `buffer_size` is always lower than `chunk_size`
We can be better at checking `buffer_size` and `chunk_size` for S3 repositories.
For example, we know that:

* `buffer_size` should be more than `5mb`
* `chunk_size` should be no more than `5tb`
* `buffer_size` should be lower than `chunk_size`

Otherwise, setting `buffer_size` is useless.

For the record:

`chunk_size` is a Snapshot setting whatever the implementation is.
`buffer_size` is an S3 implementation setting.

Let say that you are snapshotting a 500mb file. If you set `chunk_size` to `200mb`, then Snapshot service will call S3 repository to snapshot 3 files with the following sizes:

* `200mb`
* `200mb`
* `100mb`

If you set `buffer_size` to `100mb` (AWS maximum size recommendation), the first file of `200mb` will be uploaded on S3 using the multipart feature in 2 chunks and the workflow is basically the following:

* create the multipart request and get back an `id` from AWS S3 platform
* upload part1: `100mb`
* upload part2: `100mb`
* "commit" the full upload using the `id`.

Closes #17244.
2016-03-23 10:39:54 +01:00
Adrien Grand a3bb409f03 Upgrade string fields to text/keyword also if `ignore_above` is set. #17273
Since this parameter is used in the logstash default template, it would be nice
to handle it.
2016-03-23 10:31:10 +01:00
Colin Goodheart-Smithe b8ac05149d Merge pull request #17264 from pjo256/master
Setting 'other' bucket on empty aggregation
2016-03-23 09:19:42 +00:00
Simon Willnauer 2f1af552a9 Bring back operation rollback on unexpected mapping change during recovery
We lost some accounting code in the translog recover code during refactoring
which triggers a very rare assertion. If we fail on a recovery target with an
illegal mapping update (which can happen if the clusterstate is behind), then
we miss to rollback the # of processed ops in that batch and once we resume
the batch we trip an assertion that the stats are off.

This commit brings back the code lost in 8bc2332d9a
and improves the comment that explains why we need this rollback logic.
2016-03-23 10:15:53 +01:00
Adrien Grand 252ae5f15a Upgrade dynamic templates that use a dynamic type. #17254
Now that string has been splitted into text and keyword, we use text as a
dynamic type when encountering string fields in a json document. However
this does not play well with existing templates that look like

```
{
  "mapping": {
    "index": "not_analyzed",
    "type": "{dynamic_type}"
  },
  "match": "*"
}
```

Since we want existing templates to keep working as much as possible in 5.0,
this commit adds a hack to dynamic templates so that elasticsearch will create
a keyword field if the `index` property is set and is either `no` or
`not_analyzed`, similarly to what was done in #16991.

While this will make upgrades easier, we still need to figure out a way to
allow users to create keyword fields when using dynamic types.
2016-03-23 09:54:19 +01:00
Adrien Grand e50eeeaffb Refactor fielddata mappings. #17148
The fielddata settings in mappings have been refatored so that:
 - text and string have a `fielddata` (boolean) setting that tells whether it
   is ok to load in-memory fielddata. It is true by default for now but the
   plan is to make it default to false for text fields.
 - text and string have a `fielddata_frequency_filter` which contains the same
   thing as `fielddata.filter.frequency` used to (but validated at parsing time
   instead of being unchecked settings)
 - regex fielddata filtering is not supported anymore and will be dropped from
   mappings automatically on upgrade.
 - text, string and _parent fields have an `eager_global_ordinals` (boolean)
   setting that tells whether to load global ordinals eagerly on refresh.
 - in-memory fielddata is not supported on keyword fields anymore at all.
 - the `fielddata` setting is not supported on other fields that text and string
   and will be dropped when upgrading if specified.
2016-03-23 09:48:13 +01:00
Adrien Grand 435558a5c0 Also map floating-point numbers as floats when numeric detection is on. #17104
I overlooked it in #15319 since numeric detection triggers a totally different
path in the code of dynamic mappings.
2016-03-23 08:20:22 +01:00
Philip Ottesen 1dff3a8210 Setting 'other' bucket on empty aggregation 2016-03-22 20:23:35 -04:00
Tal Levy 534caa8927 Handle regex parsing errors in Gsub and Grok Processors
Currently, both Gsub and Grok parse regex strings during
Pipeline creation. Thrown parsing exceptions were leaking out, this
commit wraps those exceptions in ElasticsearchParseExceptions.
2016-03-22 15:06:29 -07:00
Jason Tedor d5e408b273 Mock rlimit infinity in virtual memory size test
This commit mocks the value of rlimit infinity in the max size virtual
memory check test. This is to avoid attempting to load the native C
library during the test on Windows which would lead to a permissions
violation (the native C library needs to be loaded before the security
manager is setup).
2016-03-22 17:03:46 -04:00
Areek Zillur 866a350599 Merge pull request #17232 from areek/cleanup/handling_index_state
Cleanup writing upgraded index state
2016-03-22 14:57:49 -04:00
Adrien Grand d514977c75 Make dynamic template parsing less lenient. #17249
Today unknown parameters are ignored yet carried through serialization.
2016-03-22 18:52:25 +01:00
Boaz Leskes 20644666e5 RecoveryWhileUnderLoadIT: output specific missing doc ids and their shard routing on failure
Also increase logging levels to see when a doc was indexed
2016-03-22 18:29:09 +01:00
Christoph Büscher 64d362ab9d Add parsing of list of sort builders to SortBuilder
Moving the current parsing code for the whole "sort" element
in the seach source over to static "fromXContent" method in
SortBuilder.
2016-03-22 18:07:08 +01:00
Simon Willnauer 3ed4ff054f Merge pull request #17246 from s1monw/archive_persistent_settings
Archive cluster level settings if unknown or broken

We already archive index level settings if we find an unknown or invalid/broken
value for a setting on node startup. The same could potentially happen for persistent
cluster level settings if we remove a setting or if we add validation to a setting that
didn't exist in the past. To ensure that only valid settings are recovered into the cluster
state we archive them (prefix them with `archive.` and log a warning. Tools that check the
cluster settings can then warn users that they have broken settings in their clusterstate that
got archived.
2016-03-22 17:35:08 +01:00
Nik Everett da96b6e41d [reindex] Add thottling support
The throttle is applied when starting the next scroll request so that its
timeout can include the throttle time.
2016-03-22 12:34:14 -04:00
Simon Willnauer c0ef3189b7 add javadocs for isPrivate() 2016-03-22 17:33:51 +01:00
Colin Goodheart-Smithe ea93b803d2 Rewrite to unbounded range query if relation to query is WITHIN 2016-03-22 16:14:47 +00:00
Jason Tedor 8004c51c17 Add max size virtual memory check
This commit adds a bootstrap check on Linux and OS X for the max size of
virtual memory (address space) to the user running the Elasticsearch
process.

Closes #16935
2016-03-22 11:52:36 -04:00
Adrien Grand c52b1f3a7c An `exists` query on an object should query a single term.
Currently if you run an `exists` query on an object, it will resolve all sub
fields and create a disjunction for all those fields. However the `_field_names`
mapper indexes paths for objects so we could query object paths directly.

I also changed the query parser to reject `exists` queries if the `_field_names`
field is disabled since it would be a big performance trap.
2016-03-22 16:26:45 +01:00
Simon Willnauer 68d07fc01f Archive cluster level settings if unknown or broken
We already archive index level settings if we find an unknown or invalid/broken
value for a setting on node startup. The same could potentially happen for persistent
cluster level settings if we remove a setting or if we add validation to a setting that
didn't exist in the past. To ensure that only valid settings are recovered into the cluster
state we archive them (prefix them with `archive.` and log a warning. Tools that check the
cluster settings can then warn users that they have broken settings in their clusterstate that
got archived.
2016-03-22 16:17:06 +01:00
Luca Cavanna 3764b3ff80 Merge pull request #17145 from alexshadow007/fix-17101
Fix column aliases in _cat/indices, _cat/nodes and _cat/shards APIs
2016-03-22 15:37:21 +01:00
Jason Tedor 5dc48e71d0 Use mock filesystem during install plugins tests
This commit sets up the default filesystem used during install plugins
tests. A hack is neeeded to handle the temporary directory because the
system property "java.io.tmpdir" will have been initialized to a value
that is sensible for the default filesystem, but not necessarily to a
value that makes sense for the mock filesystem in use during the
tests. This property is restored after each test.
2016-03-22 10:25:27 -04:00
Boaz Leskes 533c967a2d Revert "Removed index level metadata election #17233"
This reverts commit 1264ee79b6.
2016-03-22 14:35:42 +01:00
Christoph Büscher 14f45c1784 Merge pull request #17146 from cbuescher/sort-add-build
For the refactoring of SortBuilders related to #10217, each SortBuilder needs to get a build()
method that produces a SortField according to the SortBuilder parameters on the shard.
2016-03-22 13:46:50 +01:00
Simon Willnauer 75d5b83367 Improve error message if resource files have illegal encoding
This commit fixes string formatting issues in the error handling and
provides a bettter error message if malformed input is detected.
This commit also adds tests for both situations.

Relates to #17212
2016-03-22 13:29:07 +01:00
Christoph Büscher 697174dcb0 Make sure to use nestedScope levels when building nested filters 2016-03-22 13:28:40 +01:00
Christoph Büscher 25da6b2f2e Merge branch 'master' into sort-add-build 2016-03-22 12:20:56 +01:00
Christoph Büscher ff021c60d9 Merge pull request #17238 from cbuescher/simplify-nestedInnerQueryParseSupport
Remove unused methods and fields in NestedInnerQueryParseSupport
2016-03-22 12:16:44 +01:00
Boaz Leskes b07a8185a7 Wait for metadata to stabilize before checking for it after opening indices in testMetaWrittenWhenIndexIsClosedAndMetaUpdated 2016-03-22 11:36:42 +01:00
Christoph Büscher 20417262e2 Remove unused methods and fields in NestedInnerQueryParseSupport 2016-03-22 11:32:24 +01:00
Simon Willnauer 33521fc27c Detach IndexShard from node services
this is the last step to remove node level service from IndexShard.
This means that tests can now more easily create an IndexShard instance
without starting a node and removes the dependency between IndexShard and Client/ScriptService
2016-03-22 11:02:04 +01:00
javanna eebd0cfccd Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-22 10:34:40 +01:00
Martijn van Groningen 8f22a01bbd ingest: Give the `foreach` processor access to the rest of the document.
Closes #17147
2016-03-22 10:32:13 +01:00
Boaz Leskes 1264ee79b6 Removed index level metadata election #17233
When a master is elected, it reaches out to all master nodes for their cluster state, selecting the one with the highest version. At the moment, we do another round to select the index metadata with the highest version as well. This is not needed - the election of a cluster state is enough - we should just use whatever indices are in it.

Closes #17233
2016-03-22 10:28:01 +01:00
Areek Zillur ec5419048e cleanup writing upgraded index state
In #17187, we upgrade index state after upgrading
index folder structure. As we don't have to write
the upgraded state in the old index folder structure,
we can cleanup how we write upgraded index state.
2016-03-21 18:59:37 -04:00
Simon Willnauer a0c68c281c Improve error message if setting is not found
We can do better than just throwing an error when we don't find a
setting. It's actually trivial to leverage lucenes slow LD StringDistance
to find possible candiates for a setting to detect missspellings and suggest
a possible setting.
This commit adds error messages like:

 * `unknown setting [index.numbe_of_replica] did you mean [index.number_of_replicas]?`

rather than just reporting the setting as unknown
2016-03-21 23:13:24 +01:00
Simon Willnauer 8127a06b2e Recover broken IndexMetaData as closed
Today if something is wrong with the IndexMetaData we detect it very
late and most of the time if that happens we already allocated the index
and get endless loops and full log files on data-nodes. This change tries
to verify IndexService creattion during initial state recovery on the master
and if the recovery fails the index is imported as `closed` and won't be allocated
at all.

Closes #17187
2016-03-21 22:50:58 +01:00
Simon Willnauer 7f16a1d9a7 Improve upgrade experience of node level index settings
In 5.0 we don't allow index settings to be specified on the node level ie.
in yaml files or via commandline argument. This can cause problems during
upgrade if this was used extensively. For instance if analyzers where
specified on a node level this might cause the index to be closed when
imported (see #17187). In such a case all indices relying on this
must be updated via `PUT /${index}/_settings`. Yet, this API has slightly
different semantics since it overrides existing settings. To make this less
painful this change adds a `preserve_existing` parameter on that API to ensure
we have the same semantics as if the setting was applied on the node level.

This change also adds a better error message and a change to the migration guide
to ensure upgrades are smooth if index settings are specified on the node level.

If a index setting is detected this change fails the node startup and prints a message
like this:
```
*************************************************************************************
Found index level settings on node level configuration.

Since elasticsearch 5.x index level settings can NOT be set on the nodes
configuration like the elasticsearch.yaml, in system properties or command line
arguments.In order to upgrade all indices the settings must be updated via the
/${index}/_settings API. Unless all settings are dynamic all indices must be closed
in order to apply the upgradeIndices created in the future should use index templates
to set default values.

Please ensure all required values are updated on all indices by executing:

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
  "index.number_of_shards" : "1",
  "index.query.default_field" : "main_field",
  "index.translog.durability" : "async",
  "index.ttl.disable_purge" : "true"
}'
*************************************************************************************
```
2016-03-21 20:12:18 +01:00
Areek Zillur bd44f37580 Merge pull request #17177 from areek/enhancement/change_shard_state_format
Always write shard state in SMILE format
2016-03-21 14:32:47 -04:00
Alexander Reelsen bf98a4455b PluginManager: Add xpack as official plugin
In order to be able to install `xpack` as a plugin and unless this works
for cross product packs, this adds xpack as an official plugin.
2016-03-21 18:51:17 +01:00
javanna 58775d885d adapt TribeServiceTests after merge 2016-03-21 18:05:44 +01:00
javanna 42ea2bb211 fix compile errors after merge 2016-03-21 18:00:31 +01:00
Jason Tedor e6eefcb142 Jimfs throws IAE when it should throw UOE
This commit adds a hack to detect when Jimfs throws an IAE where it
should be throwing an UOE. Namely, the method
FileSystemProvider#createDirectory should be throwing an UOE if an
attempt is made to set attributes that the filesystem does not support,
but instead Jimfs violates this and throws an IAE.
2016-03-21 12:44:29 -04:00
javanna bf390a935e Merge branch 'master' into enhancement/remove_node_client_setting 2016-03-21 17:18:23 +01:00
jaymode 98123e9775 Implement available for all StreamInput classes
There are some implementation of StreamInput that implement the available method
and there are others that do not implement this method. This change makes the
available method abstract in the StreamInput class and implements the method where
it was not previously implemented.
2016-03-21 09:30:20 -04:00
Jason Tedor 6db6c15d06 Add tests of POSIX handling for installing plugins
This commit refactors the unit tests for installing plugins to test
against mock filesystems (as well as the native filesystem) for better
test coverage. This commit also adds tests that cover the POSIX
attributes handling when installing plugins (e.g., ensuring that the
plugins directory has the right permissions, the bin directory has
execute permissions, and the config directory has the same owner and
group as its parent).
2016-03-21 09:02:25 -04:00
Jason Tedor 554eb8aa87 Refactor POSIX handling when installing plugins
This commit refactors the handling of POSIX filesystem attributes when
install plugins.
2016-03-21 09:02:12 -04:00