@Test public void testScheduleLocal() { Split split = new Split(CONNECTOR_ID, TestingTransactionHandle.create(), new TestSplitLocal()); Set<Split> splits = ImmutableSet.of(split); Map.Entry<Node, Split> assignment = Iterables.getOnlyElement(nodeSelector.computeAssignments(splits, ImmutableList.copyOf(taskMap.values())).getAssignments().entries()); assertEquals(assignment.getKey().getHostAndPort(), split.getAddresses().get(0)); assertEquals(assignment.getValue(), split); }
@Test public void testScheduleLocal() { Split split = new Split(CONNECTOR_ID, TestingTransactionHandle.create(), new TestSplitLocal()); Set<Split> splits = ImmutableSet.of(split); Map.Entry<Node, Split> assignment = Iterables.getOnlyElement(nodeSelector.computeAssignments(splits, ImmutableList.copyOf(taskMap.values())).getAssignments().entries()); assertEquals(assignment.getKey().getHostAndPort(), split.getAddresses().get(0)); assertEquals(assignment.getValue(), split); }
for (Split split : splits) { if (!split.isRemotelyAccessible()) { List<Node> candidateNodes = selectExactNodes(nodeMap, split.getAddresses(), includeCoordinator); if (candidateNodes.isEmpty()) { log.debug("No nodes available to schedule %s. Available nodes %s", split, nodeMap.getNodesByHost().keys()); int chosenDepth = 0; Set<NetworkLocation> locations = new HashSet<>(); for (HostAddress host : split.getAddresses()) { locations.add(networkLocationCache.get(host));
for (Split split : splits) { if (!split.isRemotelyAccessible()) { List<Node> candidateNodes = selectExactNodes(nodeMap, split.getAddresses(), includeCoordinator); if (candidateNodes.isEmpty()) { log.debug("No nodes available to schedule %s. Available nodes %s", split, nodeMap.getNodesByHost().keys()); int chosenDepth = 0; Set<NetworkLocation> locations = new HashSet<>(); for (HostAddress host : split.getAddresses()) { locations.add(networkLocationCache.get(host));
candidateNodes = selectExactNodes(nodeMap, split.getAddresses(), includeCoordinator);
candidateNodes = selectExactNodes(nodeMap, split.getAddresses(), includeCoordinator);
int rack2 = 0; for (Split split : unassigned) { String rack = topology.locate(split.getAddresses().get(0)).getSegments().get(0); switch (rack) { case "rack1":
int rack2 = 0; for (Split split : unassigned) { String rack = topology.locate(split.getAddresses().get(0)).getSegments().get(0); switch (rack) { case "rack1":