org.apache.flink.table.sources.wmstrategies.PreserveWatermarks Java Examples

The following examples show how to use org.apache.flink.table.sources.wmstrategies.PreserveWatermarks. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Watermarks.java    From alchemy with Apache License 2.0 5 votes vote down vote up
public WatermarkStrategy get() {
    if (type == null) {
        return null;
    }
    if (type.equals(Type.PERIODIC_ASCENDING.getType())) {
        return new AscendingTimestamps();
    } else if (type.equals(Type.PERIODIC_BOUNDED.getType())) {
        return new BoundedOutOfOrderTimestamps(delay);
    } else if (type.equals(Type.FROM_SOURCE.getType())) {
        return new PreserveWatermarks();
    }
    return null;
}
 
Example #2
Source File: TaxiFareTableSource.java    From flink-training-exercises with Apache License 2.0 4 votes vote down vote up
@Override
public List<RowtimeAttributeDescriptor> getRowtimeAttributeDescriptors() {
	RowtimeAttributeDescriptor descriptor = new RowtimeAttributeDescriptor("eventTime", new StreamRecordTimestamp(), new PreserveWatermarks());
	return Collections.singletonList(descriptor);
}
 
Example #3
Source File: TaxiRideTableSource.java    From flink-training-exercises with Apache License 2.0 4 votes vote down vote up
@Override
public List<RowtimeAttributeDescriptor> getRowtimeAttributeDescriptors() {
	RowtimeAttributeDescriptor descriptor = new RowtimeAttributeDescriptor("eventTime", new StreamRecordTimestamp(), new PreserveWatermarks());
	return Collections.singletonList(descriptor);
}