IMap.entrySet(predicate) retrieves all values in the map

187 views
Skip to first unread message

Alexis Lauthier

unread,
Oct 26, 2011, 10:27:31 AM10/26/11
to Hazelcast
Hi,

I'm trying to get several entries by key in a map, using a
PredicateBuilder. The following code :

IMap<Integer, Integer> map = Hazelcast.getMap("test");
map.put(1, 11);
map.put(2, 22);
map.put(3, 33);

PredicateBuilder predicate = new
PredicateBuilder().getEntryObject().key().in(1, 2);
System.out.println(predicate);
for (Entry<Integer, Integer> e : map.entrySet(predicate)) {
System.out.println(e.getKey());
}

prints :

QueryBuilder{
com.hazelcast.query.EntryKeyObject@f1b6fa6 IN (1,2)
}
3
1
2

I don't understand why I'm getting the "3" entry, since I'm only
requesting "1" and "2". Am I using the predicate incorrectly, or is it
a bug ?

Mehmet Dogan

unread,
Oct 27, 2011, 6:20:47 AM10/27/11
to haze...@googlegroups.com
Hi,

It seems to be a bug. Please create an issue.

@mmdogan





--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.


Alexis Lauthier

unread,
Oct 27, 2011, 12:53:39 PM10/27/11
to Hazelcast

Mehmet Dogan

unread,
Nov 1, 2011, 10:45:16 AM11/1/11
to haze...@googlegroups.com
This issue was closed by revision r2213.
@mmdogan




On Thu, Oct 27, 2011 at 7:53 PM, Alexis Lauthier <alx7539...@yahoo.com> wrote:
Issue: http://code.google.com/p/hazelcast/issues/detail?id=711
Reply all
Reply to author
Forward
0 new messages