Пример #1
0
        public void TestGroupingByNode(string[] nodes)
        {
            var nodeList = new List <string>(nodes);

            List <IActorRef> list = new List <IActorRef>();

            for (int k = 0; k < nodes.Length; k++)
            {
                list.Add(new MockedActor(nodes[k]));
            }

            var map = HtmSparseIntDictionary <Column> .CreatePartitionMap(nodeList, 4096, 10);

            int i = 0;

            foreach (var item in map)
            {
                item.ActorRef = list[i++ % nodes.Length];
            }

            var groupedNodes = HtmSparseIntDictionary <object> .GetPartitionsByNode(map);
        }