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/04/13 16:44:25 UTC

[GitHub] sijie closed pull request #1338: Fallback to use `getZkServers` and `getZkLedgersPath` when resolving from metadata service uri

sijie closed pull request #1338: Fallback to use `getZkServers` and `getZkLedgersPath` when resolving from metadata service uri
URL: https://github.com/apache/bookkeeper/pull/1338
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java
index d5d0601884..a9e1a13966 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java
@@ -64,19 +64,21 @@ public static String getZKServersFromServiceUri(URI uri) {
         return uri.getAuthority().replace(";", ",");
     }
 
+    @SuppressWarnings("deprecation")
     public static String resolveZkServers(AbstractConfiguration<?> conf) {
         String metadataServiceUriStr = conf.getMetadataServiceUriUnchecked();
         if (null == metadataServiceUriStr) {
-            return null;
+            return conf.getZkServers();
         }
         URI metadataServiceUri = URI.create(metadataServiceUriStr);
         return getZKServersFromServiceUri(metadataServiceUri);
     }
 
+    @SuppressWarnings("deprecation")
     public static String resolveZkLedgersRootPath(AbstractConfiguration<?> conf) {
         String metadataServiceUriStr = conf.getMetadataServiceUriUnchecked();
         if (null == metadataServiceUriStr) {
-            return null;
+            return conf.getZkLedgersRootPath();
         }
         URI metadataServiceUri = URI.create(metadataServiceUriStr);
         return metadataServiceUri.getPath();
diff --git a/stream/distributedlog/pom.xml b/stream/distributedlog/pom.xml
index 0797501ee0..44a245f8b7 100644
--- a/stream/distributedlog/pom.xml
+++ b/stream/distributedlog/pom.xml
@@ -110,3 +110,4 @@
     </profile>
   </profiles>
 </project>
+
diff --git a/stream/pom.xml b/stream/pom.xml
index 2338a94573..208e6d0a1c 100644
--- a/stream/pom.xml
+++ b/stream/pom.xml
@@ -89,3 +89,4 @@
   </profiles>
 
 </project>
+


 

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