83 Commits

Author SHA1 Message Date
David Pilato
c20371aa8f Support new method BlobContainer#move()
This has been added in elasticsearch 2.0.0. See elasticsearch/elasticsearch#8782

Wondering if this PR should be split in two parts:

* one that clean the code and which is portable to 1.4, 1.x and master
* one that simply add move() method for master branch

@imotov WDYT?

Closes #49.
2015-02-12 18:55:51 +01:00
David Pilato
b91f5da2b2 Failure when creating a container should raise an exception
When you remove a container from Azure console, even if Azure told you that it has been done, it appears to be an asynchronous deletion so you can hit error like `can not initialize container [elasticsearch-snapshots]: [The specified container is being deleted. Try operation later.]` but this error does not fail the repository creation...

Related to #54.

(cherry picked from commit e483304)
(cherry picked from commit 520444c)
2015-02-12 18:47:34 +01:00
David Pilato
b7b8db97c7 [package] stax-api is added twice
Library stax-api is added twice in final ZIP file.
It's due to the dependency tree.

```
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ elasticsearch-cloud-azure ---
[INFO] org.elasticsearch:elasticsearch-cloud-azure:jar:2.5.2-SNAPSHOT
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3.RC2:test
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3.RC2:test
[INFO] +- com.carrotsearch.randomizedtesting:randomizedtesting-runner:jar:2.1.10:test
[INFO] |  \- junit:junit:jar:4.10:test
[INFO] +- org.apache.lucene:lucene-test-framework:jar:4.10.2:test
[INFO] |  +- org.apache.lucene:lucene-codecs:jar:4.10.2:test
[INFO] |  +- org.apache.lucene:lucene-core:jar:4.10.2:compile
[INFO] |  +- com.carrotsearch.randomizedtesting:junit4-ant:jar:2.1.6:test
[INFO] |  \- org.apache.ant🐜jar:1.8.2:test
[INFO] +- org.elasticsearch:elasticsearch:jar:1.4.2:compile
[INFO] |  +- org.apache.lucene:lucene-analyzers-common:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-queries:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-memory:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-highlighter:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-queryparser:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-sandbox:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-suggest:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-misc:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-join:jar:4.10.2:compile
[INFO] |  +- org.apache.lucene:lucene-grouping:jar:4.10.2:compile
[INFO] |  \- org.apache.lucene:lucene-spatial:jar:4.10.2:compile
[INFO] |     \- com.spatial4j:spatial4j:jar:0.4.1:compile
[INFO] +- com.microsoft.windowsazure:microsoft-windowsazure-api:jar:0.4.6:compile
[INFO] |  +- com.sun.jersey:jersey-client:jar:1.13:compile
[INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.13:compile
[INFO] |  +- javax.inject:javax.inject🫙1:compile
[INFO] |  +- com.sun.jersey:jersey-json:jar:1.13:compile
[INFO] |  |  +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] |  |  |  \- stax:stax-api:jar:1.0.1:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] |  |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] |  |  |     \- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:compile
[INFO] |  |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:compile
[INFO] |  |  \- org.codehaus.jackson:jackson-xc:jar:1.9.2:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  +- javax.mail:mail:jar:1.4.5:compile
[INFO] |  |  \- javax.activation:activation:jar:1.1:compile
[INFO] |  \- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] \- org.elasticsearch:elasticsearch:test-jar:tests:1.4.2:test
```

We should exclude `javax.xml.stream:stax-api:jar:1.0-2:compile` from `com.microsoft.windowsazure:microsoft-windowsazure-api:jar:0.4.6:compile`

Closes #56.

(cherry picked from commit 68efe93)
(cherry picked from commit 68f25d1)
2015-02-04 15:38:41 +01:00
David Pilato
7c27d53ee1 [cleanup] collapse identical catch blocks
With Java7, you don't need multiple identical catch blocks anymore

Related to #52.

(cherry picked from commit 322e1e5)
(cherry picked from commit 9d3b0ad)
2015-02-04 14:55:16 +01:00
David Pilato
0e81e351c2 [cleanup] use diamond operator
With Java 7, we can change `Set<Instance> = new HashSet<Instance>()` to `Set<Instance> = new HashSet<>()`

Related to #52.

(cherry picked from commit 0c709de)
(cherry picked from commit 4f474f5)
2015-02-04 14:54:08 +01:00
David Pilato
d11a813bce [cleanup] remove useless ;
Related to #52.

(cherry picked from commit 0899438)
(cherry picked from commit d1a9b0b)
2015-02-04 14:53:52 +01:00
David Pilato
eaf3fbc6d7 [cleanup] simplify logging debug/trace code
[logging] don't use anymore `if (logger.isTraceEnabled())` or `if (logger.isDebugEnabled())`

Related to #52.

(cherry picked from commit 95381d4)
(cherry picked from commit 6d5ce44)
2015-02-04 14:53:41 +01:00
David Pilato
68fdedf91d [cleanup] Change Logger factory
Related to #52

(cherry picked from commit a6435ab)
(cherry picked from commit f82ee58)
2015-02-04 14:53:27 +01:00
David Pilato
3afe59ff69 Move AzureUnicastHostsProvider to AzureDiscoveryModule
Related to elasticsearch/elasticsearch#9099

Closes #48
2015-01-14 17:04:51 +01:00
David Pilato
dee924bb05 Depend on elasticsearch-parent
To simplify plugins maintenance and provide more value in the future, we are starting to build an `elasticsearch-parent` project. This commit is the first step for this plugin to depend on this new `pom` maven project.
2015-01-02 21:46:55 +01:00
Adrien Grand
3e612ed3e2 Upgrade to Lucene 5.0.0-snapshot-1642891 2014-12-02 18:19:45 +01:00
David Pilato
69107b5ae6 update documentation with release 2.5.1 2014-11-24 18:17:00 +01:00
David Pilato
27a12065eb The document recommends a non-durable location for data
I noticed the documentation recommends a non-durable local resource for the Elasticsearch data path.  Although this is acceptable for some deployments it might be worth warning people that the path is not durable and there is a potential for data loss, even with replicas data loss is theoretically possible.

```
# recommended
path.data: /mnt/resource/elasticsearch/data
```

Alternatively the user could attach and use data disks which do come with a significant performance tradeoff, but premium storage options with higher IOPS have been announced and are right around the corner.

Closes #46.
2014-11-24 18:05:21 +01:00
David Pilato
1e71a7e72d UnicastHostsProvider should use version.minimumCompatibilityVersion()
The UnicastHostsProvider implementation creates DiscoveryNodes that are used as an initial seed for unicast based discovery. At the moment it uses Version.CURRENT for those DiscoveryNode object, which confuses the backwards compatibility layer to think this nodes are of the latest version. This causes new nodes to fail to join old nodes as the ping serialization goes wrong. Instead we should use version.minimumCompatibilityVersion().

Closes #47.

(cherry picked from commit 188179f)
2014-11-24 18:00:24 +01:00
Michael McCandless
300320f862 Upgrade to Lucene 5.0.0-snapshot-1641343 2014-11-24 05:52:11 -05:00
David Pilato
f82b7e9060 update documentation with release 2.5.0 2014-11-12 11:02:06 +01:00
David Pilato
6aec0a0545 Activate tests for forbidden names
See #21.
2014-11-12 10:34:33 +01:00
David Pilato
849f64d798 Change in BlobContainer deleteBlob does not return boolean
Due to this change: https://github.com/elasticsearch/elasticsearch/pull/8366

Closes #44.
2014-11-12 10:29:22 +01:00
Michael McCandless
099f9bba21 Upgrade to Lucene 5.0.0-snapshot-1637347 2014-11-10 16:46:26 -05:00
Ryan Ernst
957df9c4e9 Fix constructor for ZenDiscovery's subclass 2014-11-05 15:33:30 -08:00
Robert Muir
8e31e1edf1 upgrade to lucene 5 snapshot (the compile is still broken as it was before, so untested) 2014-11-05 18:01:11 -05:00
David Pilato
ab87790ed7 Docs: more information about certificate management
Closes #33.
2014-10-30 17:27:02 +01:00
David Pilato
9e44ceb904 Update to elasticsearch 1.4.0
Related to #30

(cherry picked from commit 442d06e)
(cherry picked from commit aa27eb9)
2014-10-30 16:11:58 +01:00
David Pilato
3ae755ed9a Tests: upgrade randomizedtesting-runner to 2.1.10
Closes #43.

(cherry picked from commit 6e5efe6)
(cherry picked from commit 675a860)
2014-10-30 16:08:59 +01:00
David Pilato
ca7540f502 Update to Lucene 4.10.2
Closes #42.
2014-10-30 15:45:35 +01:00
David Pilato
6d5ac76eee BlobContainer interface changed in elasticsearch 1.4.0
AWS plugin needs an update because of this change https://github.com/elasticsearch/elasticsearch/pull/7551

Closes #37.
2014-10-30 15:45:07 +01:00
David Pilato
29aae071c4 Replace Strings.startsWithIgnoreCase()
`Strings.startsWithIgnoreCase()` has been removed in elasticsearch 1.4 ans master. See https://github.com/elasticsearch/elasticsearch/pull/7428

Closes #35.
2014-09-05 16:46:09 +02:00
David Pilato
f5d35004a0 ZenDiscovery constructor needs ElectMasterService instance
Introduced in https://github.com/elasticsearch/elasticsearch/pull/7336 (elasticsearch 1.4 and 2.0), we need to change AzureDiscovery constructor.

Closes #34.
2014-09-05 16:45:55 +02:00
David Pilato
b65373b7a1 Use new release tool for elasticsearch plugins
See https://github.com/elasticsearch/elasticsearch-plugins-script
2014-08-05 13:53:17 +02:00
David Pilato
74bd4f7881 Remove unused property 2014-08-05 11:08:26 +02:00
David Pilato
8e71337d04 Update release script
We need also to update README in current release branch.

(cherry picked from commit 42db2fa)
(cherry picked from commit 91d7989)
2014-08-04 22:56:22 +02:00
David Pilato
985e3002b4 Fix installation instructions update 2014-08-04 16:30:31 +02:00
David Pilato
6582d8b42c fix install instruction with version 2.4.0 2014-08-04 16:29:25 +02:00
David Pilato
e08dc71c2f update documentation with release 2.4.0 2014-08-04 16:24:26 +02:00
David Pilato
2f52610522 Update release tool
(cherry picked from commit d56d5fb)
2014-08-04 16:22:22 +02:00
David Pilato
5240576320 Update release tool
(cherry picked from commit b3dd4a7)
2014-08-04 16:12:13 +02:00
David Pilato
19dd764ae5 Update release tool
(cherry picked from commit 288755a)
2014-08-03 13:59:20 +02:00
David Pilato
88ddd31d0b Fix non integration tests
With change #24, non integration can not run anymore.

(cherry picked from commit 76eecc8)
2014-08-03 13:58:59 +02:00
David Pilato
45492c009c Docs: make the welcome page more obvious
One of the concern we have with our documentation is that it's hard for users to understand which plugin version they should use with a given elasticsearch version.

The change will consist of:

* have a clean and simple compatibility matrix on master branch
* remove list of versions in other branches

Closes #29.
2014-08-01 19:21:44 +02:00
David Pilato
3421168164 Docs: make the welcome page more obvious
One of the concern we have with our documentation is that it's hard for users to understand which plugin version they should use with a given elasticsearch version.

The change will consist of:

* have a clean and simple compatibility matrix on master branch
* remove list of versions in other branches

Closes #29.
2014-08-01 18:30:08 +02:00
David Pilato
845e5251b4 Docs: make the welcome page more obvious
One of the concern we have with our documentation is that it's hard for users to understand which plugin version they should use with a given elasticsearch version.

The change will consist of:

* have a clean and simple compatibility matrix on master branch
* remove list of versions in other branches

Closes #29.
2014-08-01 18:19:55 +02:00
David Pilato
3cd0e8929b Add a missing trace to removeContainer 2014-08-01 17:23:21 +02:00
David Pilato
42706653e3 Tests: test GET/DELETE on non existing repo
`GET` and `DELETE` should return `404` error.

Closes #28.
2014-08-01 17:22:59 +02:00
David Pilato
8ea9951e1a Replace 404 with HttpURLConnection.HTTP_NOT_FOUND 2014-08-01 17:06:29 +02:00
David Pilato
248845638a Docs: Generating ssh keys
There's a much better documentation (including using existing OpenSSH keys like most of us already have for git) on the Azure docs, e.g.:

http://azure.microsoft.com/en-us/documentation/articles/linux-use-ssh-key/

Closes #18.
2014-07-31 00:40:47 +02:00
David Pilato
ecd95dab9b Docs: use Oracle Java by default
Installing Oracle JVM is as easy as:

 ```
 echo debconf shared/accepted-oracle-license-v1-1 select true | \
   sudo debconf-set-selections && echo debconf shared/accepted-oracle-license-v1-1 seen true | \
   sudo debconf-set-selections && sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java7-installer
 ```

 See http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

 Closes #19.
2014-07-31 00:31:59 +02:00
David Pilato
6046f172c8 listBlobsByPrefix uses a wrong path
When listing existing blobs for an azure repository, `path` to look at is incorrectly computed which leads to 404 errors.

Closes #26.

(cherry picked from commit 656fadc)
2014-07-31 00:14:34 +02:00
David Pilato
d613f5f097 Wrong exception thrown when snapshot doesn't exist
As for https://github.com/elasticsearch/elasticsearch-cloud-aws/issues/86, we should raise a `SnapshotMissingException`.

Closes #23.

(cherry picked from commit 61ddb60)
2014-07-31 00:14:18 +02:00
David Pilato
976448e339 _ is a forbidden character for container (repository)
According to [Containers naming guide](http://msdn.microsoft.com/en-us/library/dd135715.aspx):

> A container name must be a valid DNS name, conforming to the following naming rules:
>
> * Container names must start with a letter or number, and can contain only letters, numbers, and the dash (-) character.
> * Every dash (-) character must be immediately preceded and followed by a letter or number; consecutive dashes are not permitted in container names.
> * All letters in a container name must be lowercase.
> * Container names must be from 3 through 63 characters long.

We need to fix the documentation and control that before calling Azure API.
The validation will come with issue #27.

Closes #21.

(cherry picked from commit 6531165)
2014-07-31 00:14:05 +02:00
David Pilato
0005eab665 Update to Azure Java SDK 0.4.6
Latest Azure Java SDK is 0.4.6 when looking at http://search.maven.org/#browse%7C-589510877

Closes #25.

(cherry picked from commit 89be7b4)
2014-07-31 00:13:52 +02:00