|
49 | 49 | import org.slf4j.Logger;
|
50 | 50 |
|
51 | 51 | import com.amazonaws.ClientConfiguration;
|
52 |
| -import com.amazonaws.services.s3.AmazonS3Client; |
53 | 52 | import com.amazonaws.services.s3.model.CannedAccessControlList;
|
54 | 53 | import com.amazonaws.services.s3.model.PutObjectRequest;
|
55 | 54 | import org.embulk.util.aws.credentials.AwsCredentials;
|
@@ -126,7 +125,7 @@ public static class S3FileOutput
|
126 | 125 |
|
127 | 126 | private int taskIndex;
|
128 | 127 | private int fileIndex;
|
129 |
| - private AmazonS3Client client; |
| 128 | + private AmazonS3 client; |
130 | 129 | private OutputStream current;
|
131 | 130 | private Path tempFilePath;
|
132 | 131 | private String tempPath = null;
|
@@ -190,42 +189,6 @@ private ClientConfiguration getClientConfiguration(PluginTask task)
|
190 | 189 | return clientConfig;
|
191 | 190 | }
|
192 | 191 |
|
193 |
| - |
194 |
| - |
195 |
| - |
196 |
| - // private static AmazonS3Client newS3Client(PluginTask task) |
197 |
| - // { |
198 |
| - // AmazonS3Client client; |
199 |
| - |
200 |
| - // // TODO: Support more configurations. |
201 |
| - // ClientConfiguration config = new ClientConfiguration(); |
202 |
| - |
203 |
| - // if (task.getProxyHost().isPresent()) { |
204 |
| - // config.setProxyHost(task.getProxyHost().get()); |
205 |
| - // } |
206 |
| - |
207 |
| - // if (task.getProxyPort().isPresent()) { |
208 |
| - // config.setProxyPort(task.getProxyPort().get()); |
209 |
| - // } |
210 |
| - |
211 |
| - // if (task.getAccessKeyId().isPresent()) { |
212 |
| - // BasicAWSCredentials basicAWSCredentials = new BasicAWSCredentials( |
213 |
| - // task.getAccessKeyId().get(), task.getSecretAccessKey().get()); |
214 |
| - |
215 |
| - // client = new AmazonS3Client(basicAWSCredentials, config); |
216 |
| - // } |
217 |
| - // else { |
218 |
| - // // Use default credential provider chain. |
219 |
| - // client = new AmazonS3Client(config); |
220 |
| - // } |
221 |
| - |
222 |
| - // if (task.getEndpoint().isPresent()) { |
223 |
| - // client.setEndpoint(task.getEndpoint().get()); |
224 |
| - // } |
225 |
| - |
226 |
| - // return client; |
227 |
| - // } |
228 |
| - |
229 | 192 | public S3FileOutput(PluginTask task, int taskIndex)
|
230 | 193 | {
|
231 | 194 | this.taskIndex = taskIndex;
|
|
0 commit comments