You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/08 00:06:26 UTC

[GitHub] jvrao commented on a change in pull request #1127: BP-29 (task 1) : Introduce `metadataServiceUrl`

jvrao commented on a change in pull request #1127: BP-29 (task 1) : Introduce `metadataServiceUrl`
URL: https://github.com/apache/bookkeeper/pull/1127#discussion_r166797172
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
 ##########
 @@ -175,6 +179,58 @@ public void loadConf(CompositeConfiguration baseConf) {
         }
     }
 
+    /**
+     * Get metadata service uri.
+     *
+     * @return metadata service uri.
+     */
+    @SuppressWarnings("deprecation")
+    public String getMetadataServiceUri() throws ConfigurationException {
+        String serviceUri = getString(METADATA_SERVICE_URI);
+        if (null == serviceUri) {
+            // no service uri is defined, fallback to old settings
+            String ledgerManagerType;
+            Class<? extends LedgerManagerFactory> factoryClass = getLedgerManagerFactoryClass();
+            if (factoryClass == null) {
+                ledgerManagerType = HierarchicalLedgerManagerFactory.NAME;
+            } else {
+                if (!AbstractZkLedgerManagerFactory.class.isAssignableFrom(factoryClass)) {
+                    // this is a non-zk implementation
+                    throw new UnsupportedOperationException("metadata service uri is not supported for "
 
 Review comment:
   This is a no service URI case. But the log messages reads so..

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services