david-streamlio commented on a change in pull request #2865: Refactored JCloud 
Tiered Storage
URL: https://github.com/apache/pulsar/pull/2865#discussion_r241856651
 
 

 ##########
 File path: 
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java
 ##########
 @@ -166,7 +169,7 @@ public void validate(TieredStorageConfiguration config) 
throws IllegalArgumentEx
         @Override
         public BlobStore getBlobStore(TieredStorageConfiguration config) {
 
-            BlobStore bs = 
ContextBuilder.newBuilder(config.getDriver().toLowerCase())
+            BlobStore bs = ContextBuilder.newBuilder(this.getDriver())
 
 Review comment:
   @ivankelly There are two levels of indirection here, the first occurring in 
the `TieredStorageConfiguration` class, that reads the 
`managedLedgerOffloadDriver` property from the broker.conf file and uses it to 
select the proper Enum
   
   `public JCloudBlobStoreProvider getProvider() {
           if (provider == null) {
               provider = 
JCloudBlobStoreProvider.valueOf(getBlobStoreProviderKey().toUpperCase());
           }
           return provider;
       }
   '
   
   Inside each Enum is a "driver' field, which is the string that has to be 
passed into JClouds when we instantiate the BlobStore object.  This driver 
field appears to be case-sensitive, and has to be lower case, but since I have 
hard-coded these values in the Enum constructor calls, I can just use the 
values directly, without lower-casing them

----------------------------------------------------------------
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

Reply via email to