Search in sources :

Example 11 with Node

use of com.sequenceiq.cloudbreak.ha.domain.Node in project cloudbreak by hortonworks.

the class EvenFlowDistributorTest method testFlowDistributionSingleNode.

@Test
public void testFlowDistributionSingleNode() {
    Node node = new Node(MY_ID);
    List<String> flowLogs = getFlowIds(11);
    Map<Node, List<String>> result = flowDistributor.distribute(flowLogs, Collections.singletonList(node));
    assertEquals(11L, result.get(node).size());
}
Also used : Node(com.sequenceiq.cloudbreak.ha.domain.Node) ArrayList(java.util.ArrayList) List(java.util.List) Test(org.junit.Test)

Aggregations

Node (com.sequenceiq.cloudbreak.ha.domain.Node)11 ArrayList (java.util.ArrayList)10 List (java.util.List)8 FlowLog (com.sequenceiq.flow.domain.FlowLog)7 HashMap (java.util.HashMap)7 PollGroup (com.sequenceiq.cloudbreak.cloud.scheduler.PollGroup)6 InMemoryStateStore (com.sequenceiq.cloudbreak.cloud.store.InMemoryStateStore)6 Clock (com.sequenceiq.cloudbreak.common.service.Clock)6 TransactionService (com.sequenceiq.cloudbreak.common.service.TransactionService)6 TransactionExecutionException (com.sequenceiq.cloudbreak.common.service.TransactionService.TransactionExecutionException)6 FlowDistributor (com.sequenceiq.cloudbreak.ha.service.FlowDistributor)6 NodeService (com.sequenceiq.cloudbreak.ha.service.NodeService)6 HaApplication (com.sequenceiq.cloudbreak.service.ha.HaApplication)6 HeartbeatService (com.sequenceiq.cloudbreak.service.ha.HeartbeatService)6 OperationType (com.sequenceiq.flow.api.model.operation.OperationType)6 InMemoryCleanup (com.sequenceiq.flow.cleanup.InMemoryCleanup)6 ApplicationFlowInformation (com.sequenceiq.flow.core.ApplicationFlowInformation)6 Flow2Handler (com.sequenceiq.flow.core.Flow2Handler)6 FlowLogService (com.sequenceiq.flow.core.FlowLogService)6 FlowRegister (com.sequenceiq.flow.core.FlowRegister)6