/** * See {@link RuntimeIdManager#generateBlockIdWildcard(String, int)} for information on block wildcards. * @param producerTaskIndex to use. * @return wildcard block id that corresponds to "ANY" task attempt of the task index. */ private String generateWildCardBlockId(final int producerTaskIndex) { final Optional<DuplicateEdgeGroupPropertyValue> duplicateDataProperty = runtimeEdge.getPropertyValue(DuplicateEdgeGroupProperty.class); if (!duplicateDataProperty.isPresent() || duplicateDataProperty.get().getGroupSize() <= 1) { return RuntimeIdManager.generateBlockIdWildcard(runtimeEdge.getId(), producerTaskIndex); } final String duplicateEdgeId = duplicateDataProperty.get().getRepresentativeEdgeId(); return RuntimeIdManager.generateBlockIdWildcard(duplicateEdgeId, producerTaskIndex); }
/** * See {@link RuntimeIdManager#generateBlockIdWildcard(String, int)} for information on block wildcards. * @param producerTaskIndex to use. * @return wildcard block id that corresponds to "ANY" task attempt of the task index. */ private String generateWildCardBlockId(final int producerTaskIndex) { final Optional<DuplicateEdgeGroupPropertyValue> duplicateDataProperty = runtimeEdge.getPropertyValue(DuplicateEdgeGroupProperty.class); if (!duplicateDataProperty.isPresent() || duplicateDataProperty.get().getGroupSize() <= 1) { return RuntimeIdManager.generateBlockIdWildcard(runtimeEdge.getId(), producerTaskIndex); } final String duplicateEdgeId = duplicateDataProperty.get().getRepresentativeEdgeId(); return RuntimeIdManager.generateBlockIdWildcard(duplicateEdgeId, producerTaskIndex); }
e.getPropertyValue(DuplicateEdgeGroupProperty.class).get(); if (firstDuplicateEdgeValue.isRepresentativeEdgeDecided()) { duplicateEdgeGroupProperty.setRepresentativeEdgeId(firstDuplicateEdgeValue.getRepresentativeEdgeId()); } else { duplicateEdgeGroupProperty.setRepresentativeEdgeId(firstEdge.getId());
physicalStageEdge.getPropertyValue(DuplicateEdgeGroupProperty.class); final String representativeEdgeId = dupProp.isPresent() ? dupProp.get().getRepresentativeEdgeId() : physicalStageEdge.getId();
e.getPropertyValue(DuplicateEdgeGroupProperty.class).get(); if (firstDuplicateEdgeValue.isRepresentativeEdgeDecided()) { duplicateEdgeGroupProperty.setRepresentativeEdgeId(firstDuplicateEdgeValue.getRepresentativeEdgeId()); } else { duplicateEdgeGroupProperty.setRepresentativeEdgeId(firstEdge.getId());
physicalStageEdge.getPropertyValue(DuplicateEdgeGroupProperty.class); final String representativeEdgeId = dupProp.isPresent() ? dupProp.get().getRepresentativeEdgeId() : physicalStageEdge.getId();
/** * Constructor. * * @param srcTaskId the id of the source task. * @param dstIrVertex the destination IR vertex. * @param runtimeEdge the {@link RuntimeEdge}. * @param blockManagerWorker the {@link BlockManagerWorker}. */ BlockOutputWriter(final String srcTaskId, final IRVertex dstIrVertex, final RuntimeEdge<?> runtimeEdge, final BlockManagerWorker blockManagerWorker) { this.runtimeEdge = runtimeEdge; this.dstIrVertex = dstIrVertex; this.partitioner = Partitioner.getPartitioner(runtimeEdge); this.blockManagerWorker = blockManagerWorker; this.blockStoreValue = runtimeEdge.getPropertyValue(DataStoreProperty.class) .orElseThrow(() -> new RuntimeException("No data store property on the edge")); blockToWrite = blockManagerWorker.createBlock( RuntimeIdManager.generateBlockId(runtimeEdge.getId(), srcTaskId), blockStoreValue); final Optional<DuplicateEdgeGroupPropertyValue> duplicateDataProperty = runtimeEdge.getPropertyValue(DuplicateEdgeGroupProperty.class); nonDummyBlock = !duplicateDataProperty.isPresent() || duplicateDataProperty.get().getRepresentativeEdgeId().equals(runtimeEdge.getId()) || duplicateDataProperty.get().getGroupSize() <= 1; }
/** * Constructor. * * @param hashRangeMultiplier the {@link org.apache.nemo.conf.JobConf.HashRangeMultiplier}. * @param srcTaskId the id of the source task. * @param dstIrVertex the destination IR vertex. * @param runtimeEdge the {@link RuntimeEdge}. * @param blockManagerWorker the {@link BlockManagerWorker}. */ BlockOutputWriter(final int hashRangeMultiplier, final String srcTaskId, final IRVertex dstIrVertex, final RuntimeEdge<?> runtimeEdge, final BlockManagerWorker blockManagerWorker) { this.runtimeEdge = runtimeEdge; this.dstIrVertex = dstIrVertex; this.partitioner = OutputWriter.getPartitioner(runtimeEdge, hashRangeMultiplier); this.blockManagerWorker = blockManagerWorker; this.blockStoreValue = runtimeEdge.getPropertyValue(DataStoreProperty.class) .orElseThrow(() -> new RuntimeException("No data store property on the edge")); blockToWrite = blockManagerWorker.createBlock( RuntimeIdManager.generateBlockId(runtimeEdge.getId(), srcTaskId), blockStoreValue); final Optional<DuplicateEdgeGroupPropertyValue> duplicateDataProperty = runtimeEdge.getPropertyValue(DuplicateEdgeGroupProperty.class); nonDummyBlock = !duplicateDataProperty.isPresent() || duplicateDataProperty.get().getRepresentativeEdgeId().equals(runtimeEdge.getId()) || duplicateDataProperty.get().getGroupSize() <= 1; }