com.amazonaws.services.kinesisfirehose.AmazonKinesisFirehoseClient Java Examples

The following examples show how to use com.amazonaws.services.kinesisfirehose.AmazonKinesisFirehoseClient. 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: AbstractKinesisFirehoseProcessor.java    From localization_nifi with Apache License 2.0 5 votes vote down vote up
/**
 * Create client using aws credentials provider. This is the preferred way for creating clients
 */
@Override
protected AmazonKinesisFirehoseClient createClient(final ProcessContext context, final AWSCredentialsProvider credentialsProvider, final ClientConfiguration config) {
    getLogger().info("Creating client using aws credentials provider");

    return new AmazonKinesisFirehoseClient(credentialsProvider, config);
}
 
Example #2
Source File: AbstractKinesisFirehoseProcessor.java    From localization_nifi with Apache License 2.0 5 votes vote down vote up
/**
 * Create client using AWSCredentails
 *
 * @deprecated use {@link #createClient(ProcessContext, AWSCredentialsProvider, ClientConfiguration)} instead
 */
@Override
protected AmazonKinesisFirehoseClient createClient(final ProcessContext context, final AWSCredentials credentials, final ClientConfiguration config) {
    getLogger().info("Creating client using aws credentials");

    return new AmazonKinesisFirehoseClient(credentials, config);
}
 
Example #3
Source File: FirehoseTransportFactory.java    From bender with Apache License 2.0 5 votes vote down vote up
@Override
public void setConf(AbstractConfig config) {
  this.config = (FirehoseTransportConfig) config;
  this.serializer = new FirehoseTransportSerializer(this.config.getAppendNewline());
  this.client = new AmazonKinesisFirehoseClient(new ClientConfiguration().withGzip(true));

  if (this.config.getRegion() != null) {
    this.client.withRegion(this.config.getRegion());
  }
}
 
Example #4
Source File: AbstractKinesisFirehoseProcessor.java    From nifi with Apache License 2.0 5 votes vote down vote up
/**
 * Create client using aws credentials provider. This is the preferred way for creating clients
 */
@Override
protected AmazonKinesisFirehoseClient createClient(final ProcessContext context, final AWSCredentialsProvider credentialsProvider, final ClientConfiguration config) {
    getLogger().info("Creating client using aws credentials provider");

    return new AmazonKinesisFirehoseClient(credentialsProvider, config);
}
 
Example #5
Source File: AbstractKinesisFirehoseProcessor.java    From nifi with Apache License 2.0 5 votes vote down vote up
/**
 * Create client using AWSCredentails
 *
 * @deprecated use {@link #createClient(ProcessContext, AWSCredentialsProvider, ClientConfiguration)} instead
 */
@Deprecated
@Override
protected AmazonKinesisFirehoseClient createClient(final ProcessContext context, final AWSCredentials credentials, final ClientConfiguration config) {
    getLogger().info("Creating client using aws credentials");

    return new AmazonKinesisFirehoseClient(credentials, config);
}
 
Example #6
Source File: FirehoseSinkTask.java    From kinesis-kafka-connector with Apache License 2.0 4 votes vote down vote up
@Override
public void start(Map<String, String> props) {

	batch = Boolean.parseBoolean(props.get(FirehoseSinkConnector.BATCH));
	
	batchSize = Integer.parseInt(props.get(FirehoseSinkConnector.BATCH_SIZE));
	
	batchSizeInBytes = Integer.parseInt(props.get(FirehoseSinkConnector.BATCH_SIZE_IN_BYTES));
	
	deliveryStreamName = props.get(FirehoseSinkConnector.DELIVERY_STREAM);

	firehoseClient = new AmazonKinesisFirehoseClient(new DefaultAWSCredentialsProviderChain());

	firehoseClient.setRegion(RegionUtils.getRegion(props.get(FirehoseSinkConnector.REGION)));

	// Validate delivery stream
	validateDeliveryStream();
}
 
Example #7
Source File: FirehoseTransport.java    From bender with Apache License 2.0 4 votes vote down vote up
protected FirehoseTransport(AmazonKinesisFirehoseClient client, String deliveryStreamName) {
  this.client = client;
  this.deliveryStreamName = deliveryStreamName;
}
 
Example #8
Source File: KinesisToFirehose.java    From aws-big-data-blog with Apache License 2.0 4 votes vote down vote up
private void setup(){
    firehoseClient = new AmazonKinesisFirehoseClient();
    firehoseClient.setEndpoint(firehoseEndpointURL);
    checkHoseStatus();
}