Commit Graph

11695 Commits

Author SHA1 Message Date
Alexander Reelsen f64739788b Build: Update package repositories when creating a release
In order to automatically sign and and upload our debian and RPM
packages, this commit incorporates signing into the build process
and adds the necessary steps to the release process. In order to do this
the pom.xml has been adapted and the RPM and jdeb maven plugins have been
updated, so the packages are signed on build. However the repositories
need to signed as well.

Syncing the repos requires downloading the current repo, adding
the new packages and syncing it back.

The following environment variables are now required as part of the build

* GPG_KEY_ID - the key ID of the key used for signing
* GPG_PASSPHRASE - your GPG passphrase
* S3_BUCKET_SYNC_TO: S3 bucket to sync new repo into

The following environment variables are optional

* S3_BUCKET_SYNC_FROM: S3 bucket to get existing packages from
* GPG_KEYRING - home of gnupg, defaults to ~/.gnupg

The following command line tools are needed

* createrepo (creates RPM repositories)
* expect (used by the maven rpm plugin)
* apt-ftparchive (creates DEB repositories)
* gpg (signs packages and repo files)
* s3cmd (syncing between the different S3 buckets)

The current approach would also work for users who want to run their
own repositories, all they need to change are a couple of environment
variables.

Minor implementation detail: Right now the branch name is used as version
for the repositories (like 1.4/1.5/1.6) - if we ever change our branch naming
scheme, the script needs to be fixed.
2015-04-26 19:05:47 +02:00
Clinton Gormley 37ed61807f Docs: Updated the experimental annotations in the docs as follows:
* Removed the docs for `index.compound_format` and `index.compound_on_flush` - these are expert settings which should probably be removed (see https://github.com/elastic/elasticsearch/issues/10778)
* Removed the docs for `index.index_concurrency` - another expert setting
* Labelled the segments verbose output as experimental
* Marked the `compression`, `precision_threshold` and `rehash` options as experimental in the cardinality and percentile aggs
* Improved the experimental text on `significant_terms`, `execution_hint` in the terms agg, and `terminate_after` param on count and search
* Removed the experimental flag on the `geobounds` agg
* Marked the settings in the `merge` and `store` modules as experimental, rather than the modules themselves

Closes #10782
2015-04-26 18:49:15 +02:00
Clinton Gormley f1a0e2216a Docs: Mentioned script_id and script_file parameters across all aggs
Closes #10760
2015-04-26 17:30:38 +02:00
Mark Mulder 690c16e81a Docs: Fix minor spelling mistakes in Match Query doc
Closes #10751
2015-04-26 16:29:41 +02:00
Clinton Gormley 7de8b7008e Docs: Tidied docs for field-stats 2015-04-26 15:52:02 +02:00
Simon Willnauer 2c510f0689 Allow double-closing of FSTranslog
the translog might be reused across engines which is currently a problem
in the design such that we have to allow calls to `close` more than once.
This moves the closed check for snapshot on the actual file to exit the loop.

Relates to #10807
2015-04-26 15:13:06 +02:00
Simon Willnauer f87fb95830 [TEST] fail if exception is not thrown 2015-04-26 14:26:22 +02:00
Simon Willnauer 54ccfda484 Merge pull request #10809 from s1monw/issues/10807
[TRANSLOG] Fail #snapshot if translog is closed
2015-04-26 14:08:37 +02:00
Simon Willnauer 2373c2b43c [TRANSLOG] Fail #snapshot if translog is closed
If the translog is closed while a snapshot opertion is in progress
we must fail the snapshot operation otherwise we end up in an endless
loop.

Closes #10807
2015-04-26 14:03:50 +02:00
Simon Willnauer 768e1c2012 [TEST] Fix test to take care of refresh failures after successful commit 2015-04-26 13:44:29 +02:00
Mehdi Mollaverdi dce920b75f Docs: The name of scroll ID attribute in the response is "_scroll_id" rather than "scroll_id"
Closes #10691
2015-04-25 19:32:32 +02:00
Clinton Gormley cf177c32d4 Docs: Fixed pattern-capture token filter example
Closes #10690
2015-04-25 19:27:55 +02:00
Adam Mollenkopf 86c2c202fe Docs: Update extendedstats-aggregation.asciidoc
code snippet should show ExtendedStats, not Stats

Closes #10683
2015-04-25 19:07:21 +02:00
Clinton Gormley 2579cc31b1 Docs: Note that include_in_parent/root does not apply to geo-shape fields
Closes #10653
2015-04-25 16:49:49 +02:00
Tanguy Leroux f7d4baacfb Remove working directory
This commit removes the working directory and its associated environment variable "WORK_DIR"
2015-04-25 13:08:36 +02:00
Zachary Tong 26189ee2e6 Rename helpers to follow naming conventions 2015-04-24 22:38:43 -04:00
Ryan Ernst 1db380cf49 Merge pull request #10798 from mfussenegger/bigarrays
Internal: Change BigArrays to not extend AbstractComponent

In order to avoid the getLogger(getClass()) calls in the
AbstractComponent constructor.

Seems like BigArrays used to be a Singleton but it actually
no longer is one. Every time a SearchContext is created a
new BigArrays instance is created via the
withCircuitBreaking call.

closes #10798
2015-04-24 15:07:16 -07:00
Mathias Fussenegger 9f20c1c642 change BigArrays to not extend AbstractComponent
In order to avoid the ``getLogger(getClass())`` calls in the
AbstractComponent constructor.

Seems like BigArrays used to be a Singleton but it actually
no longer is one. Every time a SearchContext is created a
new BigArrays instance is created via the
``withCircuitBreaking`` call.
2015-04-24 22:34:32 +02:00
Adrien Grand 46ac32ad4a Merge pull request #10786 from jpountz/fix/dynamic_mappings_on_replicas
Internal: Wait for required mappings to be available on the replica before indexing.
2015-04-24 22:20:50 +02:00
Adrien Grand 3e5b8a21b4 Internal: Wait for required mappings to be available on the replica before indexing.
Due to timing issues, mappings that are required to index a document might not
be available on the replica at indexing time. In that case the replica starts
listening to cluster state changes and re-parses the document until no dynamic
mappings updates are generated.
2015-04-24 22:00:06 +02:00
Ryan Ernst f27f5aaa22 Upgrade to lucene-5.2-snapshot-1675927 2015-04-24 12:38:32 -07:00
Oliver Eilhard 95e9b86505 Mustache tags syntax
Hi there. I've been experimenting with the search templates recently and I'm a bit confused. Shouldn't the Mustache tags be written like `{{tagname}}` instead of `{tagname}`? Your using `{{...}}` [here](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) BTW.

Using the first example in that page  seems to indicate that something's wrong, or am I missing something?

```
$ curl 'localhost:9200/test/_search' -d '{"query":{"template":{"query":{"match":{"text":"{keywords}"}},"params":{"keywords":"value1_foo"}}}}'
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}

$ curl 'localhost:9200/test/_search' -d '{"query":{"template":{"query":{"match":{"text":"{{keywords}}"}},"params":{"keywords":"value1_foo"}}}}'
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"test","_type":"testtype","_id":"1","_score":1.0,"_source":{"text":"value1_foo"}}]}}
```
2015-04-24 21:23:58 +02:00
Boaz Leskes 389ce39919 CommitStats doesn't need to allow for null values in commit user data
Lucene forbids writing those and MapBuilder.immutableMap doesn't like them either, as discovered by @brwe

Closes #10774
2015-04-24 20:57:09 +02:00
Lee Hinman 54cf885d14 Disable security manager when running with `mvn exec:exec` 2015-04-24 11:00:54 -06:00
Ryan Ernst 4d672b0369 Mappings: Join MergeResults with MergeContext since they are almost the same
MergeContext currently exists to store conflicts, and providing
a mechanism to add dynamic fields. MergeResults store the same
conflicts. This change merges the two classes together, as well
as removes the MergeFlags construct.

This is in preparation for simplifying the callback structures
to dynamically add fields, which will require storing the mapping
updates in the results, instead of having a sneaky callback to
the DocumentMapper instance. It also just makes more sense that
the "results" of a merge are conflicts that occurred, along with
updates that may have occurred. For MergeFlags, any future needs
for parameterizing the merge (which seems unlikely) can just be
added directly to the MergeResults as simlulate is with this change.
2015-04-24 08:19:46 -07:00
Robert Muir 31dc26ec42 Merge pull request #10784 from rmuir/reformat_bootstrap
Use Tuple only as return value in Bootstrap
2015-04-24 10:39:35 -04:00
Robert Muir a3d03fdeb8 style changes to Bootstrap 2015-04-24 10:09:30 -04:00
Robert Muir c4f7385279 Merge pull request #10717 from rmuir/put_me_in_coach
enable securitymanager
2015-04-24 09:57:07 -04:00
Robert Muir fca05edbd4 add constant only used once to make it harder to read the code 2015-04-24 09:51:01 -04:00
Robert Muir 2d778df4b4 Merge branch 'master' into put_me_in_coach 2015-04-24 09:45:19 -04:00
Shay Banon 209b8cf952 TEST: assert we can create an instance of request 2015-04-24 15:04:25 +02:00
Shay Banon 8dbb79c96a refactor and cleanup transport request handling
This refactoring and cleanup is that each request handler ends up
implementing too many methods that can be provided when the request handler itself
is registered, including a prototype like class that can be used to instantiate
new request instances for streaming.
closes #10730
2015-04-24 14:11:43 +02:00
Simon Willnauer cb615ffecf [TEST] Don't use pretty print in tests Windowns has slight differences 2015-04-24 13:18:35 +02:00
Simon Willnauer c25ca1ebfb [CORE] Simplify IndexStore and friends
Today we have a lot of bloat in the IndexStore and related classes. THe IndexStore interface
is unneeded as we always subclass AbstractIndexStore and it hides circular dependencies
that are problematic when added. Guice proxies them if you have an interface which is bad in
general. This commit removes most of the bloat classes and unifies all the classes we have
into a single one since they all just structural and don't encode any functionality.
2015-04-24 13:10:36 +02:00
Boaz Leskes 5bdfdc42d9 Refactor TransportShardReplicationOperationAction
Refactor TransportShardReplicationOperationAction state management into clear separate Primary phase and Replication phase. The primary phase is responsible for routing the request to the node holding the primary, validating it and performing the operation on the primary. The Replication phase is responsible for sending the request to the replicas and managing their responses.

This also adds unit test infrastructure for this class, and some basic tests. We can extend later as we continue developing.

Closes #10749
2015-04-24 12:39:35 +02:00
Martijn van Groningen b444d2c31a Test: wait for green 2015-04-24 12:06:18 +02:00
Simon Willnauer 3ff0b21c21 Remove dead code 2015-04-24 10:37:55 +02:00
Simon Willnauer 84549f334d [TEST] use toString rather than getDetailedMessage() 2015-04-24 10:09:24 +02:00
Martijn van Groningen dd4a22bfed bulk: Fields defined in the `_default_` mapping of an index template should be picked up when an index alias filter is parsed if a new index is introduced when a document is indexed into an index that doesn't exist yet via the bulk api.
Closes #10609
2015-04-24 09:43:16 +02:00
Simon Willnauer 15d58d91f1 [REST] Render REST errors in a structural way
This commit adds support for structural errors / failures / exceptions
on the elasticsearch REST layer. Exceptions are rendering with at least
a `type` and a `reason` corresponding to the exception name and the message.
Some expcetions like the ones associated with an index or a shard will have
additional information about the index the exception was triggered on or the
shard respectivly.

Each rendered response will also contain a list of root causes which is a list
of distinct shard level errors returned for the request. Root causes are the lowest
level elasticsearch exception found per shard response and are intended to be displayed
to the user to indicate the soruce of the exception.

Shard level response are by-default grouped by their type and reason to reduce the amount
of duplicates retunred. Yet, the same exception retunred from different indices will not be
grouped.

Closes #3303
2015-04-24 09:36:10 +02:00
Boaz Leskes c9d72431a3 Test: add afterIfFailed & afterIfSuccessful to ElasticsearchTestCase
Also use afterIfFailed to log more info from the rest tests
2015-04-24 09:10:23 +02:00
Ryan Ernst 1f5bdca8cc Mappings: Restrict murmur3 field type to sane options
Disabling doc values or trying to index hash values are not
correct uses of this the murmur3 field type, and just cause
problems.  This disallows changing doc values or index options
for 2.0+.

closes #10465
2015-04-23 21:48:42 -07:00
Robert Muir de109bdb3c Buffer this inputstream out of paranoia. guava copy goes byte-by-byte... 2015-04-23 22:15:16 -04:00
Robert Muir 500c956b45 Remove policy config file, its a resource.
Remove exposed boolean to turn off security.
Add unit test
2015-04-23 22:02:57 -04:00
Robert Muir b2850bff47 remove logging statements for another bikeshed 2015-04-23 21:18:56 -04:00
Zachary Tong 8435d9226f Fix bug in GiantGapWithPrediction, due to "slow start" of double exp 2015-04-23 19:13:58 -04:00
Zachary Tong a218d59ce1 Fix bug where MovAvgReducer would allow NaN's to "corrupt" the moving avg 2015-04-23 17:52:33 -04:00
Zachary Tong 114d10e5a9 [TEST] Restructure MovAvgTests to be more generic, robust 2015-04-23 17:52:33 -04:00
Robert Muir 5d2153fe9b remove stray sop 2015-04-23 16:03:19 -04:00
Robert Muir 573e81d2ea Ensure paths exist (or more permissions are needed later) 2015-04-23 16:01:16 -04:00