Commit Graph

14073 Commits

Author SHA1 Message Date
David Pilato 02874ea411 [build] explicitly add http-client dependency
As discussed in the PR https://github.com/elastic/elasticsearch/pull/12036#issuecomment-119584570
2015-07-08 16:17:27 +02:00
David Pilato 88cf29b903 [build] cloud-aws doesn't register s3 repos anymore
Reported in https://github.com/elastic/elasticsearch/issues/11647#issuecomment-118523861

> btw, I think you broke some plugins on Master, cloud-aws doesn't register s3 repos anymore.

```
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
  at org.elasticsearch.repositories.s3.S3Repository.<init>(Unknown Source)
  while locating org.elasticsearch.repositories.s3.S3Repository
  while locating org.elasticsearch.repositories.Repository

1 error
	at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
	at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
	at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
	at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:140)
	at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69)
	at org.elasticsearch.repositories.RepositoriesService.createRepositoryHolder(RepositoriesService.java:404)
	at org.elasticsearch.repositories.RepositoriesService.registerRepository(RepositoriesService.java:368)
	at org.elasticsearch.repositories.RepositoriesService.access$100(RepositoriesService.java:55)
	at org.elasticsearch.repositories.RepositoriesService$1.execute(RepositoriesService.java:110)
	at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:378)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:209)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:179)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
	at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:129)
	at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:432)
	at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:414)
	at org.elasticsearch.cloud.aws.InternalAwsS3Service.getClient(InternalAwsS3Service.java:153)
	at org.elasticsearch.cloud.aws.InternalAwsS3Service.client(InternalAwsS3Service.java:82)
	at org.elasticsearch.repositories.s3.S3Repository.<init>(S3Repository.java:125)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:56)
	at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
	at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)
	at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:54)
	at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
	at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)
	at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
	at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
	at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)
	at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)
	at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
	at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:858)
	at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
	at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
	... 13 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 37 more
```

Closes #12034.
2015-07-08 15:37:24 +02:00
David Pilato 9519100eca [test] fix missing REST specs
Something went wrong with my last commit.

Fixing it here.
2015-07-08 15:22:43 +02:00
David Pilato 97019ce3e9 [python] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato c99bc81bdd [Javascript] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato 19b2e77bc2 [Stempel] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato 7a1255d520 [Smartcn] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 15:19:26 +02:00
David Pilato 4738fa04b1 [ICU] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091

Tests can use more than one JVM

We don't need anymore to set the number of jvm to run tests as we moved IT to Rest Tests
For all plugins but cloud plugins which will require another way for running integration tests.
2015-07-08 15:19:26 +02:00
Tanguy Leroux 1c5d8efd47 Process Stats: remove sigar specific stats from APIs and add JMX implementation 2015-07-08 15:12:45 +02:00
Simon Willnauer f9a45fd605 Cleanup ShardRoutingState uses and hide implementation details of ClusterInfo 2015-07-08 14:36:26 +02:00
Shay Banon 097b132238 Consolidate ShardRouting construction
Simplify and consolidate ShardRouting construction. Make sure that there is really only one place it gets created, when a shard is first created in unassigned state, and from there on, it is either copy constructed or built internally as a target for relocation.
This change helps make sure within our codebase data carries over by the ShardRouting is not lost as the shard goes through transitions, and can help simplify the addition of more data on it (like uuid).
For testing, a centralized TestShardRouting allows to create testable versions of ShardRouting, that are not needed to be as strict as the non test codebase. This can be cleanup more later on, but it is a good start.
closes #12125
2015-07-08 14:15:28 +02:00
Alex Ksikes a6c0007325 Fix FuzzyQuery to properly handle Object, number, dates or String.
This makes FuzzyQueryBuilder and Parser take an Object as a value using the
same logic as termQuery, so that numbers, dates or Strings would be properly
handled.

Relates #11865
Closes #12020
2015-07-08 10:41:03 +02:00
David Pilato 786d034d75 [phonetic] move integration tests to REST tests
Fix for #12095
2015-07-08 10:17:43 +02:00
David Pilato b970fbacee [phonetic] move integration tests to REST tests
We can keep only unit tests in plugins instead of starting each time a local node and running tests against it.

Also follow up of #12091
2015-07-08 10:04:18 +02:00
Simon Willnauer b5452074a3 [TEST] Only sanitly check time values in stats
Testing the actual time value even with lowerbounds is very tricky
and fails very often. We should really just sanity check the values.
2015-07-08 10:02:24 +02:00
Tanguy Leroux 26fd4ba95b Docs: fix wrong title level 2015-07-08 09:29:21 +02:00
Robert Muir fd1f63529a Merge pull request #12117 from rmuir/windows_integ_tests
Get integration tests working on windows.
2015-07-08 02:58:13 -04:00
Robert Muir 8ef73b7dba Get integration tests working on windows.
We also run our license checker in `mvn verify`, but there
are problems with checksum calculation on windows there, so I've
disabled the license checker on windows to prevent those false fails.
2015-07-08 02:40:00 -04:00
Robert Muir 5c53f516ca Merge pull request #12112 from rmuir/fixtophints
Fix tophints noise.
2015-07-08 00:56:09 -04:00
Robert Muir 8f0b7164b7 Fix tophints noise.
previously this was done wrong, junit4 ant tasks were brought into
the test classpath. This created jar hell for tests, and also encouraged
people to use _internal_ stuff like its bundled guava in tests.

also the task was set to be lenient and ignore errors. And we were
passing in a messload of unnecessary classpaths to run this. It
only needs the module classpath: the explicit ant dependencies we declare.
2015-07-08 00:45:02 -04:00
Ryan Ernst 8d9053a841 Merge pull request #12089 from rjernst/refactor/field-mapper-collapse
Remove AbstractFieldMapper
2015-07-07 21:36:47 -07:00
Robert Muir 2111385607 Merge pull request #12111 from rmuir/printPID
print PID when starting ES in integ tests too.
2015-07-08 00:24:37 -04:00
Robert Muir fcddec532a Use extract-pid when killing, too 2015-07-08 00:10:25 -04:00
Robert Muir 7a9f74de80 print PID when starting ES in integ tests too. 2015-07-08 00:04:27 -04:00
Ryan Ernst a7df6eecdb Merge pull request #12109 from rjernst/fix/jar-hell-path
Change JarHell to operate on Path instead of URL
2015-07-07 20:19:14 -07:00
Ryan Ernst 8c45c7f482 Internal: Change JarHell to operate on Path instead of URL
This converts the tracking of jars and classes in JarHell to use
Path objects, instead of URL. This makes for nicer printing
of the underlying path when an error does occur.
2015-07-07 20:14:23 -07:00
Robert Muir fb62d945aa isolate integ tests a little better.
They are mostly just ES clients, but we can set tempdir and the usual
stuff to contain them better.
2015-07-07 23:10:18 -04:00
Ryan Ernst bab1323d1e Fix JarHell check to properly convert URL to Path so it can be compared
to java.home
2015-07-07 19:44:15 -07:00
Robert Muir ba96dc3616 Merge pull request #12107 from rmuir/harden_integration_tests
Harden integration tests setup/teardown more
2015-07-07 21:05:06 -04:00
Robert Muir 2cf7adf731 Merge branch 'master' into harden_integration_tests 2015-07-07 20:14:50 -04:00
Jason Tedor 83f6587e61 Default fuzzy transpositions to true
This commit defaults fuzzy_transpositions on fuzzy queries to true. This means that by default, tranpositions will now count as a single
edit.

Closes #9278
2015-07-07 20:13:56 -04:00
Robert Muir 85a25bdf73 harden logic around integ test workspace and process mgmt
there is more to do here, but this is already a lot more robust.

* don't clean workspace in teardown, it might be useful for debugging if stuff fails.
* kill ES/clean workspace in setup, so things always work even in the case of ^C
* use pidfile to kill
* fail if kill errors
* refactor a bit more logic here
2015-07-07 20:11:50 -04:00
Ryan Ernst 6eacbf764d Merge pull request #12106 from rjernst/tests/jar-hell
Tests: Add unit tests for JarHell
2015-07-07 16:58:31 -07:00
Ryan Ernst 35b76ca081 Tests: Add unit tests for JarHell 2015-07-07 16:54:03 -07:00
Robert Muir 0d8faabdf1 Merge pull request #12104 from rmuir/harden_integration_tests
Integ setup should unzip org.elasticsearch:elasticsearch:zip
2015-07-07 19:15:38 -04:00
Robert Muir 5884628049 Integ setup should unzip org.elasticsearch:elasticsearch:zip
This property is set by maven, and unlike the current hack, during
a multimodule build will be set to the correct thing.

Otherwise today sometimes we run integ tests with outdated ES
artifacts, which makes for incredibly confusing failures.

Closes #12101
2015-07-07 19:04:46 -04:00
Robert Muir 26f544ff94 Merge pull request #12102 from rmuir/bouncy
Allow use of bouncycastle
2015-07-07 18:15:48 -04:00
Robert Muir 46c89f006d Allow use of bouncycastle 2015-07-07 17:43:35 -04:00
Robert Muir 27b8e59c24 remove temporary leniency 2015-07-07 17:35:16 -04:00
Jack Conradson 6dbf56fe99 Simplify CacheKey used for scripts
Replaced the CacheKey class with a static method that returns a String.
The class was overkill.

closes #12092
2015-07-07 14:20:03 -07:00
Robert Muir 99ab4e70c0 wait for yellow in integration tests. closes #12099 2015-07-07 17:11:29 -04:00
Areek Zillur 71a6d6d5e9 Merge branch 'master' of github.com:elasticsearch/elasticsearch 2015-07-07 17:00:04 -04:00
Tanguy Leroux 44efbf2770 Renaming FsStats to FsInfo 2015-07-07 22:50:15 +02:00
Areek Zillur 4849e76275 Currently when an engine is failed, it is marked as corrupted regardless of
the failure type. This change marks the engine as corrupted only when the failure
is caused by an actual index corrruption. When an engine is failed for other
reasons, the engine is only closed without removing the shard state.

closes #11788
2015-07-07 16:48:18 -04:00
Tanguy Leroux fbcf4dbbf7 FS Stats: remove sigar specific stats from APIs:
- fs.*.disk_reads
- fs.*.disk_writes
- fs.*.disk_io_op
- fs.*.disk_read_size_in_bytes
- fs.*.disk_write_size_in_bytes
- fs.*.disk_io_size_in_bytes
- fs.*.disk_queue
- fs.*.disk_service_time
2015-07-07 22:16:39 +02:00
Robert Muir 7dbc5c7ab9 Merge pull request #12093 from rmuir/no_fucking_way
Give a better exception when a jar contains same classfile twice.
2015-07-07 16:13:12 -04:00
Zachary Tong c898dd252b [DOCS] Update section about gap_policy 2015-07-07 15:40:15 -04:00
Tanguy Leroux 30892c4129 Remove network stats & info 2015-07-07 21:16:42 +02:00
Clinton Gormley 50ec1b1f8e Merge pull request #12091 from clintongormley/plugin_rest_tests
Plugin rest tests for analysis-phonetic, cloud-*, and lang-*
2015-07-07 19:27:17 +02:00
Robert Muir 1994dbde15 Give a better exception when a jar contains same classfile twice.
And ignore the known issue with xmlbeans for now... though it may
cause us issues ultimately: https://issues.apache.org/jira/browse/XMLBEANS-499
2015-07-07 13:26:54 -04:00