This is an automated email from the ASF dual-hosted git repository. sijie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push: new 505677a S3ManagedLedgerOffloader should require region or endpoint (#1798) 505677a is described below commit 505677a9def60594e277c110e5538888510e583e Author: Ivan Kelly <iv...@apache.org> AuthorDate: Mon May 21 09:59:39 2018 +0200 S3ManagedLedgerOffloader should require region or endpoint (#1798) The S3 client requires one of the two, but never both. Previously we were throwing an error if region was not specified, even though it's not needed if endpoint is. Master Issue: #1511 --- .../apache/pulsar/broker/s3offload/S3ManagedLedgerOffloader.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/s3offload/S3ManagedLedgerOffloader.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/s3offload/S3ManagedLedgerOffloader.java index 7c8113a..3459919 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/s3offload/S3ManagedLedgerOffloader.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/s3offload/S3ManagedLedgerOffloader.java @@ -68,11 +68,13 @@ public class S3ManagedLedgerOffloader implements LedgerOffloader { int maxBlockSize = conf.getS3ManagedLedgerOffloadMaxBlockSizeInBytes(); int readBufferSize = conf.getS3ManagedLedgerOffloadReadBufferSizeInBytes(); - if (Strings.isNullOrEmpty(region)) { - throw new PulsarServerException("s3ManagedLedgerOffloadRegion cannot be empty is s3 offload enabled"); + if (Strings.isNullOrEmpty(region) && Strings.isNullOrEmpty(endpoint)) { + throw new PulsarServerException( + "Either s3ManagedLedgerOffloadRegion or s3ManagedLedgerOffloadServiceEndpoint must be set" + + " if s3 offload enabled"); } if (Strings.isNullOrEmpty(bucket)) { - throw new PulsarServerException("s3ManagedLedgerOffloadBucket cannot be empty is s3 offload enabled"); + throw new PulsarServerException("s3ManagedLedgerOffloadBucket cannot be empty if s3 offload enabled"); } AmazonS3ClientBuilder builder = AmazonS3ClientBuilder.standard(); -- To stop receiving notification emails like this one, please contact si...@apache.org.