dclim commented on a change in pull request #7907: #7875: Setting ACL on S3 
task logs on similar lines as that of data segments pushed to S3
URL: https://github.com/apache/incubator-druid/pull/7907#discussion_r294395751
 
 

 ##########
 File path: 
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3TaskLogs.java
 ##########
 @@ -146,6 +147,17 @@ private void pushTaskFile(final File logFile, String 
taskKey) throws IOException
     }
   }
 
+  private void uploadFileIfPossible(String bucket, String key, File file)
+  {
+    final PutObjectRequest logFilePutRequest = new PutObjectRequest(bucket, 
key, file);
+
+    if (!config.getDisableAcl()) {
+      
logFilePutRequest.setAccessControlList(S3Utils.grantFullControlToBucketOwner(service,
 bucket));
+    }
+    log.info("Pushing [%s] to bucket[%s] and key[%s].", file, bucket, key);
+    service.putObject(logFilePutRequest);
+  }
+
 
 Review comment:
   Yes that's a good idea and more maintainable than duplicating the code in 
`S3TaskLogs`. It's not a problem that the logger class changes.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to