/** * {@inheritDoc} */ @Override public void connect(PipeTasks pipeTasks) { // A multi sink receives multiple streams of data, so we must connect // them up one by one. for (int i = 0; i < task.getSinkCount(); i++) { Sink sink; Source source; // Retrieve the next sink. sink = task.getSink(i); // Retrieve the appropriate source. source = (Source) getInputTask(pipeTasks, i, Source.class); // Connect the tasks. source.setSink(sink); } // Register the change source as an output task. setOutputTask(pipeTasks, task, 0); }
/** * {@inheritDoc} */ @Override protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) { int bufferCapacity = getIntegerArgument( taskConfig, ARG_BUFFER_CAPACITY, getDefaultIntegerArgument(taskConfig, DEFAULT_BUFFER_CAPACITY) ); return new MultiSinkRunnableChangeSourceManager( taskConfig.getId(), new ChangeDeriver(bufferCapacity), taskConfig.getPipeArgs() ); } }
/** * {@inheritDoc} */ @Override protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) { int bufferCapacity = getIntegerArgument( taskConfig, ARG_BUFFER_CAPACITY, getDefaultIntegerArgument(taskConfig, DEFAULT_BUFFER_CAPACITY) ); return new MultiSinkRunnableChangeSourceManager( taskConfig.getId(), new ChangeDeriver(bufferCapacity), taskConfig.getPipeArgs() ); } }
/** * {@inheritDoc} */ @Override public void connect(PipeTasks pipeTasks) { // A multi sink receives multiple streams of data, so we must connect // them up one by one. for (int i = 0; i < task.getSinkCount(); i++) { Sink sink; Source source; // Retrieve the next sink. sink = task.getSink(i); // Retrieve the appropriate source. source = (Source) getInputTask(pipeTasks, i, Source.class); // Connect the tasks. source.setSink(sink); } // Register the change source as an output task. setOutputTask(pipeTasks, task, 0); }