public class DynamoDBEmitter extends Object implements IEmitter<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>>
| Modifier and Type | Field and Description |
|---|---|
protected com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient |
dynamoDBClient |
protected String |
dynamoDBEndpoint |
protected String |
dynamoDBTableName |
| Constructor and Description |
|---|
DynamoDBEmitter(KinesisConnectorConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
List<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> |
emit(UnmodifiableBuffer<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> buffer)
Invoked when the buffer is full.
|
void |
fail(List<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> records)
This method defines how to handle a set of records that cannot successfully be emitted.
|
void |
shutdown()
This method is called when the KinesisConnectorRecordProcessor is shutdown.
|
Set<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> |
uniqueItems(List<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> items)
This helper method is used to dedupe a list of items.
|
protected final String dynamoDBEndpoint
protected final String dynamoDBTableName
protected final com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient dynamoDBClient
public DynamoDBEmitter(KinesisConnectorConfiguration configuration)
public List<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> emit(UnmodifiableBuffer<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> buffer) throws IOException
IEmitteremit in interface IEmitter<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>>buffer - The full buffer of recordsIOException - A failure was reached that is not recoverable, no retry will occur and the fail
method will be calledpublic void fail(List<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> records)
IEmitterpublic Set<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> uniqueItems(List<Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue>> items)
items - a list of Mappublic void shutdown()
IEmitterCopyright © 2016. All rights reserved.