1657 Commits

Author SHA1 Message Date
Ryan Ernst
18c519145d Remove unnecessary copies of license and notice files
We moved a lot of repositories into elasticsearch, but in their new
location they retained their LICENSE.txt and NOTICE.txt files. These are
all the same, and having the license and notice and the root of the
repository should be sufficient.
2015-09-18 17:48:30 -07:00
Simon Willnauer
37cff7b01c Add tests and fixes for primitive numeric ctors on TermsQueryBuilder 2015-09-18 22:56:50 +02:00
Simon Willnauer
2305ccef43 Remove forbidden API usage 2015-09-18 22:02:38 +02:00
Colin Goodheart-Smithe
a2334981fa Fix messed up merge 2015-09-18 20:47:05 +02:00
Simon Willnauer
2da1baf546 Merge branch 'master' into feature/query-refactoring 2015-09-18 20:38:15 +02:00
Simon Willnauer
1228a9fe55 Merge branch 'master' into feature/query-refactoring 2015-09-18 20:35:56 +02:00
Jason Tedor
dea7989a0f Move method to CollectionUtils to reduce number of source files 2015-09-18 08:43:17 -04:00
Jason Tedor
702cf7be72 Replace Integers.checkedCast with built-in method 2015-09-18 08:43:17 -04:00
Jason Tedor
f0e20cf594 Remove need for lenient tryParse method 2015-09-18 08:43:17 -04:00
Jason Tedor
c281826702 Remove and forbid use of com.google.common.primitives.Ints
This commit removes and now forbids all uses of
com.google.common.primitives.Ints across the codebase. This is one of
many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-18 08:43:17 -04:00
Colin Goodheart-Smithe
c8d1f7aa67 [TESTS] fix failing tests due to ParsingException rename 2015-09-18 13:28:48 +01:00
Colin Goodheart-Smithe
a8368b5dcd Merge pull request #13631 from s1monw/refactor_query_parsing_exception
Rename QueryParsingException to a more generic ParsingException
2015-09-18 12:30:49 +01:00
Christoph Büscher
c6d254ad7e Add QueryShardException to list in ElasticsearchException 2015-09-18 12:38:56 +02:00
Christoph Büscher
bab9523c56 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/ElasticsearchException.java
2015-09-18 12:05:03 +02:00
Robert Muir
47025defa6 Remove this: we are gonna manage these right 2015-09-18 00:23:06 -04:00
Robert Muir
a5127bb6b0 Fix intellij test logging 2015-09-18 00:16:01 -04:00
Robert Muir
3504fefb6b Add Intellij support for plugins with extra permissions.
graduate this from a hack for insecure plugins to something we can
live with for per-module/plugin permissions, it now works reasonably
in unit tests and with Intellij and Eclipse IDEs.

remove security warnings: we will deal with these issues in a secure
way, if we cannot, then the plugin shouldn't be in our core codebase.
2015-09-17 23:51:51 -04:00
Robert Muir
5e5e10c91b Merge pull request #13645 from rmuir/crazy_test_framework_again
Fix more issues with plugin unit tests and allow running from IDE.
2015-09-17 18:06:22 -04:00
Christoph Büscher
37b46fb79c Query Refactoring: moving validation to constructors and setters
This PR is the second batch in moving the query validation we started
to collect in the validate() method to the corresponding setters
and constructors.
2015-09-17 23:30:42 +02:00
Robert Muir
394b6265c3 Fix more issues with plugin unit tests and allow running from IDE.
This is the more sheisty business along the same lines as
https://github.com/elastic/elasticsearch/pull/13638

1 hour total adding the real functionality, days of wasted time
on simulated fake functionality to satisfy our crazy test framework...

I debugged on the problematic jenkins machine and I think issues are
from parsing the classpath and URL normalization etc (trailing slashes
vs not, etc in URLs). So I simplifed the code, to remove this completely,
inverting the logic so we just use an exclusion list instead of inclusion one.

I also allow tests for these plugins to run from the IDE (works at least for eclipse) too.
At least for eclipse this is even less realistic as it piles all the code (src and test)
into a single codebase, but it means you can *use it* and you just have to run mvn verify
before pushing as always. And as always... best effort.
2015-09-17 17:02:11 -04:00
Chris Earle
dac7a33ff7 Merge pull request #8201 from pickypg/feature/groovy-compile-indy-8184
Enable indy (invokedynamic) compile flag for Groovy scripts by default
2015-09-17 16:43:34 -04:00
Chris Earle
ce50269e0a Removing note about 7u60 from master, which is Java 8+ only 2015-09-17 16:43:22 -04:00
Michael McCandless
3a33388872 Catch IndexWriter 'files do not exist' assertion and throw EngineCreationFailureExc 2015-09-17 16:19:03 -04:00
Robert Muir
ffe50d5021 really get groovy indy working 2015-09-17 16:09:21 -04:00
Robert Muir
3e626d0dd8 add paranoia 2015-09-17 16:09:20 -04:00
Robert Muir
7828460ef6 Give groovy scripts read access to groovy.indy.logging, needed for
IndyInterface bootstrap.
2015-09-17 16:09:20 -04:00
Chris Earle
6a779fc730 Adding support for invokedynamic with Groovy scripts. 2015-09-17 16:09:20 -04:00
Nicholas Knize
9a67d6641b Fix RandomShapeGenerator to retry on JTS Assertion and RandomShapeException
A JTS bug causes a misinterpretation of polygon coordinates leading to an unhelpful "geom" AssertionError. While this assertion occurs approx 0.02% of the time it can lead to a misleading test failure. This patch catches the geom assertion and retries randomShapeCreation. For safety a threshold is set to prevent unlimited retrying - though 1 retry is typically sufficient for correcting the invalid shape.

closes #13551
2015-09-17 13:44:04 -05:00
Nicholas Knize
584aaa08f8 Fix RandomShapeGenerator to retry on JTS Assertion and RandomShapeException
A JTS bug causes a misinterpretation of polygon coordinates leading to an unhelpful "geom" AssertionError. While this assertion occurs approx 0.02% of the time it can lead to a misleading test failure. This patch catches the geom assertion and retries randomShapeCreation. For safety a threshold is set to prevent unlimited retrying - though 1 retry is typically sufficient for correcting the invalid shape.

closes #13551
2015-09-17 13:23:46 -05:00
Robert Muir
7898ba103e Merge pull request #13638 from rmuir/more_realistic_unit_tests_for_plugins_like_this
Better simulate problematic plugins permissions in unit tests.
2015-09-17 12:06:08 -04:00
Robert Muir
0fdc16927e Elaborate more on how this works 2015-09-17 11:51:00 -04:00
Robert Muir
9219af8106 Better simulate problematic plugins permissions in unit tests.
We don't have a plugin .zip for unit tests, so we can't do it
correctly. But we can approximate it better, so that if code
is simply missing an AccessController block at least tests will fail.
2015-09-17 10:17:17 -04:00
Clinton Gormley
312bf5a011 Remove workaround for V2_0_0_beta1 in VersionTests 2015-09-17 15:48:05 +02:00
Clinton Gormley
f20473a2e4 Add version 2.0.0-beta2 2015-09-17 15:41:34 +02:00
Clinton Gormley
a7042fd809 Add bwc indices for 2.0.0-beta1 and 2.0.0-beta2 2015-09-17 15:41:34 +02:00
Simon Willnauer
ec6643b994 bring back fully qualified classname 2015-09-17 14:58:40 +02:00
Simon Willnauer
effaaf0566 Rename QueryParsingException to a more generic ParsingException
this allows us to reuse this exception in more places rather than adding
new ones that are basically just subclasses.
2015-09-17 14:56:21 +02:00
Boaz Leskes
a1e83f6f4f Test: don't use setDaemon in DiscoveryWithServiceDisruptionsIT. 2015-09-17 14:24:48 +02:00
Boaz Leskes
39f86a1abe Test: move LongGCDisruption from Thread.getAllStackTraces() to Thread.enumerate()
To allow it to run without the "modifyThreadGroup" permission.
2015-09-17 14:23:57 +02:00
Christoph Büscher
887399eebf Query Refactoring: moving validation to constructors and setters
This PR is an initial step to move the query validation we started
to collect in the validate() method to the corresponding setters
and constructors.
2015-09-17 13:57:34 +02:00
Martijn van Groningen
1a8495d1d6 tests: Add to ability for a integration test to prevent specific templates from being wiped between tests. 2015-09-17 12:34:46 +02:00
Simon Willnauer
e9713cbb7b Append new exceptions to the end otherwise backporting won't work 2015-09-17 11:14:59 +02:00
Simon Willnauer
af9166d84d Use a dedicated id to serialize EsExceptions instead of it's class name.
Classnames change quickly due to refactorings etc. If that happens in a minor release
we loose the ability to deserialize the exceptoin coming from another node sicne we today
look it up by classname. This change uses a dedicated static id instead of the classname
to lookup the actual class.
2015-09-17 11:08:09 +02:00
Robert Muir
dc0bebada1 Support tests for insecure plugins on systems with multiple fs roots. 2015-09-17 02:30:45 -04:00
Robert Muir
d4e53d8393 fix compilation with ECJ (eclipse IDE etc) 2015-09-16 14:33:39 -04:00
Robert Muir
09d2188869 Merge branch 'master' into kill_more_bogus_permissions 2015-09-16 12:17:43 -04:00
Christoph Büscher
125be0a05f Tests: Fix HighlighterSearchIT#testMultiMatchQueryHighlight, dont use null type 2015-09-16 18:14:53 +02:00
Lee Hinman
37ba02ab21 [TEST] Fix incorrect location for greaterThanOrEqual fix 2015-09-16 10:10:42 -06:00
Robert Muir
ba934c6bee Remove some bogus permissions only needed for tests.
Especially the worst of the worst with thread permissions: for example,
this prevents some code from starting daemon thread that will outlive
the elasticsearch process and hang around doing evil shit.
2015-09-16 12:07:18 -04:00
Alex Ksikes
a3c68f690b Refactors MultiMatchQueryBuilder and Parser
Relates to #10217

This PR is against the query-refactoring branch.

Closes #13405
2015-09-16 13:41:22 +02:00