[
https://issues.apache.org/jira/browse/ATLAS-5162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040592#comment-18040592
]
chaitali borole commented on ATLAS-5162:
----------------------------------------
Current Logic:
On all client side as well as Atlas server side there is provision that with
existing default mechanism of having fixed property file name as well as conf
directory which is expected to be same every time.
Approach:-:
Atlas server side application.properties file name should be configurable and
file path too should be configurable which will help utilities and atlas server
to load properties file independent of absolute path and name.
Expectation:-:
1.When complete path along with filename is provided then it should check on
this custom path along with filename
2.Existing functioning where we provide just filename should be checked on conf
location or classpath as expected.
How was this patch tested?
Manually as well as by adding a UT
Below scenarios were tested:
1.When provided entire path It would check for properties file on exact
location without searching on conf location
2.When Provided only filename it would check on conf location which is existing
flow.
3.Deleted the file from custom location which causes Hook side import-hive.sh
to fail with
{code:java}
25/11/25 12:27:24 ERROR bridge.HiveMetaStoreBridge: Import Failed
org.apache.atlas.AtlasException: Failed to load application properties
at
org.apache.atlas.ApplicationProperties.get(ApplicationProperties.java:194)
at
org.apache.atlas.ApplicationProperties.getConf(ApplicationProperties.java:122)
at
org.apache.atlas.hive.bridge.HiveMetaStoreBridge.main(HiveMetaStoreBridge.java:156)
Caused by: org.apache.commons.configuration.ConfigurationException: Unable to
load the configuration from the URL file:/tmp/test.properties
at
org.apache.commons.configuration.DefaultFileSystem.getInputStream(DefaultFileSystem.java:86)
at
org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:323)
at
org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:234)
at
org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:197)
at
org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:284)
at
org.apache.atlas.ApplicationProperties.<init>(ApplicationProperties.java:92)
at
org.apache.atlas.ApplicationProperties.get(ApplicationProperties.java:185)
... 2 more
Caused by: java.io.FileNotFoundException: /tmp/test.properties (No such file or
directory)
{code}
4.Changed property and its values in custom path properties file to verify it
addresses correct file
> Add support to load custom application properties
> -------------------------------------------------
>
> Key: ATLAS-5162
> URL: https://issues.apache.org/jira/browse/ATLAS-5162
> Project: Atlas
> Issue Type: Improvement
> Components: atlas-intg
> Reporter: Pinal Shah
> Assignee: chaitali borole
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently Atlas only supports to load property file present in the classpath.
> This Jira will support to load the properties send by the client through
> custom filepath and through 'Properties'
--
This message was sent by Atlassian Jira
(v8.20.10#820010)