ivankelly commented on a change in pull request #2865: Refactored JCloud Tiered
Storage
URL: https://github.com/apache/pulsar/pull/2865#discussion_r241366551
##########
File path:
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/TieredStorageConfiguration.java
##########
@@ -76,32 +98,83 @@ public TieredStorageConfiguration(Map<String, String>
configProperties) {
}
}
+ public List<String> getKeys(String property) {
+ List<String> keys = new ArrayList<String> ();
+
+ String bc = getBackwardCompatibleKey(property);
+ if (StringUtils.isNotBlank(bc)) {
+ keys.add(bc);
+ }
+
+ String key = getKeyName(property);
+ if (StringUtils.isNotBlank(key)) {
+ keys.add(key);
+ }
+ return keys;
+ }
+
+ private String getKeyName(String property) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(OFFLOADER_PROPERTY_PREFIX)
+ .append(property);
+
+ return sb.toString();
+ }
+
+ private String getBackwardCompatibleKey(String property) {
+ switch (getProvider()) {
+ case S3:
+ case AWS_S3: return new
StringBuilder().append("s3ManagedLedgerOffload")
Review comment:
nit: newline before return
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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