embulk-output-s3 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/output/S3FileOutputPlugin.java +19 -20
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d30bd3aaf8225192a198c2272068b535ff03ae2
|
4
|
+
data.tar.gz: 67c729c619c8d5eb5366f6268719d9e559736be6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8c94a94091c02e2f38c649372b72fb3a37e7f0cb514addc201fe3efe76763757c633b5b9367b4448dde3ecc4f167336dea0458f2d08bb03cf0842e95dc2bb84
|
7
|
+
data.tar.gz: df4d41d74fdd8c0c3bd8fbbb428471f0f99d61fdcaf6f645c6dee633f3359c3c75a7eaf79bdc2361404b5dde6029ffa3c23bd04a5a3533da871539fb8251ac7b
|
data/build.gradle
CHANGED
@@ -46,7 +46,8 @@ public class S3FileOutputPlugin implements FileOutputPlugin {
|
|
46
46
|
public String getBucket();
|
47
47
|
|
48
48
|
@Config("endpoint")
|
49
|
-
|
49
|
+
@ConfigDefault("null")
|
50
|
+
public Optional<String> getEndpoint();
|
50
51
|
|
51
52
|
@Config("access_key_id")
|
52
53
|
@ConfigDefault("null")
|
@@ -79,26 +80,24 @@ public class S3FileOutputPlugin implements FileOutputPlugin {
|
|
79
80
|
|
80
81
|
private static AmazonS3Client newS3Client(PluginTask task) {
|
81
82
|
AmazonS3Client client = null;
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
}
|
83
|
+
|
84
|
+
if (task.getAccessKeyId().isPresent()) {
|
85
|
+
BasicAWSCredentials basicAWSCredentials = new BasicAWSCredentials(
|
86
|
+
task.getAccessKeyId().get(), task.getSecretAccessKey().get());
|
87
|
+
|
88
|
+
ClientConfiguration config = new ClientConfiguration();
|
89
|
+
// TODO: Support more configurations.
|
90
|
+
|
91
|
+
client = new AmazonS3Client(basicAWSCredentials, config);
|
92
|
+
} else {
|
93
|
+
if (System.getenv("AWS_ACCESS_KEY_ID") == null) {
|
94
|
+
client = new AmazonS3Client(new EnvironmentVariableCredentialsProvider());
|
95
|
+
} else { // IAM ROLE
|
96
|
+
client = new AmazonS3Client();
|
97
97
|
}
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
throw new RuntimeException("can't call S3 API. Please check your access_key_id / secret_access_key or s3_region configuration.", e);
|
98
|
+
}
|
99
|
+
if (task.getEndpoint().isPresent()) {
|
100
|
+
client.setEndpoint(task.getEndpoint().get());
|
102
101
|
}
|
103
102
|
|
104
103
|
return client;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Takayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,7 +61,7 @@ files:
|
|
61
61
|
- classpath/aws-java-sdk-s3-1.10.26.jar
|
62
62
|
- classpath/commons-codec-1.6.jar
|
63
63
|
- classpath/commons-logging-1.1.3.jar
|
64
|
-
- classpath/embulk-output-s3-1.
|
64
|
+
- classpath/embulk-output-s3-1.1.0.jar
|
65
65
|
- classpath/httpclient-4.3.6.jar
|
66
66
|
- classpath/httpcore-4.3.3.jar
|
67
67
|
homepage: https://github.com/llibra/embulk-output-s3
|