when i excute compute.broadcast(),why run on only one node?

classic Classic list List threaded Threaded
2 messages Options
jack jack
Reply | Threaded
Open this post in threaded view
|

when i excute compute.broadcast(),why run on only one node?

This post has NOT been accepted by the mailing list yet.
Code as below:
IgniteCompute compute = ignite.compute(ignite.cluster().forRemotes());

    // Print out hello message on remote nodes in projection.
    compute.broadcast(
       new IgniteRunnable() {
           @Override public void run() {
            int i=0;
               // Print ID of remote node on remote node.
               log.info(">>> Hello Node: " + ignite.cluster().localNode().id());
               Iterator<Entry<String, Map<String,String>>> it=mycache.localEntries().iterator();
            while(it.hasNext())
            {    i++;
            Entry<String, Map<String,String>> et=it.next();
            log.info(et.getKey()+"******"+et.getValue());
            }
            log.info("cahche record number*************:"+i);
           }
       }
    );
only run on one node ,I have three server cluster, why?
Denis Magda Denis Magda
Reply | Threaded
Open this post in threaded view
|

Re: when i excute compute.broadcast(),why run on only one node?

Hi,

Please make sure that all your three nodes already joined the same cluster at the time you're sending the broadcast closure.

Check that on the sender side there is a line like this in the logs:
Topology snapshot [ver=3, servers=3, clients=0, CPUs=8, heap=3.5GB]

And please properly subscribe to the user list (this way we will not have to manually approve your emails). All you need to do is send an email to “user-subscribe@ignite.apache.org” and follow simple instructions in the reply.

Regards,
Denis