ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pragmaticbigdata <amits...@gmail.com>
Subject Loading cache with DataStreamer
Date Sat, 04 Jun 2016 17:26:47 GMT
I am using apache ignite version 1.6. Assuming datastreamer is a better
approach to bulk load data performance wise I am trying to execute the below
code that gets hanged

        IgniteDataStreamer<String, ProductDetails> streamer =
ignite.dataStreamer(cacheName);

        List<IgniteFuture> futures = Lists.newArrayList();

        for (long i=1; i<= 100000; i++) {
            ProductDetails phone = new ProductDetails("phone" + i);
            //set other properties 
 
            futures.add(streamer.addData(phone.getName(), phone));

        }

        //wait for future objects
        for (IgniteFuture f : futures) {
            f.get();
        }

What am I missing in the above example?

Thanks,
Amit.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Loading-cache-with-DataStreamer-tp5421.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message