Hi, This must be something very simple. I am adding 100 items to data
streamer. But it is not flushing items to cache. Is there a settings much
enables it. Cache size is zero. Am I doing something wrong ?

public class DataStreamerExample {
public static void main(String[] args) throws InterruptedException {
        Ignite ignite = Ignition.start("examples/config/example-ignite.xml");
        CacheConfiguration<Long, Long> config = new
CacheConfiguration<>("mycache");
        IgniteCache<Long, Long> cache = ignite.getOrCreateCache(config);
        IgniteDataStreamer<Long, Long> streamer = 
ignite.dataStreamer("mycache");
        LongStream.range(1, 100).forEach( l->{
                System.out.println("Adding to streamer "+ l);
                streamer.addData(l, l);
        });
        System.out.println(streamer.perNodeBufferSize());
        System.out.println("Cache size : "+ cache.size(CachePeekMode.ALL));
        cache.query(new ScanQuery<>()).getAll().stream().forEach(entry->{
                System.out.println("cache Entry: " + entry.getKey()+" "+
entry.getValue());
        });
}
}




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to