Hazelcast 不兼容旧版本

huangapple go评论99阅读模式
英文:

Hazelcast incompatible with old version

问题

我正在将Hazelcast库从4.x升级到最新的5.3.x版本。然而,从我的观察中,属性hazelcast.phone.home.enabled不被允许,但它仍然在文档中有效。如果有人有经验,知道为什么会发生这种情况,请分享一下。谢谢。

这里是异常:
Hazelcast 不兼容旧版本

英文:

I'm upgrade the Hazelcast library from 4.x to the latest 5.3.x version
However from my observer the property hazelcast.phone.home.enabled not allow, but it's still
valid in the document

Anyone has experience why does this happened please share

Thank you

Here is exception
Hazelcast 不兼容旧版本

答案1

得分: 1

请参考以下内容,这是一个示例,展示了如何使用属性文件 hazelcast.yaml:

hazelcast:
  properties:
    hazelcast.phone.home.enabled: false
  network:
    join:
      multicast:
        enabled: true
    rest-api:
      enabled: true

然后启动成员。我正在使用 Hazelcast 版本 5.3.0:

HazelcastInstance instance = Hazelcast.newHazelcastInstance();
Config config = instance.getConfig();
String property = config.getProperty("hazelcast.phone.home.enabled");

您将看到它正在使用 yaml 文件中的值。

英文:

Have a hazelcast.yaml as below. This is just an example to show how to use properties

hazelcast:
  properties:
    hazelcast.phone.home.enabled : false
  network:
    join:
      multicast:
        enabled: true
    rest-api:
      enabled: true

Then start the member. I am using Hazelcast version 5.3.0

HazelcastInstance instance = Hazelcast.newHazelcastInstance();
Config configc = hazelcastInstance1.getConfig();
String property = config.getProperty("hazelcast.phone.home.enabled");

You will see that it is using the value in the yaml file

huangapple
  • 本文由 发表于 2023年8月10日 12:53:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76872733.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定