hazelcastConfig.getMapConfigs().put("myMap", new MapConfig("Map1").setBackupCount(0).setAsyncBackupCount(0));
If I don't do it as mentioned above(basically not set any MapConfig) then it shows up on Hazelcast Management Center.
Highly appreciate your help!!!--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/25cc9aaf-a151-441d-823b-c0c34a121360%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
e.g. config.getMapConfigs().put("ABC", new MapConfig().setName("ABC").setStatisticsEnabled(false).setBackupCount(0).setAsyncBackupCount(0));
public class MapConfigDoesNotShowUp {
public static void main(String[] args) throws InterruptedException {
....
config.getMapConfigs().put("map1",new MapConfig("1").setStatisticsEnabled(false).setBackupCount(0).setAsyncBackupCount(0));
config.getMapConfigs().put("map2",new MapConfig("2").setBackupCount(0).setAsyncBackupCount(0));
HazelcastInstance instance = Hazelcast.newHazelcastInstance(config);
instance.getMap("map1").put("test","test");
instance.getMap("map2").put("test","test");
}
}
In the current status, management center starts to show map2 but it does not show map1. setStatisticsEnabled's default value is true for map.
public static void main(String[] args) {
Config config = new Config();
// Create Join Config with TCP.
config.getNetworkConfig().setJoin(new JoinConfig()
.setMulticastConfig(
new MulticastConfig().setEnabled(false))
.setTcpIpConfig(
new TcpIpConfig().setEnabled(true)
.addMember(getNetworkInterfaces().get(0)).addMember(getNetworkInterfaces().get(1))));
config.setManagementCenterConfig(
new ManagementCenterConfig()
.setEnabled(true)
.setUrl("http://1.1.1.1:8080/mancenter"));
config.getMapConfigs().put("map1",new MapConfig("1").setBackupCount(0).setAsyncBackupCount(0));
config.getMapConfigs().put("map2",new MapConfig("2").setBackupCount(0).setAsyncBackupCount(0));
// If we remove below line then MAP start showing on Management Center.
config.getMapConfigs().put("111", new MapConfig("ABC").setBackupCount(0).setAsyncBackupCount(0));
config.getMapConfigs().put("222", new MapConfig("XYZ").setBackupCount(0).setAsyncBackupCount(0));
HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance(config);
hazelcastInstance.getMap("map1").put("test","test");
hazelcastInstance.getMap("map2").put("test","test");
hazelcastInstance.getMap("ABC").put("name", "manish");
hazelcastInstance.getMap("XYZ").put("name", "manish");
}
public static List<String> getNetworkInterfaces() {
try {
return list(NetworkInterface.getNetworkInterfaces()).stream()
.flatMap(ni -> list(ni.getInetAddresses()).stream())
.filter(address -> !address.isAnyLocalAddress())
.filter(address -> !address.isMulticastAddress())
.filter(address -> !address.isLoopbackAddress())
.filter(address -> !(address instanceof Inet6Address))
.map(InetAddress::getHostAddress)
.collect(Collectors.toList());
} catch (final SocketException ex) {
throw new RuntimeException("Unable to determine network interfaces for this node.", ex);
}
}
hazelcastInstance.getMap("111").put("name", "manish");
hazelcastInstance.getMap("ABC").put("name", "manish");
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/f4f5f1fa-d49e-4f2e-9068-a5cf19418aed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
