@Override public RecordCursor cursor(ConnectorSession session, TupleDomain<Integer> constraint) { Builder table = InMemoryRecordSet.builder(NODES_TABLE); AllNodes allNodes = nodeManager.getAllNodes(); addRows(table, allNodes.getActiveNodes(), ACTIVE); addRows(table, allNodes.getInactiveNodes(), INACTIVE); addRows(table, allNodes.getShuttingDownNodes(), SHUTTING_DOWN); return table.build().cursor(); }
private boolean isCoordinator(Node node) { return nodeManager.getCoordinators().contains(node); }
public Set<Node> getActiveNodesWithConnector(String connectorName) { return nodeManager.getActiveDatasourceNodes(connectorName); }
public final AllNodes refreshNodes() { serviceSelectorManager.forceRefresh(); nodeManager.refreshNodes(); return nodeManager.getAllNodes(); }