lhotari commented on code in PR #3056:
URL: https://github.com/apache/bookkeeper/pull/3056#discussion_r1717987989


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java:
##########
@@ -3777,4 +3787,76 @@ public ServerConfiguration 
setDataIntegrityStampMissingCookiesEnabled(boolean en
     public boolean isDataIntegrityStampMissingCookiesEnabled() {
         return this.getBoolean(DATA_INTEGRITY_COOKIE_STAMPING_ENABLED, false);
     }
+
+    /**
+     * Get default rocksdb conf.
+     *
+     * @return String configured default rocksdb conf.
+     */
+    public String getDefaultRocksDBConf() {
+        String defaultPath = "conf/default_rocksdb.conf";
+        URL defURL = getClass().getClassLoader().getResource(defaultPath);
+        if (defURL != null) {
+            defaultPath = defURL.getPath();
+        }

Review Comment:
   This is very surprising behavior that suddenly the classloader is used to 
locate the resources.
   At least there should be a check that the scheme of the URL is a file which 
isn't embedded in a Jar file.



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