embulk-output-s3_per_record 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df24af87908ca267e9a6518308f0bfb319d14808
|
4
|
+
data.tar.gz: 1f9f6af566dff9c786c1f9531b7527d039eadcf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 083299386ca77263932553aaab9bb0e735f73b24ebe502328568ab70e4d7d0ff5c9711792c7a4758a0a3daeb5c74f2b5567473cc9310b325f78f6d8fe25f333e
|
7
|
+
data.tar.gz: 38912a1f91df7c26d1db2a023babd24b7a696b8f132f8218add7b59890bd668fd172205fff76105fd851d7ed346a22314502176703861983a37a7aff73824605
|
data/build.gradle
CHANGED
@@ -113,7 +113,6 @@ public class S3PerRecordOutputPlugin
|
|
113
113
|
private final List<KeyPart> keyPattern;
|
114
114
|
private final Column dataColumn;
|
115
115
|
private final Schema schema;
|
116
|
-
private List<Upload> uploads;
|
117
116
|
private final boolean decodeBase64;
|
118
117
|
|
119
118
|
public S3PerRecordPageOutput(PluginTask task, Schema schema) {
|
@@ -130,8 +129,6 @@ public class S3PerRecordOutputPlugin
|
|
130
129
|
credentials = new DefaultAWSCredentialsProviderChain().getCredentials();
|
131
130
|
}
|
132
131
|
transferManager = new TransferManager(credentials);
|
133
|
-
|
134
|
-
uploads = new ArrayList<>();
|
135
132
|
}
|
136
133
|
|
137
134
|
private List<KeyPart> makeKeyPattern(final String key) {
|
@@ -177,8 +174,8 @@ public class S3PerRecordOutputPlugin
|
|
177
174
|
|
178
175
|
try (InputStream is = new ByteArrayInputStream(payloadBytes)) {
|
179
176
|
Upload upload = transferManager.upload(bucket, key, is, metadata);
|
180
|
-
|
181
|
-
} catch (IOException e) {
|
177
|
+
upload.waitForUploadResult();
|
178
|
+
} catch (InterruptedException | IOException e) {
|
182
179
|
throw new RuntimeException(e);
|
183
180
|
}
|
184
181
|
}
|
@@ -195,15 +192,7 @@ public class S3PerRecordOutputPlugin
|
|
195
192
|
@Override
|
196
193
|
public void finish()
|
197
194
|
{
|
198
|
-
|
199
|
-
for (Upload upload : uploads) {
|
200
|
-
upload.waitForUploadResult();
|
201
|
-
}
|
202
|
-
} catch (InterruptedException e) {
|
203
|
-
throw new RuntimeException(e);
|
204
|
-
} finally {
|
205
|
-
close();
|
206
|
-
}
|
195
|
+
close();
|
207
196
|
}
|
208
197
|
|
209
198
|
@Override
|
@@ -211,14 +200,12 @@ public class S3PerRecordOutputPlugin
|
|
211
200
|
{
|
212
201
|
if (pageReader != null) {
|
213
202
|
pageReader.close();
|
203
|
+
pageReader = null;
|
214
204
|
}
|
215
205
|
}
|
216
206
|
|
217
207
|
@Override
|
218
208
|
public void abort() {
|
219
|
-
for (Upload upload : uploads) {
|
220
|
-
upload.abort();
|
221
|
-
}
|
222
209
|
}
|
223
210
|
|
224
211
|
@Override
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-s3_per_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tomykaira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,8 +63,8 @@ files:
|
|
63
63
|
- classpath/commons-logging-1.1.3.jar
|
64
64
|
- classpath/commons-codec-1.6.jar
|
65
65
|
- classpath/aws-java-sdk-s3-1.10.71.jar
|
66
|
+
- classpath/embulk-output-s3_per_record-0.1.2.jar
|
66
67
|
- classpath/aws-java-sdk-core-1.10.71.jar
|
67
|
-
- classpath/embulk-output-s3_per_record-0.1.1.jar
|
68
68
|
- classpath/httpcore-4.3.3.jar
|
69
69
|
- classpath/aws-java-sdk-kms-1.10.71.jar
|
70
70
|
homepage: https://github.com/tomykaira/embulk-output-s3_per_record
|