22954 Commits

Author SHA1 Message Date
Jason Tedor
3748abfd7a Clarify building from sources docs in README
This commit clarifies a few issues with the building from sources docs
in the README:
 - modifies Gradle link to use https
 - version 2.13 of Gradle is required
 - the command "gradle assemble" is the preferred way to only create a
   distribution
 - fixes the specified location of the built distributions

Closes #18991
2016-06-21 07:41:15 -04:00
Sakthipriyan Vairamani
8d5a5e500a file is -> file name (#18994) 2016-06-21 13:20:56 +02:00
Jim Ferenczi
9d685f6876 Fix ut: remap default to classic similarity for indices created before 5.0. 2016-06-21 12:05:44 +02:00
Jim Ferenczi
cc91014dee Merge pull request #18948 from jimferenczi/bm25
Change default similarity to BM25
2016-06-21 11:30:30 +02:00
Jim Ferenczi
423291b6bc Change default similarity to BM25
The default similarity was set to `classic` which refers to TFIDF and has not been moved after the upgrade to Lucene 6.

Though moving to BM25 could have some downside for queries that relies on coordination factor (match_query, multi_match_query) ?

relates #18944
2016-06-21 11:29:36 +02:00
Martijn van Groningen
82f7bfad98 ingest: merged o.e.ingest.core with o.e.ingest and in ingest-common module added o.e.ingest.common package
and moved all code to that package.
2016-06-21 09:24:00 +02:00
Boaz Leskes
4401517b85 Revert #18839 as it causes file leaks
```
   > Throwable #1: java.lang.RuntimeException: file handle leaks: [SeekableByteChannel(/var/lib/jenkins/workspace/elastic+elasticsearch+master+g1gc/core/build/testrun/integTest/J0/temp/org.elasticsearch.search.suggest.CompletionSuggestSearch2xIT_518545A20D129C8C-001/tempDir-001/data/nodes/1/indices/4sTECv6WSJOJsw9L4CGamg/0/index/segments_1), SeekableByteChannel(/var/lib/jenkins/workspace/elastic+elasticsearch+master+g1gc/core/build/testrun/integTest/J0/temp/org.elasticsearch.search.suggest.CompletionSuggestSearch2xIT_518545A20D129C8C-001/tempDir-001/data/nodes/1/indices/4sTECv6WSJOJsw9L4CGamg/0/index/segments_1)]
   > 	at __randomizedtesting.SeedInfo.seed([518545A20D129C8C]:0)
   > 	at org.apache.lucene.mockfile.LeakFS.onClose(LeakFS.java:63)
   > 	at org.apache.lucene.mockfile.FilterFileSystem.close(FilterFileSystem.java:77)
   > 	at org.apache.lucene.mockfile.FilterFileSystem.close(FilterFileSystem.java:78)
   > 	at java.lang.Thread.run(Thread.java:745)
   > Caused by: java.lang.Exception
   > 	at org.apache.lucene.mockfile.LeakFS.onOpen(LeakFS.java:46)
   > 	at org.apache.lucene.mockfile.HandleTrackingFS.callOpenHook(HandleTrackingFS.java:81)
   > 	at org.apache.lucene.mockfile.HandleTrackingFS.newByteChannel(HandleTrackingFS.java:271)
   > 	at org.apache.lucene.mockfile.FilterFileSystemProvider.newByteChannel(FilterFileSystemProvider.java:212)
   > 	at org.apache.lucene.mockfile.HandleTrackingFS.newByteChannel(HandleTrackingFS.java:240)
   > 	at java.nio.file.Files.newByteChannel(Files.java:361)
   > 	at java.nio.file.Files.newByteChannel(Files.java:407)
   > 	at org.apache.lucene.store.SimpleFSDirectory.openInput(SimpleFSDirectory.java:77)
   > 	at org.apache.lucene.store.FilterDirectory.openInput(FilterDirectory.java:94)
   > 	at org.apache.lucene.util.LuceneTestCase.slowFileExists(LuceneTestCase.java:2695)
   > 	at org.apache.lucene.store.MockDirectoryWrapper.openInput(MockDirectoryWrapper.java:737)
   > 	at org.apache.lucene.store.FilterDirectory.openInput(FilterDirectory.java:94)
   > 	at org.elasticsearch.common.lucene.Lucene$1.doBody(Lucene.java:237)
   > 	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:685)
   > 	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:637)
   > 	at org.elasticsearch.common.lucene.Lucene.checkSegmentInfoIntegrity(Lucene.java:242)
   > 	at org.elasticsearch.index.store.Store$MetadataSnapshot.loadMetadata(Store.java:847)
   > 	at org.elasticsearch.index.store.Store$MetadataSnapshot.<init>(Store.java:740)
   > 	at org.elasticsearch.index.store.Store.getMetadata(Store.java:260)
   > 	at org.elasticsearch.index.store.Store.getMetadata(Store.java:240)
   > 	at org.elasticsearch.index.shard.IndexShard.doCheckIndex(IndexShard.java:1310)
   > 	at org.elasticsearch.common.util.CancellableThreads.executeIO(CancellableThreads.java:102)
   > 	at org.elasticsearch.index.shard.IndexShard.checkIndex(IndexShard.java:1288)
   > 	at org.elasticsearch.index.shard.IndexShard.internalPerformTranslogRecovery(IndexShard.java:921)
   > 	at org.elasticsearch.index.shard.IndexShard.skipTranslogRecovery(IndexShard.java:964)
   > 	at org.elasticsearch.indices.recovery.RecoveryTarget.prepareForTranslogOperations(RecoveryTarget.java:297)
   > 	at
   ```
2016-06-21 08:45:46 +02:00
Jason Tedor
b15bada2c8 Fix newlines in README 2016-06-20 22:14:53 -04:00
Jason Tedor
a3e5aeea95 Add link to Discourse and IRC to 2016-06-20 22:11:18 -04:00
Robert Muir
1b7d35e4a7 Merge pull request #18983 from rmuir/lambda_types
Infer lambda arguments/return type
2016-06-20 17:22:04 -04:00
Robert Muir
1cc0264827 Infer lambda arguments/return type 2016-06-20 14:54:45 -04:00
Mike McCandless
eecf094ac1 add indices nodes info flag to docs 2016-06-20 14:23:32 -04:00
Mike McCandless
ebc3c17c34 add indices flag to nodes info request; use boolean to express 'null' indexing buffer value on the wire 2016-06-20 14:20:23 -04:00
Robert Muir
e0a8213deb Merge pull request #18958 from rmuir/explicit_casts
Fix explicit casts and improve tests.
2016-06-20 13:40:11 -04:00
Robert Muir
fea120b073 Merge branch 'master' into explicit_casts 2016-06-20 13:39:13 -04:00
Robert Muir
006829e89b add simple arguments test 2016-06-20 13:33:51 -04:00
Robert Muir
09305a0f98 Merge pull request #18954 from rmuir/lambda_captures
Painless: add lambda captures
2016-06-20 13:05:55 -04:00
Robert Muir
26a73c39bf throw error if the tree is totally malformed 2016-06-20 13:01:59 -04:00
David Pilato
cb8073e990 Wrong name for values field
We wrote that the document is:

```json
{
  "value" : ["foo", "bar", "baz"]
}
```

But the processor is using a `values` field:

```json
{
  "foreach" : {
    "field" : "values",
    "processors" : [
      // ...
    ]
  }
}
```

It should be `values`.
2016-06-20 18:58:41 +02:00
Nik Everett
6569d35094 Fail doc tests when any shard fails
ES only sends a non-200 response all shards fail but we should
fail the tests generated by docs if any of them fail.

Depending on the outcome of #18978 this might be a temporary
workaround.
2016-06-20 12:49:30 -04:00
Simon Willnauer
9196ff255e Add extra ctor to FilterClient to support Guice proxies
just don't ask it's bad but some plugins are so involved they need this.

Closes #the_issue_that_never_existed
2016-06-20 16:47:24 +02:00
Robert Muir
9510a8f39e add a few more tests 2016-06-20 10:46:23 -04:00
Eric Sherman
0660de7472 Update snapshots.asciidoc (#18923) 2016-06-20 16:00:59 +02:00
Simon Willnauer
5746d96f42 Catch ClosedByInterruptException when interrupting check index 2016-06-20 14:37:13 +02:00
Robert Muir
28b1b149ab remove unused import 2016-06-20 08:32:53 -04:00
Robert Muir
9111ed3e2c add docs 2016-06-20 08:24:41 -04:00
Robert Muir
cd1a7b441c Improve error messages for lambdas when the number of arguments is wrong 2016-06-20 07:57:00 -04:00
Adrien Grand
93415d4506 Expose MMapDirectory.preLoad(). #18880
The MMapDirectory has a switch that allows the content of files to be loaded
into the filesystem cache upon opening. This commit exposes it with the new
`index.store.pre_load` setting.
2016-06-20 13:42:56 +02:00
Simon Willnauer
459665914b Detach BigArrays from Guice (#18973)
BigArrays can be fully constructed without Guice, this change cleans up
it's creation and the mocking in MockNode.
2016-06-20 13:18:19 +02:00
Simon Willnauer
9506f60504 Improve error message if a setting is not found (#18920)
Today we only emit that the setting wasn't found unless we have
some DYM suggestions. Yet, if a setting is not found at all and there
are no suggestions due to typos it's likely a removed setting or the plugin
that is supposed to be configured is not installed.
This commit adds some info text to the exception to help the user debugging
the problem before opening bugreports.

Instead of emitting:

`unknown setting [foo.bar]`

we now emit:

`unknown setting [foo.bar] please check the migration guide for removed settings and ensure that the plugin you are configuring is installed`

Relates to #18663
2016-06-20 13:10:35 +02:00
Boaz Leskes
0cb4e574a9 index shard should be able to cancel check index on close. (#18839)
If someone sets `index.shard.check_on_startup`, indexing start up time can be slow (by design, it diligently goes and checks all data). If for some reason the shard is closed in that time, the store ref is kept around and prevents a new shard copy to be allocated to this node via the shard level locks. This is especially tricky if the shard is close due to a cancelled recovery which may re-restart soon.

This commit adds a cancellable threads instance to each IndexShard and perform index checking underneath it, so it can be cancelled on close.
2016-06-20 12:16:22 +02:00
Simon Willnauer
1adcd52904 Merge pull request #18969 from s1monw/remove_version_module
Remove a bunch of unneeded Modules
2016-06-20 12:15:29 +02:00
Simon Willnauer
e50314bb6e Remove NodeClientModule and PluginsModule 2016-06-20 11:53:07 +02:00
Simon Willnauer
fb713774a1 Don't create enviroment more than once 2016-06-20 11:45:52 +02:00
Simon Willnauer
cfa4689445 Share test injector creation 2016-06-20 11:38:48 +02:00
Robert Muir
4d78be5b9e remove arity restriction (as def call incorporates all lambdas and all their captures) 2016-06-20 05:37:31 -04:00
Simon Willnauer
7fea5bd8e7 Remove obsolete Modules that can simply be inlined in node creation 2016-06-20 11:28:14 +02:00
Robert Muir
b53d735602 Function/Lambda parameters do not need to be lenient... 2016-06-20 05:05:34 -04:00
Simon Willnauer
260f38fd76 Remove VersionModule and use Version#current consistently.
We pretended to be able to ackt like a different version node for so long it's
time to be honest and remove this ability. It's just confusing and where needed
and tested we should build dedicated extension points.
2016-06-20 10:55:52 +02:00
Tanguy Leroux
98951b1203 Compile each Groovy script in its own classloader
closes #18572
2016-06-20 08:17:09 +02:00
Florian Hopf
6b46bf13f0 Throw if the local node is not set
This commit adds an IllegalStateException if attempting to get the local
node from the cluster service when it is not set.

Relates #18963
2016-06-19 17:25:18 -04:00
Robert Muir
92bc29266b Merge pull request #18960 from uschindler/forbiddenapis-2.2
Update forbiddenapis to 2.2
2016-06-19 17:17:45 -04:00
Uwe Schindler
5475e18ad0 Update forbiddenapis to 2.2 and fix painless tests 2016-06-19 20:40:38 +02:00
Robert Muir
8d9fa7e0b5 Fix explicit casts and improve tests. 2016-06-19 03:19:45 -04:00
Boaz Leskes
8f96dd53aa mark ESIndexLevelReplicationTestCase as abstract so it won't fail naming conventions 2016-06-18 19:39:37 +02:00
Ryan Ernst
9bbf3fc1d9 Build: Require exactly gradle 2.13
see #18935
2016-06-18 10:27:48 -07:00
Boaz Leskes
61b7f49ed2 ESIndexLevelReplicationTestCase.java fix line lengths 2016-06-18 19:13:50 +02:00
Boaz Leskes
14cd8a6794 Introduce Replication unit tests using real shards (#18930)
This commit introduce unit testing infrastructure to test replication operations using real index shards. This is infra is complementary to the full integration tests and unit testing of ReplicationOperation we already have. The new ESIndexLevelReplicationTestCase base makes it easier to test and simulate failure mode that require real shards and but do not need the full blow stack of a complete node.

The commit also add a simple "nothing is wrong" test plus a test that checks we don't drop docs during the various stages of recovery.

For now, only single doc indexing is supported but this can be easily extended in the future.
2016-06-18 18:53:47 +02:00
Boaz Leskes
535a245354 testSingleBatchSubmission - random numbers don't have to be unique 2016-06-18 18:44:54 +02:00
Simon Willnauer
4cb2bb635b Remove forked joda time BaseDateTime class (#18953)
This class was forked in 0.20 to remove a volatile keyword. While there
is no issue attached to the commit, no evidence of the criticality of the
change nor does it seem to be correct since we set this value internally as well
I think this class should be used as is from joda time even if we have to pay
the price of volatile reads. We can't do 3rd party optimization in our codebase that
way it just not maintainable.

This was added in 2280915d3cc3e9fe0fe5fab57ae57774e9044af7
2016-06-18 17:06:18 +02:00