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

Alexei Scherbakov updated IGNITE-4378:
--------------------------------------
    Description: 
Currently both default affinity function(AF) implementations randomly choose 
primary partition among all topology nodes.

This may not be enough to handle complex data placement scenarios without 
implementing own AF.

On example, some partitions can be assigned to more powerful hardware, or 
limited to subset of cluster nodes due to ease of management or fault tolerance 
scenarios.

We should implement node filter, which will allow to choose subset of cluster 
nodes to place primary and backup partitions.

With already existing ability to filter backup nodes (using 
{{AffinityBackupFilter}}) it will allow to implement different approaches to 
data placement with Ignite without resorting to custom AF.

It's also desirable to include a practical example of both topology filters 
based on node attribute values.

Proposed primary filter interface is below.

{noformat}
/**
 * Allows partition placement to subset of cluster node.
 *
 * Backup nodes also will be assigned from the subset.
 */
public interface AffinityPrimaryFilter extends IgniteBiClosure<Integer, 
List<ClusterNode>, List<ClusterNode>> {
    /**
     * Return nodes allowed to contain given partition.
     * @param partition Partition.
     * @param currentTopologyNodes All nodes from current topology.
     * @return Subset of nodes.
     */
    @Override public List<ClusterNode> apply(Integer partition, 
List<ClusterNode> currentTopologyNodes);
}
{noformat}


  was:
# Every node receives a set of attributes on startup
# Affinity function should receive pluggable {{AffinityResolver}} responsible 
for selecting primary and backups based on the node attributes.

Need to suggest API for the pluggable {{AffinityResolver}} 

        Summary: Affinity function should support assigning partition to subset 
of cluster nodes  (was: Affinity function should support selecting nodes based 
on node attributes)

> Affinity function should support assigning partition to subset of cluster 
> nodes
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-4378
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4378
>             Project: Ignite
>          Issue Type: New Feature
>          Components: cache
>            Reporter: Dmitriy Setrakyan
>            Assignee: Alexei Scherbakov
>             Fix For: 2.0
>
>
> Currently both default affinity function(AF) implementations randomly choose 
> primary partition among all topology nodes.
> This may not be enough to handle complex data placement scenarios without 
> implementing own AF.
> On example, some partitions can be assigned to more powerful hardware, or 
> limited to subset of cluster nodes due to ease of management or fault 
> tolerance scenarios.
> We should implement node filter, which will allow to choose subset of cluster 
> nodes to place primary and backup partitions.
> With already existing ability to filter backup nodes (using 
> {{AffinityBackupFilter}}) it will allow to implement different approaches to 
> data placement with Ignite without resorting to custom AF.
> It's also desirable to include a practical example of both topology filters 
> based on node attribute values.
> Proposed primary filter interface is below.
> {noformat}
> /**
>  * Allows partition placement to subset of cluster node.
>  *
>  * Backup nodes also will be assigned from the subset.
>  */
> public interface AffinityPrimaryFilter extends IgniteBiClosure<Integer, 
> List<ClusterNode>, List<ClusterNode>> {
>     /**
>      * Return nodes allowed to contain given partition.
>      * @param partition Partition.
>      * @param currentTopologyNodes All nodes from current topology.
>      * @return Subset of nodes.
>      */
>     @Override public List<ClusterNode> apply(Integer partition, 
> List<ClusterNode> currentTopologyNodes);
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to