ierandra commented on code in PR #1748:
URL: https://github.com/apache/jackrabbit-oak/pull/1748#discussion_r1838309796


##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentStoreService.java:
##########
@@ -57,21 +48,35 @@ public class AzureSegmentStoreService {
     public static final String DEFAULT_ROOT_PATH = "/oak";
 
     public static final boolean DEFAULT_ENABLE_SECONDARY_LOCATION = false;
-    public static final String DEFAULT_ENDPOINT_SUFFIX = "core.windows.net";
 
     private ServiceRegistration registration;
-    private static AzureStorageCredentialManager azureStorageCredentialManager;
+
+    private final boolean useAzureSdkV12 = 
Boolean.getBoolean("segment.azure.v12.enabled");
+
 
     @Activate
     public void activate(ComponentContext context, Configuration config) 
throws IOException {
-        AzurePersistence persistence = createAzurePersistenceFrom(config);
-        registration = context.getBundleContext()
-            .registerService(SegmentNodeStorePersistence.class, persistence, 
new Hashtable<String, Object>() {{
-                put(SERVICE_PID, String.format("%s(%s, %s)", 
AzurePersistence.class.getName(), config.accountName(), config.rootPath()));
-                if (!Objects.equals(config.role(), "")) {
-                    put("role", config.role());
-                }
-            }});
+        if (useAzureSdkV12) {
+            log.info("Starting nodestore using Azure SDK 12");

Review Comment:
   done



##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentStoreService.java:
##########
@@ -57,21 +48,35 @@ public class AzureSegmentStoreService {
     public static final String DEFAULT_ROOT_PATH = "/oak";
 
     public static final boolean DEFAULT_ENABLE_SECONDARY_LOCATION = false;
-    public static final String DEFAULT_ENDPOINT_SUFFIX = "core.windows.net";
 
     private ServiceRegistration registration;
-    private static AzureStorageCredentialManager azureStorageCredentialManager;
+
+    private final boolean useAzureSdkV12 = 
Boolean.getBoolean("segment.azure.v12.enabled");
+
 
     @Activate
     public void activate(ComponentContext context, Configuration config) 
throws IOException {
-        AzurePersistence persistence = createAzurePersistenceFrom(config);
-        registration = context.getBundleContext()
-            .registerService(SegmentNodeStorePersistence.class, persistence, 
new Hashtable<String, Object>() {{
-                put(SERVICE_PID, String.format("%s(%s, %s)", 
AzurePersistence.class.getName(), config.accountName(), config.rootPath()));
-                if (!Objects.equals(config.role(), "")) {
-                    put("role", config.role());
-                }
-            }});
+        if (useAzureSdkV12) {
+            log.info("Starting nodestore using Azure SDK 12");
+            AzurePersistence persistence = 
AzurePersistenceManager.createAzurePersistenceFrom(config);
+            registration = context.getBundleContext()
+                    .registerService(SegmentNodeStorePersistence.class, 
persistence, new Hashtable<String, Object>() {{
+                        put(SERVICE_PID, String.format("%s(%s, %s)", 
AzurePersistence.class.getName(), config.accountName(), config.rootPath()));
+                        if (!Objects.equals(config.role(), "")) {
+                            put("role", config.role());
+                        }
+                    }});
+        } else {
+            log.info("Starting nodestore using Azure SDK 8");

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to