ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolay Izhikov <nizhi...@apache.org>
Subject Continuous Query With Transformer are ready for merge
Date Tue, 06 Feb 2018 17:45:47 GMT
Hello, Igniters.

Improvement of Continuous Query public API are ready for merge.
AFAIK Anton Vinogradov and Yakov Zhdanov are happy with proposed API. [1]

With this improvement we can transform entry on the server node before sending it to the listener
to reduce network utilization.

Example of usage:

ContinuousQueryWithTransformer<Long, Value, T> cqwt = new ContinuousQueryWithTransformer<>();

cqwt.setRemoteTransformerFactory(FactoryBuilder.factoryOf(new IdTransformer()));

CQWTListener lsnr = new CQWTListener();



public static class IdTransformer implements IgniteClosure<CacheEntryEvent<? extends
Long, ? extends Value>, Long> {
   @Override public Long apply(CacheEntryEvent<? extends Long, ? extends Value> event)
       return event.getValue().id;

public static class CQWTListener<Long> implements EventListener<Long> {
   @Override public void onUpdated(Iterable<? extends Long> ids) {
       for (Long id : ids) 


Implementation checked on TC, benchmarks [2][3] passed as well and we’re ready to merge
changes to the master branch.

Any objections?

[1] https://github.com/apache/ignite/pull/2372
[2] https://github.com/nizhikov/ignite-425-benchmark
[3] https://issues.apache.org/jira/browse/IGNITE-425?focusedCommentId=16353812&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16353812

View raw message