-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use hazelcast.yaml when hazelcast.xml is not available #20003
Use hazelcast.yaml when hazelcast.xml is not available #20003
Conversation
Users sometimes prefer to use yaml configuration. When the hazelcast.xml is not available in the config folder then hazelcast.yaml is tried. If hazelcast.yaml is not available error message is shown with guidance what to do. Fixes hazelcast#19727
fi | ||
|
||
if [ ! -f "$HAZELCAST_HOME/$HAZELCAST_CONFIG" ]; then | ||
echo "Configuration file is missing. Create hazelcast.xml or hazelcast.yaml in $HAZELCAST_HOME/config or set the HAZELCAST_CONFIG environment variable." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should exit. According to https://docs.hazelcast.com/hazelcast/5.0/configuration/checking-configuration we should check for ".yml" as well and if none is present then load the default configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point about the yml file. I will add that.
Otherwise, the doc is for embedded use. I am not sure we want to follow the same procedure for our server distribution. Maybe it should be updated what is done for server instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we should have different behavior on server distribution? I could imagine it could be surprising for customers using embedded versions while migrating to the server distribution. Also, it brings additional effort on documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense for the distribution to try the options done for embedded:
- classpath - do we want to encourage users to put config inside custom jars? I don't think so.
- working directory - currently that's HAZELCAST_HOME if you run hz-start, but we don't have it documented
- the default config in hazelcast jar is not suitable for server distribution (e.g. it opens on all interfaces, instead of just loopback)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Failures: [ERROR] Log4jLoggerTest.logEvent_withLogLevelOff_shouldNotLog:131 [Expected 0 log events but got 1] Expecting: <1> to be equal to: <0> but was not. [INFO] [ERROR] Tests run: 46543, Failures: 1, Errors: 0, Skipped: 1012 [INFO] |
run-lab-run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think we're missing changes in the batch file.
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Failures: [ERROR] ClientMapPartitionLostListenerTest.test_mapPartitionLostListener_invoked_fromOtherNode:133->assertProxyExistsEventually:163->HazelcastTestSupport.assertTrueEventually:1362->HazelcastTestSupport.assertTrueEventually:1260 There is no proxy with name 5ed8ab7e-acad-4c77-9c69-c500e1e21a47 created (yet) [INFO] [ERROR] Tests run: 46543, Failures: 1, Errors: 0, Skipped: 1012 [INFO] |
@@ -41,7 +41,16 @@ IF NOT "%JAVA_VERSION%" == "8" ( | |||
|
|||
REM HAZELCAST_CONFIG holds path to the configuration file. The path is relative to the Hazelcast installation (HAZELCAST_HOME). | |||
if "x%HAZELCAST_CONFIG%" == "x" ( | |||
set HAZELCAST_CONFIG=config/hazelcast.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to keep this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was a mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the slash though, so it still shows as deleted, but it's added below.
* Allow absolute paths in HAZELCAST_CONFIG environment variable (#19908) Allow absolute paths in HAZELCAST_CONFIG and HAZELCAST_CLIENT_CONFIG environment variables * Use hazelcast.yaml when hazelcast.xml is not available Users sometimes prefer to use yaml configuration. When the hazelcast.xml is not available in the config folder then hazelcast.yaml is tried. If hazelcast.yaml is not available error message is shown with guidance what to do. Backport of #20003 and #19908 (for clean backport) Fixes #19727 Co-authored-by: Yüce Tekol <yucetekol@gmail.com>
* Use hazelcast.yaml when hazelcast.xml is not available Users sometimes prefer to use yaml configuration. When the hazelcast.xml is not available in the config folder then hazelcast.yaml is tried. If hazelcast.yaml is not available error message is shown with guidance what to do. Fixes hazelcast#19727
Users sometimes prefer to use yaml configuration.
When the hazelcast.xml is not available in the config folder then
hazelcast.yaml is tried.
If hazelcast.yaml is not available error message is shown with guidance
what to do.
Fixes #19727
Checklist:
Team:
,Type:
,Source:
,Module:
) and Milestone setAdd to Release Notes
orNot Release Notes content
set