Class KinesisStreamingSourceOptions
- java.lang.Object
-
- software.amazon.awssdk.services.glue.model.KinesisStreamingSourceOptions
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<KinesisStreamingSourceOptions.Builder,KinesisStreamingSourceOptions>
@Generated("software.amazon.awssdk:codegen") public final class KinesisStreamingSourceOptions extends Object implements SdkPojo, Serializable, ToCopyableBuilder<KinesisStreamingSourceOptions.Builder,KinesisStreamingSourceOptions>
Additional options for the Amazon Kinesis streaming data source.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
KinesisStreamingSourceOptions.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
addIdleTimeBetweenReads()
Adds a time delay between two consecutive getRecords operations.String
addRecordTimestamp()
When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the stream.Boolean
avoidEmptyBatches()
Avoids creating an empty microbatch job by checking for unread data in the Kinesis data stream before the batch is started.static KinesisStreamingSourceOptions.Builder
builder()
String
classification()
An optional classification.String
delimiter()
Specifies the delimiter character.Long
describeShardInterval()
The minimum time interval between two ListShards API calls for your script to consider resharding.String
emitConsumerLagMetrics()
When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the stream and the time it arrives in Glue to CloudWatch.String
endpointUrl()
The URL of the Kinesis endpoint.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
Long
idleTimeBetweenReadsInMs()
The minimum time delay between two consecutive getRecords operations, specified in ms.Long
maxFetchRecordsPerShard()
The maximum number of records to fetch per shard in the Kinesis data stream.Long
maxFetchTimeInMs()
The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in milliseconds (ms).Long
maxRecordPerRead()
The maximum number of records to fetch from the Kinesis data stream in each getRecords operation.Long
maxRetryIntervalMs()
The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call.Integer
numRetries()
The maximum number of retries for Kinesis Data Streams API requests.Long
retryIntervalMs()
The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call.String
roleArn()
The Amazon Resource Name (ARN) of the role to assume using AWS Security Token Service (AWS STS).String
roleSessionName()
An identifier for the session assuming the role using AWS STS.List<SdkField<?>>
sdkFields()
static Class<? extends KinesisStreamingSourceOptions.Builder>
serializableBuilderClass()
StartingPosition
startingPosition()
The starting position in the Kinesis data stream to read data from.String
startingPositionAsString()
The starting position in the Kinesis data stream to read data from.Instant
startingTimestamp()
The timestamp of the record in the Kinesis data stream to start reading data from.String
streamArn()
The Amazon Resource Name (ARN) of the Kinesis data stream.String
streamName()
The name of the Kinesis data stream.KinesisStreamingSourceOptions.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
endpointUrl
public final String endpointUrl()
The URL of the Kinesis endpoint.
- Returns:
- The URL of the Kinesis endpoint.
-
streamName
public final String streamName()
The name of the Kinesis data stream.
- Returns:
- The name of the Kinesis data stream.
-
classification
public final String classification()
An optional classification.
- Returns:
- An optional classification.
-
delimiter
public final String delimiter()
Specifies the delimiter character.
- Returns:
- Specifies the delimiter character.
-
startingPosition
public final StartingPosition startingPosition()
The starting position in the Kinesis data stream to read data from. The possible values are
"latest"
,"trim_horizon"
,"earliest"
, or a timestamp string in UTC format in the patternyyyy-mm-ddTHH:MM:SSZ
(whereZ
represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00-04:00"). The default value is"latest"
.Note: Using a value that is a timestamp string in UTC format for "startingPosition" is supported only for Glue version 4.0 or later.
If the service returns an enum value that is not available in the current SDK version,
startingPosition
will returnStartingPosition.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstartingPositionAsString()
.- Returns:
- The starting position in the Kinesis data stream to read data from. The possible values are
"latest"
,"trim_horizon"
,"earliest"
, or a timestamp string in UTC format in the patternyyyy-mm-ddTHH:MM:SSZ
(whereZ
represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00-04:00"). The default value is"latest"
.Note: Using a value that is a timestamp string in UTC format for "startingPosition" is supported only for Glue version 4.0 or later.
- See Also:
StartingPosition
-
startingPositionAsString
public final String startingPositionAsString()
The starting position in the Kinesis data stream to read data from. The possible values are
"latest"
,"trim_horizon"
,"earliest"
, or a timestamp string in UTC format in the patternyyyy-mm-ddTHH:MM:SSZ
(whereZ
represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00-04:00"). The default value is"latest"
.Note: Using a value that is a timestamp string in UTC format for "startingPosition" is supported only for Glue version 4.0 or later.
If the service returns an enum value that is not available in the current SDK version,
startingPosition
will returnStartingPosition.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstartingPositionAsString()
.- Returns:
- The starting position in the Kinesis data stream to read data from. The possible values are
"latest"
,"trim_horizon"
,"earliest"
, or a timestamp string in UTC format in the patternyyyy-mm-ddTHH:MM:SSZ
(whereZ
represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00-04:00"). The default value is"latest"
.Note: Using a value that is a timestamp string in UTC format for "startingPosition" is supported only for Glue version 4.0 or later.
- See Also:
StartingPosition
-
maxFetchTimeInMs
public final Long maxFetchTimeInMs()
The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard, specified in milliseconds (ms). The default value is
1000
.- Returns:
- The maximum time spent in the job executor to fetch a record from the Kinesis data stream per shard,
specified in milliseconds (ms). The default value is
1000
.
-
maxFetchRecordsPerShard
public final Long maxFetchRecordsPerShard()
The maximum number of records to fetch per shard in the Kinesis data stream. The default value is
100000
.- Returns:
- The maximum number of records to fetch per shard in the Kinesis data stream. The default value is
100000
.
-
maxRecordPerRead
public final Long maxRecordPerRead()
The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default value is
10000
.- Returns:
- The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The
default value is
10000
.
-
addIdleTimeBetweenReads
public final Boolean addIdleTimeBetweenReads()
Adds a time delay between two consecutive getRecords operations. The default value is
"False"
. This option is only configurable for Glue version 2.0 and above.- Returns:
- Adds a time delay between two consecutive getRecords operations. The default value is
"False"
. This option is only configurable for Glue version 2.0 and above.
-
idleTimeBetweenReadsInMs
public final Long idleTimeBetweenReadsInMs()
The minimum time delay between two consecutive getRecords operations, specified in ms. The default value is
1000
. This option is only configurable for Glue version 2.0 and above.- Returns:
- The minimum time delay between two consecutive getRecords operations, specified in ms. The default value
is
1000
. This option is only configurable for Glue version 2.0 and above.
-
describeShardInterval
public final Long describeShardInterval()
The minimum time interval between two ListShards API calls for your script to consider resharding. The default value is
1s
.- Returns:
- The minimum time interval between two ListShards API calls for your script to consider resharding. The
default value is
1s
.
-
numRetries
public final Integer numRetries()
The maximum number of retries for Kinesis Data Streams API requests. The default value is
3
.- Returns:
- The maximum number of retries for Kinesis Data Streams API requests. The default value is
3
.
-
retryIntervalMs
public final Long retryIntervalMs()
The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value is
1000
.- Returns:
- The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default
value is
1000
.
-
maxRetryIntervalMs
public final Long maxRetryIntervalMs()
The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API call. The default value is
10000
.- Returns:
- The maximum cool-off time period (specified in ms) between two retries of a Kinesis Data Streams API
call. The default value is
10000
.
-
avoidEmptyBatches
public final Boolean avoidEmptyBatches()
Avoids creating an empty microbatch job by checking for unread data in the Kinesis data stream before the batch is started. The default value is
"False"
.- Returns:
- Avoids creating an empty microbatch job by checking for unread data in the Kinesis data stream before the
batch is started. The default value is
"False"
.
-
streamArn
public final String streamArn()
The Amazon Resource Name (ARN) of the Kinesis data stream.
- Returns:
- The Amazon Resource Name (ARN) of the Kinesis data stream.
-
roleArn
public final String roleArn()
The Amazon Resource Name (ARN) of the role to assume using AWS Security Token Service (AWS STS). This role must have permissions for describe or read record operations for the Kinesis data stream. You must use this parameter when accessing a data stream in a different account. Used in conjunction with
"awsSTSSessionName"
.- Returns:
- The Amazon Resource Name (ARN) of the role to assume using AWS Security Token Service (AWS STS). This
role must have permissions for describe or read record operations for the Kinesis data stream. You must
use this parameter when accessing a data stream in a different account. Used in conjunction with
"awsSTSSessionName"
.
-
roleSessionName
public final String roleSessionName()
An identifier for the session assuming the role using AWS STS. You must use this parameter when accessing a data stream in a different account. Used in conjunction with
"awsSTSRoleARN"
.- Returns:
- An identifier for the session assuming the role using AWS STS. You must use this parameter when accessing
a data stream in a different account. Used in conjunction with
"awsSTSRoleARN"
.
-
addRecordTimestamp
public final String addRecordTimestamp()
When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the stream. The default value is 'false'. This option is supported in Glue version 4.0 or later.
- Returns:
- When this option is set to 'true', the data output will contain an additional column named "__src_timestamp" that indicates the time when the corresponding record received by the stream. The default value is 'false'. This option is supported in Glue version 4.0 or later.
-
emitConsumerLagMetrics
public final String emitConsumerLagMetrics()
When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the stream and the time it arrives in Glue to CloudWatch. The metric's name is "glue.driver.streaming.maxConsumerLagInMs". The default value is 'false'. This option is supported in Glue version 4.0 or later.
- Returns:
- When this option is set to 'true', for each batch, it will emit the metrics for the duration between the oldest record received by the stream and the time it arrives in Glue to CloudWatch. The metric's name is "glue.driver.streaming.maxConsumerLagInMs". The default value is 'false'. This option is supported in Glue version 4.0 or later.
-
startingTimestamp
public final Instant startingTimestamp()
The timestamp of the record in the Kinesis data stream to start reading data from. The possible values are a timestamp string in UTC format of the pattern
yyyy-mm-ddTHH:MM:SSZ
(where Z represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").- Returns:
- The timestamp of the record in the Kinesis data stream to start reading data from. The possible values
are a timestamp string in UTC format of the pattern
yyyy-mm-ddTHH:MM:SSZ
(where Z represents a UTC timezone offset with a +/-. For example: "2023-04-04T08:00:00+08:00").
-
toBuilder
public KinesisStreamingSourceOptions.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<KinesisStreamingSourceOptions.Builder,KinesisStreamingSourceOptions>
-
builder
public static KinesisStreamingSourceOptions.Builder builder()
-
serializableBuilderClass
public static Class<? extends KinesisStreamingSourceOptions.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-