Skip to content
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

IMap.removeAll() doesn't support PartitionPredicate #12238

Closed
awakestu opened this issue Feb 1, 2018 · 3 comments
Closed

IMap.removeAll() doesn't support PartitionPredicate #12238

awakestu opened this issue Feb 1, 2018 · 3 comments

Comments

@awakestu
Copy link

@awakestu awakestu commented Feb 1, 2018

When trying to call removeAll with PartitionPredicate it results in UnsupportedOperationException

@dimas
Copy link

@dimas dimas commented Feb 4, 2018

JFYI, Hazelcast is 3.9 and operation is invoked via client (so not directly on a member).

@blazember
Copy link
Contributor

@blazember blazember commented Feb 12, 2018

@awakestu and @dimas IMap.removeAll() does not support PartitionPredicate.
PartitionPredicate was added for some specific use cases and is not yet supported by each method accepting Predicates.

As an alternative, IMap.executeOnEntries() accepts PartitionPrecicate. With that, entries can be removed from the map by setting the value to null in the EntryProcessor. Does this fit in your use-case?

@mmedenjak mmedenjak added this to the 3.10 milestone Feb 19, 2018
@jerrinot jerrinot removed this from the 3.10 milestone Feb 28, 2018
@jerrinot jerrinot added this to the 3.11 milestone Feb 28, 2018
@dimas
Copy link

@dimas dimas commented Mar 11, 2018

@blazember, thanks for the suggestion but we were not looking for other ways of doing the same thing - we can just call keySet() with the predicate and then iterate over keys calling delete (and this is what we actually do).
Still, the fact that removeAll does not handle PartitionPredicate properly seems like an oversight not a feature than need defending :)
The removeAll javadoc does not mention anywhere that certain types of predicates are not supported and I do not see any reason not to support it properly. keySet handles it so why removeAll should not?
Cheers

@mmedenjak mmedenjak removed this from the 3.11 milestone Aug 28, 2018
@mmedenjak mmedenjak added this to the 3.12 milestone Aug 28, 2018
@taburet taburet self-assigned this Nov 7, 2018
@dbrimley dbrimley removed this from the 3.12 milestone Nov 8, 2018
@dbrimley dbrimley added this to the 3.13 milestone Nov 8, 2018
@mmedenjak mmedenjak removed this from the 3.13 milestone Nov 12, 2018
@mmedenjak mmedenjak added this to the 3.12 milestone Nov 12, 2018
taburet added a commit to taburet/hazelcast that referenced this issue Nov 13, 2018
@mmedenjak mmedenjak removed this from the 3.12 milestone Jan 25, 2019
@mmedenjak mmedenjak added this to the 3.13 milestone Jan 25, 2019
@mmedenjak mmedenjak removed this from the 3.13 milestone Jan 25, 2019
@mmedenjak mmedenjak added this to the 3.12 milestone Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants