forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tiered Storage] Fix merge conflicts introduced by PR apache#6335 (ap…
…ache#8630) # Motivation The PR apache#6335 lost some PR changes, related PRs as below. 1. PR 4196 (2019/5/29 Merli) Configure static PulsarByteBufAllocator to handle OOM errors (apache#4196) 2. PR 5356 (2019/10/30 Kelly) [TIEREDSTORAGE] Only seek when reading unexpected entry (apache#5356) 3. PR 4433 (2019/6/4 Higham) [tiered-storage] Add support for AWS instance and role creds (apache#4433)
- Loading branch information
Showing
10 changed files
with
83 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ | |
import org.apache.bookkeeper.mledger.offload.jcloud.provider.TieredStorageConfiguration; | ||
import org.apache.bookkeeper.util.ZkUtils; | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.apache.pulsar.jcloud.shade.com.google.common.base.Supplier; | ||
import org.apache.zookeeper.CreateMode; | ||
import org.apache.zookeeper.MockZooKeeper; | ||
import org.apache.zookeeper.data.ACL; | ||
|
@@ -99,14 +100,14 @@ protected static JCloudBlobStoreProvider getBlobStoreProvider() { | |
* Get the credentials to use for the JCloud provider | ||
* based on the System properties. | ||
*/ | ||
protected static Credentials getBlobStoreCredentials() { | ||
protected static Supplier<Credentials> getBlobStoreCredentials() { | ||
if (Boolean.parseBoolean(System.getProperty("testRealAWS", "false"))) { | ||
/* To use this, must config credentials using "aws_access_key_id" as S3ID, | ||
* and "aws_secret_access_key" as S3Key. And bucket should exist in default region. e.g. | ||
* props.setProperty("S3ID", "AXXXXXXQ"); | ||
* props.setProperty("S3Key", "HXXXXXß"); | ||
*/ | ||
return new Credentials(System.getProperty("S3ID"), System.getProperty("S3Key")); | ||
return () -> new Credentials(System.getProperty("S3ID"), System.getProperty("S3Key")); | ||
|
||
} else if (Boolean.parseBoolean(System.getProperty("testRealGCS", "false"))) { | ||
/* | ||
|
@@ -115,7 +116,7 @@ protected static Credentials getBlobStoreCredentials() { | |
* props.setProperty("GCSID", "[email protected]"); | ||
* props.setProperty("GCSKey", "XXXXXX"); | ||
*/ | ||
return new Credentials(System.getProperty("GCSID"), System.getProperty("GCSKey")); | ||
return () -> new Credentials(System.getProperty("GCSID"), System.getProperty("GCSKey")); | ||
} else { | ||
return null; | ||
} | ||
|