com.amazonaws.services.kinesis.connectors.interfaces.IFilter Java Examples

The following examples show how to use com.amazonaws.services.kinesis.connectors.interfaces.IFilter. 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: KinesisConnectorRecordProcessor.java    From amazon-kinesis-connectors with Apache License 2.0 6 votes vote down vote up
public KinesisConnectorRecordProcessor(IBuffer<T> buffer,
        IFilter<T> filter,
        IEmitter<U> emitter,
        ITransformerBase<T, U> transformer,
        KinesisConnectorConfiguration configuration) {
    if (buffer == null || filter == null || emitter == null || transformer == null) {
        throw new IllegalArgumentException("buffer, filter, emitter, and transformer must not be null");
    }
    this.buffer = buffer;
    this.filter = filter;
    this.emitter = emitter;
    this.transformer = transformer;
    // Limit must be greater than zero
    if (configuration.RETRY_LIMIT <= 0) {
        retryLimit = 1;
    } else {
        retryLimit = configuration.RETRY_LIMIT;
    }
    this.backoffInterval = configuration.BACKOFF_INTERVAL;
}
 
Example #2
Source File: KinesisConnectorRecordProcessorTests.java    From amazon-kinesis-connectors with Apache License 2.0 6 votes vote down vote up
@Before
@SuppressWarnings("unchecked")
public void setUp() {
    // control object used to create mock dependencies
    control = EasyMock.createControl();

    // mock dependencies
    emitter = control.createMock(IEmitter.class);
    transformer = control.createMock(ITransformer.class);
    buffer = control.createMock(IBuffer.class);
    filter = control.createMock(IFilter.class);
    checkpointer = control.createMock(IRecordProcessorCheckpointer.class);
    // use a real configuration to get actual default values (not anything created by EasyMock)
    configuration = new KinesisConnectorConfiguration(new Properties(), new DefaultAWSCredentialsProviderChain());

}
 
Example #3
Source File: KinesisConnectorRecordProcessorFactory.java    From amazon-kinesis-connectors with Apache License 2.0 5 votes vote down vote up
@Override
public IRecordProcessor createProcessor() {
    try {
        IBuffer<T> buffer = pipeline.getBuffer(configuration);
        IEmitter<U> emitter = pipeline.getEmitter(configuration);
        ITransformerBase<T, U> transformer = pipeline.getTransformer(configuration);
        IFilter<T> filter = pipeline.getFilter(configuration);
        KinesisConnectorRecordProcessor<T, U> processor =
                new KinesisConnectorRecordProcessor<T, U>(buffer, filter, emitter, transformer, configuration);
        return processor;
    } catch (Throwable t) {
        throw new RuntimeException(t);
    }
}
 
Example #4
Source File: DynamoDBMasterToReplicasPipeline.java    From dynamodb-cross-region-library with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<Record> getFilter(final KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<Record>();
}
 
Example #5
Source File: HBasePipeline.java    From aws-big-data-blog with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<KinesisMessageModel> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<KinesisMessageModel>();
}
 
Example #6
Source File: S3ManifestPipeline.java    From amazon-kinesis-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<KinesisMessageModel> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<KinesisMessageModel>();
}
 
Example #7
Source File: RedshiftManifestPipeline.java    From amazon-kinesis-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<String> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<String>();
}
 
Example #8
Source File: RedshiftBasicPipeline.java    From amazon-kinesis-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<KinesisMessageModel> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<KinesisMessageModel>();
}
 
Example #9
Source File: DynamoDBMessageModelPipeline.java    From amazon-kinesis-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<KinesisMessageModel> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<KinesisMessageModel>();
}
 
Example #10
Source File: ElasticsearchPipeline.java    From amazon-kinesis-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<KinesisMessageModel> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<KinesisMessageModel>();
}
 
Example #11
Source File: S3Pipeline.java    From amazon-kinesis-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public IFilter<KinesisMessageModel> getFilter(KinesisConnectorConfiguration configuration) {
    return new AllPassFilter<KinesisMessageModel>();
}