use of org.apache.gobblin.source.extractor.extract.kafka.MultiLongWatermark in project incubator-gobblin by apache.
the class KafkaWorkUnitPacker method getWatermarkIntervalFromWorkUnit.
@SuppressWarnings("deprecation")
protected static WatermarkInterval getWatermarkIntervalFromWorkUnit(WorkUnit workUnit) {
if (workUnit instanceof MultiWorkUnit) {
return getWatermarkIntervalFromMultiWorkUnit((MultiWorkUnit) workUnit);
}
List<Long> lowWatermarkValues = Lists.newArrayList(workUnit.getLowWaterMark());
List<Long> expectedHighWatermarkValues = Lists.newArrayList(workUnit.getHighWaterMark());
return new WatermarkInterval(new MultiLongWatermark(lowWatermarkValues), new MultiLongWatermark(expectedHighWatermarkValues));
}
use of org.apache.gobblin.source.extractor.extract.kafka.MultiLongWatermark in project incubator-gobblin by apache.
the class KafkaWorkUnitPacker method getWatermarkIntervalFromMultiWorkUnit.
@SuppressWarnings("deprecation")
protected static WatermarkInterval getWatermarkIntervalFromMultiWorkUnit(MultiWorkUnit multiWorkUnit) {
List<Long> lowWatermarkValues = Lists.newArrayList();
List<Long> expectedHighWatermarkValues = Lists.newArrayList();
for (WorkUnit workUnit : multiWorkUnit.getWorkUnits()) {
lowWatermarkValues.add(workUnit.getLowWaterMark());
expectedHighWatermarkValues.add(workUnit.getHighWaterMark());
}
return new WatermarkInterval(new MultiLongWatermark(lowWatermarkValues), new MultiLongWatermark(expectedHighWatermarkValues));
}
Aggregations