private RowProcessingPublisher getRowProcessingPublisher(final RowProcessingPublishers publishers) { final RowProcessingStream[] streams = publishers.getStreams(); if (streams.length != 1) { throw new UnsupportedOperationException("Jobs with multiple source tables are not distributable"); } final RowProcessingStream stream = streams[0]; return publishers.getRowProcessingPublisher(stream); }
if (rowConsumeConfiguration.table != null) { @SuppressWarnings("deprecation") final RowProcessingPublisher tablePublisher = rowProcessingPublishers.getRowProcessingPublisher(rowConsumeConfiguration.table); if (tablePublisher == null) { throw new IllegalArgumentException(
/** * * @param table * @return * * @deprecated use {@link #getRowProcessingPublisher(RowProcessingStream)} * instead */ @Deprecated public RowProcessingPublisher getRowProcessingPublisher(final Table table) { final RowProcessingStream stream = getStream(table); return getRowProcessingPublisher(stream); }
@Override public RowProcessingMetrics getRowProcessingMetrics(final Table table) { final RowProcessingStream stream = _publishers.getStream(table); final RowProcessingPublisher publisher = _publishers.getRowProcessingPublisher(stream); if (publisher == null) { return null; } return publisher.getRowProcessingMetrics(); }
private void registerOutputDataStream(final RowProcessingPublisher parentPublisher, final RowProcessingConsumer publishingConsumer, final OutputDataStreamJob outputDataStreamJob) { final RowProcessingStream dataStream = RowProcessingStream.ofOutputDataStream(outputDataStreamJob); // first initialize the nested job like any other set of components registerJob(outputDataStreamJob.getJob(), dataStream, publishingConsumer); // then we wire the publisher for this output data stream to a // OutputRowCollector which will get injected via the // HasOutputDataStreams interface. final RowProcessingPublisher publisherForOutputDataStream = getRowProcessingPublisher(dataStream); publishingConsumer.registerOutputDataStream(outputDataStreamJob, publisherForOutputDataStream); }