org.apache.flink.streaming.connectors.kinesis.serialization.KinesisSerializationSchema Java Examples

The following examples show how to use org.apache.flink.streaming.connectors.kinesis.serialization.KinesisSerializationSchema. 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: FlinkKinesisProducer.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Create a new FlinkKinesisProducer.
 * This is a constructor supporting {@see KinesisSerializationSchema}.
 *
 * @param schema Kinesis serialization schema for the data type
 * @param configProps The properties used to configure KinesisProducer, including AWS credentials and AWS region
 */
public FlinkKinesisProducer(KinesisSerializationSchema<OUT> schema, Properties configProps) {
	checkNotNull(configProps, "configProps can not be null");
	this.configProps = KinesisConfigUtil.replaceDeprecatedProducerKeys(configProps);

	checkNotNull(schema, "serialization schema cannot be null");
	checkArgument(
		InstantiationUtil.isSerializable(schema),
		"The provided serialization schema is not serializable: " + schema.getClass().getName() + ". " +
			"Please check that it does not contain references to non-serializable instances.");
	this.schema = schema;
}
 
Example #2
Source File: FlinkKinesisProducer.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Create a new FlinkKinesisProducer.
 * This is a constructor supporting {@see KinesisSerializationSchema}.
 *
 * @param schema Kinesis serialization schema for the data type
 * @param configProps The properties used to configure KinesisProducer, including AWS credentials and AWS region
 */
public FlinkKinesisProducer(KinesisSerializationSchema<OUT> schema, Properties configProps) {
	checkNotNull(configProps, "configProps can not be null");
	this.configProps = KinesisConfigUtil.replaceDeprecatedProducerKeys(configProps);

	checkNotNull(schema, "serialization schema cannot be null");
	checkArgument(
		InstantiationUtil.isSerializable(schema),
		"The provided serialization schema is not serializable: " + schema.getClass().getName() + ". " +
			"Please check that it does not contain references to non-serializable instances.");
	this.schema = schema;
}
 
Example #3
Source File: FlinkKinesisProducer.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Create a new FlinkKinesisProducer.
 * This is a constructor supporting {@see KinesisSerializationSchema}.
 *
 * @param schema Kinesis serialization schema for the data type
 * @param configProps The properties used to configure KinesisProducer, including AWS credentials and AWS region
 */
public FlinkKinesisProducer(KinesisSerializationSchema<OUT> schema, Properties configProps) {
	checkNotNull(configProps, "configProps can not be null");
	this.configProps = KinesisConfigUtil.replaceDeprecatedProducerKeys(configProps);

	checkNotNull(schema, "serialization schema cannot be null");
	checkArgument(
		InstantiationUtil.isSerializable(schema),
		"The provided serialization schema is not serializable: " + schema.getClass().getName() + ". " +
			"Please check that it does not contain references to non-serializable instances.");
	this.schema = schema;
}