22511 Commits

Author SHA1 Message Date
javanna
04d620da74 require hosts when creating RestClient.Builder
Also fix order of arguments when using assertEquals
2016-06-08 12:37:50 +02:00
javanna
a78fe1305d require RestClient when creating Sniffer.Builder 2016-06-08 12:37:24 +02:00
Jim Ferenczi
712c77264d Fix ut: make sure that the number of slices is bigger than 1 in the SliceBuilder tests. 2016-06-08 11:51:46 +02:00
javanna
791db1fb48 remove TODO around using /_cat/nodes rather than /_nodes, test compatibility with 2.x
_cat/nodes returns the http address only in 5.x. Would be nice to use as we could drop the jackson dependency, but we care more about being compatible with 2.x.
 Not compatible with previous versions as the format of returned http addresses have changed since 2.0.

Also fixed test bug that caused sporadic failures.
2016-06-08 11:43:02 +02:00
Lee Hinman
762bbdbd0c Revert "Change the default of include_global_state from true to false."
This reverts commit 052a62250ca880f4e5d2746822ac58139b36efda.
2016-06-07 15:07:37 -06:00
Lee Hinman
052a62250c Change the default of include_global_state from true to false.
Resolves #18569
2016-06-07 15:06:20 -06:00
Jack Conradson
be168f528b Merge pull request #18771 from jdconrad/methods
Add Method to Get New MethodWriters
2016-06-07 11:47:29 -07:00
Nik Everett
a405c2ba99 Switch QueryBuilders to new MatchPhraseQueryBuilder
It was doing deprecated things with MatchQueryBuilder.
2016-06-07 14:35:23 -04:00
Jack Conradson
f9b45107c4 Added method to allow creation of new methods on-the-fly. 2016-06-07 11:24:33 -07:00
Robert Muir
90f2aab9a9 Merge pull request #18748 from rmuir/painless_method_references
painless: method reference support
2016-06-07 14:22:49 -04:00
Robert Muir
f23e8c3722 more cleanups 2016-06-07 12:42:19 -04:00
Lee Hinman
32bd869b28 Merge remote-tracking branch 'dakrone/no-cluster-name-in-path' 2016-06-07 10:14:23 -06:00
Lee Hinman
feb244c14a Remove cluster name from data path
Previously Elasticsearch used $DATA_DIR/$CLUSTER_NAME/nodes for the path
where data is stored, this commit changes that to be $DATA_DIR/nodes.

On startup, if the old folder structure is detected it will be used.
This behavior will be removed in Elasticsearch 6.0

Resolves #17810
2016-06-07 10:13:48 -06:00
Jason Tedor
370b198f9f Remove explicit parallel new GC flag
Unless explicitly disabled, the parallel new collector is enabled
automatically as soon as the CMS collector is enabled:

  void Arguments::set_cms_and_parnew_gc_flags() {
    assert(
      !UseSerialGC && !UseParallelOldGC && !UseParallelGC,
      "Error");
    assert(UseConcMarkSweepGC, "CMS is expected to be on here");

    // If we are using CMS, we prefer to UseParNewGC,
    // unless explicitly forbidden.
    if (FLAG_IS_DEFAULT(UseParNewGC)) {
      FLAG_SET_ERGO(bool, UseParNewGC, true);
    }

While it's fine to be explicit, the UseParNewGC flag is deprecatd in JDK
8 and produces warning messages in JDK 9:

  Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was
  deprecated in version 9.0 and will likely be removed in a future
  release.

Thus, we can and should just remove this flag from the default JVM
options.

Relates #18767
2016-06-07 12:05:38 -04:00
Jim Ferenczi
43b419b230 rehash the docvalues in DocValuesSliceQuery using BitMixer.mix instead of the naive Long.hashCode. 2016-06-07 17:58:32 +02:00
Robert Muir
89224dbc3c switch FunctionRef over to methodhandles 2016-06-07 11:56:44 -04:00
Martijn van Groningen
f611f1c99e ingest: Move processors from core to ingest-common module.
Folded grok processor into ingest-common module.

The rest tests have been moved to ingest-common module as well, because these tests don't run in the rest-api-spec module but in the distribution:integ-test-zip module
and adding a test plugin there felt just wrong to me. I think this is ok. I left a tiny ingest rest test behind in that tests with an empty pipeline.

Removed messy tests, these tests were already covered in the rest tests

Added ingest test plugin in test infra so that each module testing integration with ingest doesn't need write its own plugin

Moved reindex ingest tests to qa module

Closes #18490
2016-06-07 17:32:52 +02:00
trangvh
c0da8e4060 Fix some typos (#18746)
* Update java-doc of SearchResponse.getProfileResults()

* Fix a trivial typo in Reference document
2016-06-07 16:41:39 +02:00
Jim Ferenczi
692c42b23a Fix ut 2016-06-07 16:29:18 +02:00
Jim Ferenczi
7f20b3a7ad Merge pull request #18237 from jimferenczi/scroll_by_slice
Add the ability to partition a scroll in multiple slices.
2016-06-07 16:23:57 +02:00
Robert Muir
32965f043a convert FunctionRef/Def usage to methodhandles. 2016-06-07 10:23:49 -04:00
Jim Ferenczi
b9030bf6fe Add the ability to partition a scroll in multiple slices.
API:

```
curl -XGET 'localhost:9200/twitter/tweet/_search?scroll=1m' -d '{
    "slice": {
        "field": "_uid", <1>
        "id": 0, <2>
        "max": 10 <3>
    },
    "query": {
        "match" : {
            "title" : "elasticsearch"
        }
    }
}
```

<1> (optional) The field name used to do the slicing (_uid by default)
<2> The id of the slice

By default the splitting is done on the shards first and then locally on each shard using the _uid field
with the following formula:
`slice(doc) = floorMod(hashCode(doc._uid), max)`
For instance if the number of shards is equal to 2 and the user requested 4 slices then the slices 0 and 2 are assigned
to the first shard and the slices 1 and 3 are assigned to the second shard.

Each scroll is independent and can be processed in parallel like any scroll request.

Closes #13494
2016-06-07 16:21:53 +02:00
Robert Muir
3108c399f0 use painless types in FunctionRef 2016-06-07 09:49:54 -04:00
Christoph Wurm
d71894a226 Update ingest-node.asciidoc
Fixed forgotten rename from `match_formats` to `formats` in documentation (changed in dd2184ab25)
2016-06-07 15:47:38 +02:00
Robert Muir
39550354a7 compute functional interface stuff in Definition 2016-06-07 09:41:03 -04:00
Jason Tedor
c3e3a6337e Use method name in bootstrap check might fork test
This commit modifies the bootstrap check invocations in the might fork
tests to use the underlying test name when setting up the logging prefix
when invoking the bootstrap checks. This is done to give clear logs in
case of failure.
2016-06-07 09:33:17 -04:00
Jason Tedor
75d3b13790 Merge pull request #18756 from jasontedor/on-out-of-memory-error
Bootstrap check for OnOutOfMemoryError and seccomp
2016-06-07 09:26:57 -04:00
Uwe Schindler
3238868cc4 Make checkstyle happy (add Lookup import, line length) 2016-06-07 13:06:23 +02:00
Uwe Schindler
cac111ff73 Don't hide LambdaConversionException and behave like real javac compiled code when a conversion fails. This works anyways, because fallback is allowed to throw any Throwable 2016-06-07 13:00:36 +02:00
Uwe Schindler
6913be2ec2 Pass through the lookup given by invokedynamic to the LambdaMetaFactory. Without it real lambdas won't work, as their implementations are private to script class 2016-06-07 12:32:59 +02:00
Simon Willnauer
c72ebba5de checkstyle have your upper L 2016-06-07 11:05:28 +02:00
Simon Willnauer
0a5e06d402 fix javadocs 2016-06-07 10:22:11 +02:00
Simon Willnauer
b2c4c323e1 Allow _shrink to N shards if source shards is a multiple of N (#18699)
Today we allow to shrink to 1 shard but that might not be possible due to
too many document or a single shard doesn't meet the requirements for the index.
The logic can be expanded to N shards if the source index shards is a multiple of N.
This guarantees that there are not hotspots created due to different number of shards
being shrunk into one.
2016-06-07 10:06:41 +02:00
Jason Tedor
acc9cea8f6 Fix compilation issue in RefreshListenersTests
This commit fixes a compilation issue in RefreshListenersTests that
arose from code being integrated into master, and then a large pull
request refactoring the handling of thread pools was later merged into
master.
2016-06-06 23:26:22 -04:00
Robert Muir
950b093fc7 Merge branch 'master' into painless_method_references 2016-06-06 22:39:28 -04:00
Jason Tedor
e94408c0d2 Bootstrap check for OnError and seccomp
This commit adds a bootstrap check for the JVM option OnError being in
use and seccomp being enabled. These two options are incompatible
because OnError allows the user to specify an arbitrary program to fork
when the JVM encounters an fatal error, and seccomp enables system call
filters that prevents forking.
2016-06-06 22:18:44 -04:00
Jason Tedor
da74323141 Register thread pool settings
This commit refactors the handling of thread pool settings so that the
individual settings can be registered rather than registering the top
level group. With this refactoring, individual plugins must now register
their own settings for custom thread pools that they need, but a
dedicated API is provided for this in the thread pool module. This
commit also renames the prefix on the thread pool settings from
"threadpool" to "thread_pool". This enables a hard break on the settings
so that:
 - some of the settings can be given more sensible names (e.g., the max
   number of threads in a scaling thread pool is now named "max" instead
   of "size")
 - change the soft limit on the number of threads in the bulk and
   indexing thread pools to a hard limit
 - the settings names for custom plugins for thread pools can be
   prefixed (e.g., "xpack.watcher.thread_pool.size")
 - remove dynamic thread pool settings

Relates #18674
2016-06-06 22:09:12 -04:00
Jack Conradson
3dfe2bbcb6 Merge pull request #18757 from jdconrad/each
Static For Each
2016-06-06 18:29:27 -07:00
Jack Conradson
b3804c47f7 Cleaned up SEach node. 2016-06-06 18:21:08 -07:00
Robert Muir
231268c89d remove outdated TODO 2016-06-06 21:04:59 -04:00
Jack Conradson
6dace47c1f Reverted S-node design change. 2016-06-06 17:59:39 -07:00
Robert Muir
8db9a971e5 enable test 2016-06-06 20:30:42 -04:00
Robert Muir
2852e82ab9 add def iteration over arrays 2016-06-06 20:07:32 -04:00
Robert Muir
d331f8768e implement dynamic case for iterables 2016-06-06 19:41:37 -04:00
Jack Conradson
aeaf39f36d Added a for each stub node for a target type of def. 2016-06-06 16:07:12 -07:00
Jack Conradson
a088d367f7 More comments. 2016-06-06 15:58:56 -07:00
Jack Conradson
f897342296 Updated package info documentation. 2016-06-06 15:34:51 -07:00
Jack Conradson
b249dd015d Merge branch 'master' into each 2016-06-06 15:30:21 -07:00
Jack Conradson
9a78f6955b Added foreach for array types. 2016-06-06 15:25:09 -07:00
Robert Muir
23d7cdd043 ban slow methods in MethodHandle 2016-06-06 17:58:00 -04:00