You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Taras Ledkov (JIRA)" <ji...@apache.org> on 2017/07/05 14:36:00 UTC

[jira] [Comment Edited] (IGNITE-4756) Print info about partition distribution to log

    [ https://issues.apache.org/jira/browse/IGNITE-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074861#comment-16074861 ] 

Taras Ledkov edited comment on IGNITE-4756 at 7/5/17 2:35 PM:
--------------------------------------------------------------

[~javaller] my comments:
# Ignite logger must not be created in constructor of AF. It is injected by Ignite on affinity function initialization (see more about @LoggerResource and @IgniteInstanceResource annotations);
At the tests use test injection:
{{GridTestUtils.setFieldValue(aff, "log", log);}}
# Statistic must be calculated only for local node (only for one node). The part of calculation (increment of count) can be placed inside the method {{assignPartition}}; Local node ID can be gathered from ignite instance (see @IgniteInstanceResource annotations);
# The statistic structure for one node will be simplified to integer array ({{int[] stat}}) that contains counts of partitions (primary, back1, backup2, etc); 



was (Author: tledkov-gridgain):
[~javaller] my comments:
# Ignite logger must not be created in constructor of AF. It is injected by Ignite on affinity function initialization (see more about @LoggerResource and @IgniteInstanceResource annotations);
# Statistic must be calculated only for local node (only for one node). The part of calculation (increment of count) can be placed inside the method {{assignPartition}}; Local node ID can be gathered from ignite instance (see @IgniteInstanceResource annotations);
# The statistic structure for one node will be simplified to integer array ({{int[] stat}}) that contains counts of partitions (primary, back1, backup2, etc); 


> Print info about partition distribution to log 
> -----------------------------------------------
>
>                 Key: IGNITE-4756
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4756
>             Project: Ignite
>          Issue Type: Improvement
>          Components: general
>            Reporter: Taras Ledkov
>            Assignee: Vadim Opolski
>            Priority: Minor
>              Labels: newbie
>             Fix For: 2.2
>
>
> Print information about affinity assignment to log.
> e.g.: 
> {noformat}
> <cache_name>: primary, [<node_ID_0>, <partitions_count>, <percentage_of_parts_count>], ...,  [<node_ID_N>, <partitions_count>, <percentage_of_parts_count>]
> <cache_name>: backup_0, [<node_ID_0>, <partitions_count>, <percentage_of_parts_count>], ...,  [<node_ID_N>, <partitions_count>, <percentage_of_parts_count>]
> ...
> <cache_name>: backup_N, [<node_ID_0>, <partitions_count>, <percentage_of_parts_count>], ...,  [<node_ID_N>, <partitions_count>, <percentage_of_parts_count>]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)