InputOperatorSpec getInputOperator(String inputStreamId) { if (!inEdges.containsKey(inputStreamId)) { return null; } return appDesc.getInputOperators().get(inputStreamId); }
InputOperatorSpec getInputOperator(String inputStreamId) { if (!inEdges.containsKey(inputStreamId)) { return null; } return appDesc.getInputOperators().get(inputStreamId); }
InputOperatorSpec getInputOperator(String inputStreamId) { if (!inEdges.containsKey(inputStreamId)) { return null; } return appDesc.getInputOperators().get(inputStreamId); }
InputOperatorSpec getInputOperator(String inputStreamId) { if (!inEdges.containsKey(inputStreamId)) { return null; } return appDesc.getInputOperators().get(inputStreamId); }
InputOperatorSpec getInputOperator(String inputStreamId) { if (!inEdges.containsKey(inputStreamId)) { return null; } return appDesc.getInputOperators().get(inputStreamId); }
Set<String> getNextOperatorIds(String streamId) { if (!appDesc.getInputOperators().containsKey(streamId) || !inEdges.containsKey(streamId)) { return new HashSet<>(); } return appDesc.getInputOperators().get(streamId).getRegisteredOperatorSpecs().stream() .map(op -> op.getOpId()).collect(Collectors.toSet()); }
Set<String> getNextOperatorIds(String streamId) { if (!appDesc.getInputOperators().containsKey(streamId) || !inEdges.containsKey(streamId)) { return new HashSet<>(); } return appDesc.getInputOperators().get(streamId).getRegisteredOperatorSpecs().stream() .map(op -> op.getOpId()).collect(Collectors.toSet()); }
Set<String> getNextOperatorIds(String streamId) { if (!appDesc.getInputOperators().containsKey(streamId) || !inEdges.containsKey(streamId)) { return new HashSet<>(); } return appDesc.getInputOperators().get(streamId).getRegisteredOperatorSpecs().stream() .map(op -> op.getOpId()).collect(Collectors.toSet()); }
Set<String> getNextOperatorIds(String streamId) { if (!appDesc.getInputOperators().containsKey(streamId) || !inEdges.containsKey(streamId)) { return new HashSet<>(); } return appDesc.getInputOperators().get(streamId).getRegisteredOperatorSpecs().stream() .map(op -> op.getOpId()).collect(Collectors.toSet()); }
Set<String> getNextOperatorIds(String streamId) { if (!appDesc.getInputOperators().containsKey(streamId) || !inEdges.containsKey(streamId)) { return new HashSet<>(); } return appDesc.getInputOperators().get(streamId).getRegisteredOperatorSpecs().stream() .map(op -> op.getOpId()).collect(Collectors.toSet()); }
Collection<OperatorSpec> getReachableOperators() { Set<OperatorSpec> inputOperatorsInJobNode = inEdges.values().stream().map(inEdge -> appDesc.getInputOperators().get(inEdge.getStreamSpec().getId())).filter(Objects::nonNull).collect(Collectors.toSet()); Set<OperatorSpec> reachableOperators = new HashSet<>(); findReachableOperators(inputOperatorsInJobNode, reachableOperators); return reachableOperators; }
Collection<OperatorSpec> getReachableOperators() { Set<OperatorSpec> inputOperatorsInJobNode = inEdges.values().stream().map(inEdge -> appDesc.getInputOperators().get(inEdge.getStreamSpec().getId())).filter(Objects::nonNull).collect(Collectors.toSet()); Set<OperatorSpec> reachableOperators = new HashSet<>(); findReachableOperators(inputOperatorsInJobNode, reachableOperators); return reachableOperators; }
Collection<OperatorSpec> getReachableOperators() { Set<OperatorSpec> inputOperatorsInJobNode = inEdges.values().stream().map(inEdge -> appDesc.getInputOperators().get(inEdge.getStreamSpec().getId())).filter(Objects::nonNull).collect(Collectors.toSet()); Set<OperatorSpec> reachableOperators = new HashSet<>(); findReachableOperators(inputOperatorsInJobNode, reachableOperators); return reachableOperators; }
Collection<OperatorSpec> getReachableOperators() { Set<OperatorSpec> inputOperatorsInJobNode = inEdges.values().stream().map(inEdge -> appDesc.getInputOperators().get(inEdge.getStreamSpec().getId())).filter(Objects::nonNull).collect(Collectors.toSet()); Set<OperatorSpec> reachableOperators = new HashSet<>(); findReachableOperators(inputOperatorsInJobNode, reachableOperators); return reachableOperators; }
Collection<OperatorSpec> getReachableOperators() { Set<OperatorSpec> inputOperatorsInJobNode = inEdges.values().stream().map(inEdge -> appDesc.getInputOperators().get(inEdge.getStreamSpec().getId())).filter(Objects::nonNull).collect(Collectors.toSet()); Set<OperatorSpec> reachableOperators = new HashSet<>(); findReachableOperators(inputOperatorsInJobNode, reachableOperators); return reachableOperators; }
jobGraph.getApplicationDescriptorImpl().getInputOperators().values());
/** * Groups streams participating in joins together. */ private static List<StreamSet> groupJoinedStreams(JobGraph jobGraph) { // Group input operator specs (input/intermediate streams) by the joins they participate in. Multimap<OperatorSpec, InputOperatorSpec> joinOpSpecToInputOpSpecs = OperatorSpecGraphAnalyzer.getJoinToInputOperatorSpecs( jobGraph.getApplicationDescriptorImpl().getInputOperators().values()); // Convert every group of input operator specs into a group of corresponding stream edges. List<StreamSet> streamSets = new ArrayList<>(); for (OperatorSpec joinOpSpec : joinOpSpecToInputOpSpecs.keySet()) { Collection<InputOperatorSpec> joinedInputOpSpecs = joinOpSpecToInputOpSpecs.get(joinOpSpec); StreamSet streamSet = getStreamSet(joinOpSpec.getOpId(), joinedInputOpSpecs, jobGraph); // If current join is a stream-table join, add the stream edges corresponding to side-input // streams associated with the joined table (if any). if (joinOpSpec instanceof StreamTableJoinOperatorSpec) { StreamTableJoinOperatorSpec streamTableJoinOperatorSpec = (StreamTableJoinOperatorSpec) joinOpSpec; Collection<String> sideInputs = ListUtils.emptyIfNull(streamTableJoinOperatorSpec.getTableSpec().getSideInputs()); Iterable<StreamEdge> sideInputStreams = sideInputs.stream().map(jobGraph::getStreamEdge)::iterator; Iterable<StreamEdge> streams = streamSet.getStreamEdges(); streamSet = new StreamSet(streamSet.getSetId(), Iterables.concat(streams, sideInputStreams)); } streamSets.add(streamSet); } return Collections.unmodifiableList(streamSets); }
/** * Groups streams participating in joins together. */ private static List<StreamSet> groupJoinedStreams(JobGraph jobGraph) { // Group input operator specs (input/intermediate streams) by the joins they participate in. Multimap<OperatorSpec, InputOperatorSpec> joinOpSpecToInputOpSpecs = OperatorSpecGraphAnalyzer.getJoinToInputOperatorSpecs( jobGraph.getApplicationDescriptorImpl().getInputOperators().values()); // Convert every group of input operator specs into a group of corresponding stream edges. List<StreamSet> streamSets = new ArrayList<>(); for (OperatorSpec joinOpSpec : joinOpSpecToInputOpSpecs.keySet()) { Collection<InputOperatorSpec> joinedInputOpSpecs = joinOpSpecToInputOpSpecs.get(joinOpSpec); StreamSet streamSet = getStreamSet(joinOpSpec.getOpId(), joinedInputOpSpecs, jobGraph); // If current join is a stream-table join, add the stream edges corresponding to side-input // streams associated with the joined table (if any). if (joinOpSpec instanceof StreamTableJoinOperatorSpec) { StreamTableJoinOperatorSpec streamTableJoinOperatorSpec = (StreamTableJoinOperatorSpec) joinOpSpec; Collection<String> sideInputs = ListUtils.emptyIfNull(streamTableJoinOperatorSpec.getTableSpec().getSideInputs()); Iterable<StreamEdge> sideInputStreams = sideInputs.stream().map(jobGraph::getStreamEdge)::iterator; Iterable<StreamEdge> streams = streamSet.getStreamEdges(); streamSet = new StreamSet(streamSet.getSetId(), Iterables.concat(streams, sideInputStreams)); } streamSets.add(streamSet); } return Collections.unmodifiableList(streamSets); }
/** * Groups streams participating in joins together. */ private static List<StreamSet> groupJoinedStreams(JobGraph jobGraph) { // Group input operator specs (input/intermediate streams) by the joins they participate in. Multimap<OperatorSpec, InputOperatorSpec> joinOpSpecToInputOpSpecs = OperatorSpecGraphAnalyzer.getJoinToInputOperatorSpecs( jobGraph.getApplicationDescriptorImpl().getInputOperators().values()); // Convert every group of input operator specs into a group of corresponding stream edges. List<StreamSet> streamSets = new ArrayList<>(); for (OperatorSpec joinOpSpec : joinOpSpecToInputOpSpecs.keySet()) { Collection<InputOperatorSpec> joinedInputOpSpecs = joinOpSpecToInputOpSpecs.get(joinOpSpec); StreamSet streamSet = getStreamSet(joinOpSpec.getOpId(), joinedInputOpSpecs, jobGraph); // If current join is a stream-table join, add the stream edges corresponding to side-input // streams associated with the joined table (if any). if (joinOpSpec instanceof StreamTableJoinOperatorSpec) { StreamTableJoinOperatorSpec streamTableJoinOperatorSpec = (StreamTableJoinOperatorSpec) joinOpSpec; Collection<String> sideInputs = ListUtils.emptyIfNull(streamTableJoinOperatorSpec.getTableSpec().getSideInputs()); Iterable<StreamEdge> sideInputStreams = sideInputs.stream().map(jobGraph::getStreamEdge)::iterator; Iterable<StreamEdge> streams = streamSet.getStreamEdges(); streamSet = new StreamSet(streamSet.getSetId(), Iterables.concat(streams, sideInputStreams)); } streamSets.add(streamSet); } return Collections.unmodifiableList(streamSets); }
/** * Groups streams participating in joins together. */ private static List<StreamSet> groupJoinedStreams(JobGraph jobGraph) { // Group input operator specs (input/intermediate streams) by the joins they participate in. Multimap<OperatorSpec, InputOperatorSpec> joinOpSpecToInputOpSpecs = OperatorSpecGraphAnalyzer.getJoinToInputOperatorSpecs( jobGraph.getApplicationDescriptorImpl().getInputOperators().values()); // Convert every group of input operator specs into a group of corresponding stream edges. List<StreamSet> streamSets = new ArrayList<>(); for (OperatorSpec joinOpSpec : joinOpSpecToInputOpSpecs.keySet()) { Collection<InputOperatorSpec> joinedInputOpSpecs = joinOpSpecToInputOpSpecs.get(joinOpSpec); StreamSet streamSet = getStreamSet(joinOpSpec.getOpId(), joinedInputOpSpecs, jobGraph); // If current join is a stream-table join, add the stream edges corresponding to side-input // streams associated with the joined table (if any). if (joinOpSpec instanceof StreamTableJoinOperatorSpec) { StreamTableJoinOperatorSpec streamTableJoinOperatorSpec = (StreamTableJoinOperatorSpec) joinOpSpec; Collection<String> sideInputs = ListUtils.emptyIfNull(streamTableJoinOperatorSpec.getTableSpec().getSideInputs()); Iterable<StreamEdge> sideInputStreams = sideInputs.stream().map(jobGraph::getStreamEdge)::iterator; Iterable<StreamEdge> streams = streamSet.getStreamEdges(); streamSet = new StreamSet(streamSet.getSetId(), Iterables.concat(streams, sideInputStreams)); } streamSets.add(streamSet); } return Collections.unmodifiableList(streamSets); }