gianm commented on code in PR #18544:
URL: https://github.com/apache/druid/pull/18544#discussion_r2361291503
##########
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPusher.java:
##########
@@ -130,6 +141,56 @@ public DataSegment pushToPath(File indexFilesDir,
DataSegment inSegment, String
}
}
+ private DataSegment pushNoZip(File indexFilesDir, DataSegment baseSegment,
String s3Path) throws IOException
+ {
+ final File[] files = indexFilesDir.listFiles();
+ if (files == null) {
+ throw new IOE("Cannot list directory [%s]", indexFilesDir);
+ }
+
+ long size = 0;
+ for (final File file : files) {
+ if (file.isFile()) {
+ size += file.length();
+
+ try {
+ S3Utils.retryS3Operation(
+ () -> {
+ S3Utils.uploadFileIfPossible(s3Client, config.getDisableAcl(),
config.getBucket(), s3Path + file.getName(), file);
+ return null;
+ }
+ );
+ }
+ catch (AmazonServiceException e) {
+ if
(S3Utils.ERROR_ENTITY_TOO_LARGE.equals(S3Utils.getS3ErrorCode(e))) {
Review Comment:
This whole block is duplicated, would be good to dedupe it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]