Source:
<code>public void populateDAG(DAG dag, Configuration conf) { <START> HDFSFileSplitter fileSplitter = dag.addOperator("FileSplitter", new HDFSFileSplitter()); <END> if (blockSize != 0) { fileSplitter.setBlockSize(blockSize); } fileSplitter.setSequencialFileRead(sequencialFileRead); Scanner fileScanner = (Scanner)fileSplitter.getScanner(); fileScanner.setFiles(files); if (scanIntervalMillis != 0) { fileScanner.setScanIntervalMillis(scanIntervalMillis); } fileScanner.setRecursive(recursive); if (filePatternRegularExp != null) { fileSplitter.getScanner().setFilePatternRegularExp(filePatternRegularExp); } if (bandwidth != 0) { fileSplitter.getBandwidthManager().setBandwidth(bandwidth); } HDFSBlockReader blockReader = dag.addOperator("BlockReader", new HDFSBlockReader()); blockReader.setUri(files); if (readersCount != 0) { dag.setAttribute(blockReader, Context.OperatorContext.PARTITIONER, new StatelessPartitioner<HDFSBlockReader>( readersCount)); } MetricsAggregator blockReaderMetrics = new MetricsAggregator(); blockReaderMetrics.addAggregators("bytesReadPerSec", new SingleMetricAggregator[] { new LongSumAggregator() }); dag.setAttribute(blockReader, Context.OperatorContext.METRICS_AGGREGATOR, blockReaderMetrics); dag.setAttribute(blockReader, Context.OperatorContext.COUNTERS_AGGREGATOR, new BasicCounters.LongAggregator<MutableLong>()); filesMetadataOutput.set(fileSplitter.filesMetadataOutput); blocksMetadataOutput.set(blockReader.blocksMetadataOutput); messages.set(blockReader.messages); dag.addStream("BlockMetadata", fileSplitter.blocksMetadataOutput, blockReader.blocksMetadataInput); }</code><technical_language>organization Dag stitching code together. property setter together</technical_language>

Target:
public void populateDAG(DAG dag, Configuration conf) { HDFSFileSplitter fileSplitter = dag.addOperator("FileSplitter", new HDFSFileSplitter()); HDFSBlockReader blockReader = dag.addOperator("BlockReader", new HDFSBlockReader()); dag.addStream("BlockMetadata", fileSplitter.blocksMetadataOutput, blockReader.blocksMetadataInput); filesMetadataOutput.set(fileSplitter.filesMetadataOutput); blocksMetadataOutput.set(blockReader.blocksMetadataOutput); messages.set(blockReader.messages); if (blockSize != 0) { fileSplitter.setBlockSize(blockSize); } fileSplitter.setSequencialFileRead(sequencialFileRead); Scanner fileScanner = (Scanner)fileSplitter.getScanner(); fileScanner.setFiles(files); if (scanIntervalMillis != 0) { fileScanner.setScanIntervalMillis(scanIntervalMillis); } fileScanner.setRecursive(recursive); if (filePatternRegularExp != null) { fileSplitter.getScanner().setFilePatternRegularExp(filePatternRegularExp); } if (bandwidth != 0) { fileSplitter.getBandwidthManager().setBandwidth(bandwidth); } blockReader.setUri(files); if (readersCount != 0) { dag.setAttribute(blockReader, Context.OperatorContext.PARTITIONER, new StatelessPartitioner<HDFSBlockReader>( readersCount)); } MetricsAggregator blockReaderMetrics = new MetricsAggregator(); blockReaderMetrics.addAggregators("bytesReadPerSec", new SingleMetricAggregator[] {new LongSumAggregator() }); dag.setAttribute(blockReader, Context.OperatorContext.METRICS_AGGREGATOR, blockReaderMetrics); dag.setAttribute(blockReader, Context.OperatorContext.COUNTERS_AGGREGATOR, new BasicCounters.LongAggregator<MutableLong>()); }