parent
9cc331b12d
commit
4a1cbd2f63
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-cloud-aws</artifactId>
|
||||
<version>1.17.0-SNAPSHOT</version>
|
||||
<version>2.0.0.RC1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<description>AWS Cloud plugin for ElasticSearch</description>
|
||||
<inceptionYear>2009</inceptionYear>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<elasticsearch.version>0.90.10</elasticsearch.version>
|
||||
<elasticsearch.version>1.0.0.RC1-SNAPSHOT</elasticsearch.version>
|
||||
<lucene.version>4.6.0</lucene.version>
|
||||
<tests.output>onerror</tests.output>
|
||||
<tests.jvms>1</tests.jvms>
|
||||
|
|
|
@ -25,8 +25,8 @@ import com.amazonaws.auth.*;
|
|||
import com.amazonaws.internal.StaticCredentialsProvider;
|
||||
import com.amazonaws.services.ec2.AmazonEC2;
|
||||
import com.amazonaws.services.ec2.AmazonEC2Client;
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.ElasticSearchIllegalArgumentException;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
||||
import org.elasticsearch.cloud.aws.network.Ec2NameResolver;
|
||||
import org.elasticsearch.cloud.aws.node.Ec2CustomNodeAttributes;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodeService;
|
||||
|
@ -66,7 +66,7 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
|||
} else if ("https".equals(protocol)) {
|
||||
clientConfiguration.setProtocol(Protocol.HTTPS);
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("No protocol supported [" + protocol + "], can either be [http] or [https]");
|
||||
throw new ElasticsearchIllegalArgumentException("No protocol supported [" + protocol + "], can either be [http] or [https]");
|
||||
}
|
||||
String account = componentSettings.get("access_key", settings.get("cloud.account"));
|
||||
String key = componentSettings.get("secret_key", settings.get("cloud.key"));
|
||||
|
@ -78,7 +78,7 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
|||
try {
|
||||
proxyPort = Integer.parseInt(portString, 10);
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex);
|
||||
throw new ElasticsearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex);
|
||||
}
|
||||
clientConfiguration.withProxyHost(proxyHost).setProxyPort(proxyPort);
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
|||
} else if (region.equals("sa-east") || region.equals("sa-east-1")) {
|
||||
endpoint = "ec2.sa-east-1.amazonaws.com";
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("No automatic endpoint could be derived from region [" + region + "]");
|
||||
throw new ElasticsearchIllegalArgumentException("No automatic endpoint could be derived from region [" + region + "]");
|
||||
}
|
||||
if (endpoint != null) {
|
||||
logger.debug("using ec2 region [{}], with endpoint [{}]", region, endpoint);
|
||||
|
@ -136,15 +136,15 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() throws ElasticSearchException {
|
||||
protected void doStart() throws ElasticsearchException {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStop() throws ElasticSearchException {
|
||||
protected void doStop() throws ElasticsearchException {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doClose() throws ElasticSearchException {
|
||||
protected void doClose() throws ElasticsearchException {
|
||||
if (client != null) {
|
||||
client.shutdown();
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ import com.amazonaws.auth.*;
|
|||
import com.amazonaws.internal.StaticCredentialsProvider;
|
||||
import com.amazonaws.services.s3.AmazonS3;
|
||||
import com.amazonaws.services.s3.AmazonS3Client;
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.ElasticSearchIllegalArgumentException;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
||||
import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
@ -58,7 +58,7 @@ public class AwsS3Service extends AbstractLifecycleComponent<AwsS3Service> {
|
|||
} else if ("https".equals(protocol)) {
|
||||
clientConfiguration.setProtocol(Protocol.HTTPS);
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("No protocol supported [" + protocol + "], can either be [http] or [https]");
|
||||
throw new ElasticsearchIllegalArgumentException("No protocol supported [" + protocol + "], can either be [http] or [https]");
|
||||
}
|
||||
String account = componentSettings.get("access_key", settings.get("cloud.account"));
|
||||
String key = componentSettings.get("secret_key", settings.get("cloud.key"));
|
||||
|
@ -70,7 +70,7 @@ public class AwsS3Service extends AbstractLifecycleComponent<AwsS3Service> {
|
|||
try {
|
||||
proxyPort = Integer.parseInt(portString, 10);
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new ElasticSearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex);
|
||||
throw new ElasticsearchIllegalArgumentException("The configured proxy port value [" + portString + "] is invalid", ex);
|
||||
}
|
||||
clientConfiguration.withProxyHost(proxyHost).setProxyPort(proxyPort);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public class AwsS3Service extends AbstractLifecycleComponent<AwsS3Service> {
|
|||
} else if ("sa-east-1".equals(region)) {
|
||||
endpoint = "s3-sa-east-1.amazonaws.com";
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("No automatic endpoint could be derived from region [" + region + "]");
|
||||
throw new ElasticsearchIllegalArgumentException("No automatic endpoint could be derived from region [" + region + "]");
|
||||
}
|
||||
if (endpoint != null) {
|
||||
logger.debug("using s3 region [{}], with endpoint [{}]", region, endpoint);
|
||||
|
@ -138,15 +138,15 @@ public class AwsS3Service extends AbstractLifecycleComponent<AwsS3Service> {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() throws ElasticSearchException {
|
||||
protected void doStart() throws ElasticsearchException {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStop() throws ElasticSearchException {
|
||||
protected void doStop() throws ElasticsearchException {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doClose() throws ElasticSearchException {
|
||||
protected void doClose() throws ElasticsearchException {
|
||||
if (client != null) {
|
||||
client.shutdown();
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
package org.elasticsearch.gateway.s3;
|
||||
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.ElasticSearchIllegalArgumentException;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
||||
import org.elasticsearch.cloud.aws.AwsS3Service;
|
||||
import org.elasticsearch.cloud.aws.blobstore.S3BlobStore;
|
||||
import org.elasticsearch.cluster.ClusterName;
|
||||
|
@ -53,7 +53,7 @@ public class S3Gateway extends BlobStoreGateway {
|
|||
|
||||
String bucket = componentSettings.get("bucket");
|
||||
if (bucket == null) {
|
||||
throw new ElasticSearchIllegalArgumentException("No bucket defined for s3 gateway");
|
||||
throw new ElasticsearchIllegalArgumentException("No bucket defined for s3 gateway");
|
||||
}
|
||||
|
||||
String region = componentSettings.get("region");
|
||||
|
@ -98,7 +98,7 @@ public class S3Gateway extends BlobStoreGateway {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doClose() throws ElasticSearchException {
|
||||
protected void doClose() throws ElasticsearchException {
|
||||
super.doClose();
|
||||
concurrentStreamPool.shutdown();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue