public class RedshiftManifestEmitter extends Object implements IEmitter<String>
This class requires the configuration of an Amazon S3 bucket and endpoint, as well as the following Amazon Redshift items:
| Constructor and Description |
|---|
RedshiftManifestEmitter(KinesisConnectorConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
emit(UnmodifiableBuffer<String> buffer)
Invoked when the buffer is full.
|
void |
fail(List<String> records)
This method defines how to handle a set of records that cannot successfully be emitted.
|
protected void |
redshiftCopy(Connection conn,
String manifestFile)
Executes a, Amazon Redshift copy from Amazon S3 using a Manifest file with a command in the format: COPY
dataTable FROM 's3://s3Bucket/manifestFile' CREDENTIALS
'aws_access_key_id=accessKey;aws_secret_access_key=secretKey' DELIMITER dataDelimiter
MANIFEST;
|
void |
shutdown()
This method is called when the KinesisConnectorRecordProcessor is shutdown.
|
public RedshiftManifestEmitter(KinesisConnectorConfiguration configuration)
public List<String> emit(UnmodifiableBuffer<String> buffer) throws IOException
IEmitteremit in interface IEmitter<String>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<String> records)
IEmitterprotected void redshiftCopy(Connection conn, String manifestFile) throws SQLException
Name - of manifest fileSQLExceptionCopyright © 2016. All rights reserved.