|
9 | 9 | import software.amazon.awssdk.core.ResponseInputStream; |
10 | 10 | import software.amazon.awssdk.core.async.AsyncRequestBody; |
11 | 11 | import software.amazon.awssdk.core.async.AsyncResponseTransformer; |
| 12 | +import software.amazon.awssdk.core.checksums.RequestChecksumCalculation; |
12 | 13 | import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient; |
13 | 14 | import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient.Builder; |
14 | 15 | import software.amazon.awssdk.regions.Region; |
15 | 16 | import software.amazon.awssdk.services.s3.S3AsyncClient; |
16 | 17 | import software.amazon.awssdk.services.s3.S3AsyncClientBuilder; |
17 | | -import software.amazon.awssdk.services.s3.S3Client; |
18 | 18 | import software.amazon.awssdk.services.s3.S3Configuration; |
19 | 19 | import software.amazon.awssdk.services.s3.model.*; |
20 | 20 | import software.amazon.awssdk.services.s3.presigner.S3Presigner; |
@@ -362,6 +362,7 @@ public void savePath(Path fileSystemPath) throws IOException { |
362 | 362 |
|
363 | 363 | newFileSize = Files.size(fileSystemPath); |
364 | 364 | } catch (Exception e) { |
| 365 | + logger.warning(e.getMessage()); |
365 | 366 | throw new IOException( |
366 | 367 | "S3AccessIO: Exception occurred while uploading a local file into S3Object " + key, e); |
367 | 368 | } |
@@ -1244,7 +1245,7 @@ private static S3AsyncClient getClient(String driverId) { |
1244 | 1245 | return driverClientMap.get(driverId); |
1245 | 1246 | } else { |
1246 | 1247 | // Create a builder for the S3AsyncClient |
1247 | | - S3AsyncClientBuilder s3CB = S3AsyncClient.builder(); |
| 1248 | + S3AsyncClientBuilder s3CB = S3AsyncClient.builder().requestChecksumCalculation(RequestChecksumCalculation.WHEN_REQUIRED); |
1248 | 1249 |
|
1249 | 1250 | // Create a custom HTTP client with the desired pool size |
1250 | 1251 | Integer poolSize = Integer.getInteger("dataverse.files." + driverId + ".connection-pool-size", 256); |
|
0 commit comments