mirror of https://github.com/apache/druid.git
Adding a configuration property to disable setting an ACL on the segment pushed to S3.
This commit is contained in:
parent
e3879f0c77
commit
b3530fb15d
|
@ -80,7 +80,9 @@ public class S3DataSegmentPusher implements DataSegmentPusher
|
||||||
final String outputBucket = config.getBucket();
|
final String outputBucket = config.getBucket();
|
||||||
toPush.setBucketName(outputBucket);
|
toPush.setBucketName(outputBucket);
|
||||||
toPush.setKey(outputKey + "/index.zip");
|
toPush.setKey(outputKey + "/index.zip");
|
||||||
toPush.setAcl(GSAccessControlList.REST_CANNED_BUCKET_OWNER_FULL_CONTROL);
|
if (!config.getDisableAcl()) {
|
||||||
|
toPush.setAcl(GSAccessControlList.REST_CANNED_BUCKET_OWNER_FULL_CONTROL);
|
||||||
|
}
|
||||||
|
|
||||||
log.info("Pushing %s.", toPush);
|
log.info("Pushing %s.", toPush);
|
||||||
s3Client.putObject(outputBucket, toPush);
|
s3Client.putObject(outputBucket, toPush);
|
||||||
|
@ -96,7 +98,9 @@ public class S3DataSegmentPusher implements DataSegmentPusher
|
||||||
S3Object descriptorObject = new S3Object(descriptorFile);
|
S3Object descriptorObject = new S3Object(descriptorFile);
|
||||||
descriptorObject.setBucketName(outputBucket);
|
descriptorObject.setBucketName(outputBucket);
|
||||||
descriptorObject.setKey(outputKey + "/descriptor.json");
|
descriptorObject.setKey(outputKey + "/descriptor.json");
|
||||||
descriptorObject.setAcl(GSAccessControlList.REST_CANNED_BUCKET_OWNER_FULL_CONTROL);
|
if (!config.getDisableAcl()) {
|
||||||
|
descriptorObject.setAcl(GSAccessControlList.REST_CANNED_BUCKET_OWNER_FULL_CONTROL);
|
||||||
|
}
|
||||||
|
|
||||||
log.info("Pushing %s", descriptorObject);
|
log.info("Pushing %s", descriptorObject);
|
||||||
s3Client.putObject(outputBucket, descriptorObject);
|
s3Client.putObject(outputBucket, descriptorObject);
|
||||||
|
|
|
@ -32,4 +32,8 @@ public abstract class S3DataSegmentPusherConfig
|
||||||
@Config("druid.pusher.s3.baseKey")
|
@Config("druid.pusher.s3.baseKey")
|
||||||
@Default("")
|
@Default("")
|
||||||
public abstract String getBaseKey();
|
public abstract String getBaseKey();
|
||||||
|
|
||||||
|
@Config("druid.pusher.s3.disableAcl")
|
||||||
|
@Default("false")
|
||||||
|
public abstract boolean getDisableAcl();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue