Hi,

I checked next code:

        Ignite ignite =
IgnitionEx.start("examples/config/example-ignite.xml", "ignite-1");
        Ignite ignite2 =
IgnitionEx.start("examples/config/example-ignite.xml", "ignite-2");

        ClusterGroup cg = ignite2.cluster().forPredicate(new
IgnitePredicate<ClusterNode>() {
            Ignite filterIgnite;

            @Override public boolean apply(ClusterNode node) {
                System.out.println("ignite: " + (isNull(filterIgnite) ? null
: filterIgnite.name()));
                return true;
            }

            @IgniteInstanceResource
            void setFilterIgnite(Ignite filterIgnite) {
                this.filterIgnite = filterIgnite;
            }});

        // Deploy services only on server nodes.
        ignite.services(cg).deploy(new ServiceConfiguration()
            .setMaxPerNodeCount(1)
            .setName("my-service")
            .setService(new SimpleMapServiceImpl<>())
        );

It has the same behavior as nodeFilter predicate: it starts from the
coordinator node. And looks like it should be stateless too because it used
in ServiceConfiguration.

ignite: ignite-1
ignite: ignite-1
Service was initialized: my-service
Service was initialized: my-service
Executing distributed service: my-service
Executing distributed service: my-service
ignite: ignite-1
ignite: ignite-1
ignite: ignite-1
ignite: ignite-1

Maybe I missed something. Could you please provide the code that you propose
to use?

BR,
Andrei



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

Reply via email to