chaitalicod commented on code in PR #476:
URL: https://github.com/apache/atlas/pull/476#discussion_r2580167343


##########
intg/src/main/java/org/apache/atlas/ApplicationProperties.java:
##########
@@ -124,27 +124,57 @@ public static Configuration set(Configuration 
configuration) throws AtlasExcepti
         return instance;
     }
 
-    public static Configuration get(String fileName) throws AtlasException {
-        String confLocation = 
System.getProperty(ATLAS_CONFIGURATION_DIRECTORY_PROPERTY);
+    public static Configuration getConf(String absoluteFilePath) throws 
AtlasException {
+        if (instance == null) {
+            synchronized (ApplicationProperties.class) {
+                if (instance == null) {
+                    set(get(absoluteFilePath));
+                }
+            }
+        }
+        return instance;
+    }
 
+    public static Configuration getConf(PropertiesConfiguration clientConf) 
throws AtlasException {
+        if (instance == null) {
+            synchronized (ApplicationProperties.class) {
+                if (instance == null) {
+                    set(clientConf);
+                }
+            }
+        }
+        return instance;
+    }
+
+    public static Configuration get(String fileName) throws AtlasException {
         try {
-            URL url;
+            URL url = null;
 
-            if (confLocation == null) {
-                LOG.info("Looking for {} in classpath", fileName);
+            if (StringUtils.isNotBlank(fileName)) {
+                File file = new File(fileName);
+                if (file.exists()) {
+                    url = file.toURI().toURL();
+                    LOG.info("Loading {} from {}", fileName, url);

Review Comment:
   No this log will not be printed if removed for this usecase of custom path 
because the later one is for conf dir/classpath 



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