MAX SIZE policies of eviction in map is case-sensitive?

111 views
Skip to first unread message

Santosh Math

unread,
Nov 11, 2013, 4:51:30 AM11/11/13
to haze...@googlegroups.com
Does the max size policies of eviction in map is case-sensitive? The reason is when i ran the test in "hazelcast-book-examples/chapter-distributed-map/eviction" using 3.1.2 snapshot, it failed with following exception,

Exception in thread "main" com.hazelcast.core.HazelcastException: java.lang.IllegalArgumentException: No enum constant com.hazelcast.config.MaxSizeConfig.MaxSizePolicy.used_heap_size
        at com.hazelcast.config.XmlConfigBuilder.build(XmlConfigBuilder.java:177)
        at com.hazelcast.config.XmlConfigBuilder.build(XmlConfigBuilder.java:170)
        at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:61)
        at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:87)
        at Main.main(Main.java:5)
Caused by: java.lang.IllegalArgumentException: No enum constant com.hazelcast.config.MaxSizeConfig.MaxSizePolicy.used_heap_size
        at java.lang.Enum.valueOf(Unknown Source)
        at com.hazelcast.config.MaxSizeConfig$MaxSizePolicy.valueOf(MaxSizeConfig.java:24)
        at com.hazelcast.config.XmlConfigBuilder.handleMap(XmlConfigBuilder.java:811)
        at com.hazelcast.config.XmlConfigBuilder.handleConfig(XmlConfigBuilder.java:281)
        at com.hazelcast.config.XmlConfigBuilder.parse(XmlConfigBuilder.java:210)
        at com.hazelcast.config.XmlConfigBuilder.build(XmlConfigBuilder.java:175)
        ... 4 more

When i changed "used_heap_size" to "USED_HEAP_SIZE", then it worked without exception.

I also checked the documentation of 2.6, where the policies are mentioned in small-letters where as in 3.1 documentation it's in upper-case. Is it made case sensitive in latest version?

Thanks,
Santosh

Ahmet Mircik

unread,
Nov 14, 2013, 7:34:20 AM11/14/13
to haze...@googlegroups.com
definitely both of them should work. issue is here : https://github.com/hazelcast/hazelcast/issues/1152


--
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 http://groups.google.com/group/hazelcast.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages