for (DriverFactory driverFactory : driverFactories) {
if (driverFactory.getSourceIds().contains(fragment.getPartitionedSource())) {
partitionedDriverFactory = driverFactory;
}
else {
PipelineContext pipelineContext = taskContext.addPipelineContext(driverFactory.isInputDriver(), driverFactory.isOutputDriver());
Driver driver = driverFactory.createDriver(pipelineContext.addDriverContext());
unpartitionedDrivers.add(driver);
unpartitionedDriverFactories.add(driverFactory);
}
}
this.unpartitionedDrivers = ImmutableList.copyOf(unpartitionedDrivers);