ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Magda (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-8629) There is no documentation about on which nodes Ignite Predicate will be executed during service/cache deploying with NodeFilter
Date Fri, 07 Sep 2018 15:21:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-8629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Denis Magda updated IGNITE-8629:
--------------------------------
    Fix Version/s:     (was: 2.7)
                   2.8

> There is no documentation about on which nodes Ignite Predicate will be executed during
service/cache deploying with NodeFilter
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-8629
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8629
>             Project: Ignite
>          Issue Type: Task
>          Components: documentation
>    Affects Versions: 2.4
>            Reporter: Andrey Aleksandrov
>            Priority: Major
>             Fix For: 2.8
>
>
> In documentation we could see that:
> [https://apacheignite.readme.io/docs/service-grid#section-node-filter-based-deployment]
> This approach is based on a filtering predicate that gets called on every node at the
time Ignite Service engine determines a set of possible candidates for the Ignite Service
deployment. 
> Looks like it's not correct because in Ignite 2.4 next code:
> {code:java}
> Ignite ignite = IgnitionEx.start("examples/config/example-ignite.xml", "ignite-1");
> Ignite ignite2 = IgnitionEx.start("examples/config/example-ignite.xml", "ignite-2");
> // Deploy services only on server nodes.
> ignite2.services().deploy(new ServiceConfiguration()
>     .setMaxPerNodeCount(1)
>     .setNodeFilter(new IgnitePredicate<ClusterNode>() {
>         @IgniteInstanceResource Ignite filterIgnite;
>         @Override public boolean apply(ClusterNode node) {
>             System.out.println("Is local node: " + node.isLocal());
>             System.out.println("ignite: " + (isNull(filterIgnite) ? null : filterIgnite.name()));
>             return true;
>         }
>     })
>     .setName("my-service")
>     .setService(new SimpleMapServiceImpl<>())
> );
> {code}
> Will be executed only on "ignite-1"
> {code:java}
> Is local node: true
> ignite: ignite-1
> Is local node: false
> ignite: ignite-1
> Service was initialized: my-service
> Is local node: true
> ignite: ignite-1
> Is local node: false
> ignite: ignite-1
> Service was initialized: my-service
> Executing distributed service: my-service
> Executing distributed service: my-service
> Is local node: true
> ignite: ignite-1
> Is local node: false
> ignite: ignite-1
> {code}
> Looks like ignite-1 is the coordinator node in this case. But this behavior is different
from described in the documentation.
> Also, this should be described in case of the cache deployment:
> {code:java}
> Ignite ignite = IgnitionEx.start("examples/config/example-ignite.xml", "ignite-1");
> Ignite ignite2 = IgnitionEx.start("examples/config/example-ignite.xml", "ignite-2");
> // Deploy services only on server nodes.
> ignite2.services().deploy(new ServiceConfiguration()
>     .setMaxPerNodeCount(1)
>     .setNodeFilter(new IgnitePredicate<ClusterNode>() {
>         Ignite filterIgnite;
>         @Override public boolean apply(ClusterNode node) {
>             System.out.println("Is local node: " + node.isLocal());
>             System.out.println("ignite: " + (isNull(filterIgnite) ? null : filterIgnite.name()));
>             return true;
>         }
>         @IgniteInstanceResource
>         void setFilterIgnite(Ignite filterIgnite) {
>             this.filterIgnite = filterIgnite;
>         }
>     })
>     .setName("my-service")
>     .setService(new SimpleMapServiceImpl<>())
> );
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message