Interface KinesisStreamingSourceOptions.Builder

    • Method Detail

      • endpointUrl

        KinesisStreamingSourceOptions.Builder endpointUrl​(String endpointUrl)

        The URL of the Kinesis endpoint.

        Parameters:
        endpointUrl - The URL of the Kinesis endpoint.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • streamName

        KinesisStreamingSourceOptions.Builder streamName​(String streamName)

        The name of the Kinesis data stream.

        Parameters:
        streamName - The name of the Kinesis data stream.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • classification

        KinesisStreamingSourceOptions.Builder classification​(String classification)

        An optional classification.

        Parameters:
        classification - An optional classification.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • delimiter

        KinesisStreamingSourceOptions.Builder delimiter​(String delimiter)

        Specifies the delimiter character.

        Parameters:
        delimiter - Specifies the delimiter character.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • startingPosition

        KinesisStreamingSourceOptions.Builder startingPosition​(String 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 pattern yyyy-mm-ddTHH:MM:SSZ (where Z 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.

        Parameters:
        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 pattern yyyy-mm-ddTHH:MM:SSZ (where Z 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        StartingPosition, StartingPosition
      • startingPosition

        KinesisStreamingSourceOptions.Builder startingPosition​(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 pattern yyyy-mm-ddTHH:MM:SSZ (where Z 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.

        Parameters:
        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 pattern yyyy-mm-ddTHH:MM:SSZ (where Z 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        StartingPosition, StartingPosition
      • maxFetchTimeInMs

        KinesisStreamingSourceOptions.Builder maxFetchTimeInMs​(Long maxFetchTimeInMs)

        The maximum time spent for the job executor to read records for the current batch from the Kinesis data stream, specified in milliseconds (ms). Multiple GetRecords API calls may be made within this time. The default value is 1000.

        Parameters:
        maxFetchTimeInMs - The maximum time spent for the job executor to read records for the current batch from the Kinesis data stream, specified in milliseconds (ms). Multiple GetRecords API calls may be made within this time. The default value is 1000.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxFetchRecordsPerShard

        KinesisStreamingSourceOptions.Builder maxFetchRecordsPerShard​(Long maxFetchRecordsPerShard)

        The maximum number of records to fetch per shard in the Kinesis data stream per microbatch. Note: The client can exceed this limit if the streaming job has already read extra records from Kinesis (in the same get-records call). If MaxFetchRecordsPerShard needs to be strict then it needs to be a multiple of MaxRecordPerRead. The default value is 100000.

        Parameters:
        maxFetchRecordsPerShard - The maximum number of records to fetch per shard in the Kinesis data stream per microbatch. Note: The client can exceed this limit if the streaming job has already read extra records from Kinesis (in the same get-records call). If MaxFetchRecordsPerShard needs to be strict then it needs to be a multiple of MaxRecordPerRead. The default value is 100000.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxRecordPerRead

        KinesisStreamingSourceOptions.Builder maxRecordPerRead​(Long maxRecordPerRead)

        The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default value is 10000.

        Parameters:
        maxRecordPerRead - The maximum number of records to fetch from the Kinesis data stream in each getRecords operation. The default value is 10000.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • addIdleTimeBetweenReads

        KinesisStreamingSourceOptions.Builder addIdleTimeBetweenReads​(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.

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • idleTimeBetweenReadsInMs

        KinesisStreamingSourceOptions.Builder idleTimeBetweenReadsInMs​(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.

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • describeShardInterval

        KinesisStreamingSourceOptions.Builder describeShardInterval​(Long describeShardInterval)

        The minimum time interval between two ListShards API calls for your script to consider resharding. The default value is 1s.

        Parameters:
        describeShardInterval - The minimum time interval between two ListShards API calls for your script to consider resharding. The default value is 1s.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • numRetries

        KinesisStreamingSourceOptions.Builder numRetries​(Integer numRetries)

        The maximum number of retries for Kinesis Data Streams API requests. The default value is 3.

        Parameters:
        numRetries - The maximum number of retries for Kinesis Data Streams API requests. The default value is 3.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • retryIntervalMs

        KinesisStreamingSourceOptions.Builder retryIntervalMs​(Long retryIntervalMs)

        The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value is 1000.

        Parameters:
        retryIntervalMs - The cool-off time period (specified in ms) before retrying the Kinesis Data Streams API call. The default value is 1000.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxRetryIntervalMs

        KinesisStreamingSourceOptions.Builder maxRetryIntervalMs​(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.

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • avoidEmptyBatches

        KinesisStreamingSourceOptions.Builder avoidEmptyBatches​(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".

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • streamArn

        KinesisStreamingSourceOptions.Builder streamArn​(String streamArn)

        The Amazon Resource Name (ARN) of the Kinesis data stream.

        Parameters:
        streamArn - The Amazon Resource Name (ARN) of the Kinesis data stream.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • roleArn

        KinesisStreamingSourceOptions.Builder roleArn​(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".

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • roleSessionName

        KinesisStreamingSourceOptions.Builder roleSessionName​(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".

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • addRecordTimestamp

        KinesisStreamingSourceOptions.Builder addRecordTimestamp​(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.

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • emitConsumerLagMetrics

        KinesisStreamingSourceOptions.Builder emitConsumerLagMetrics​(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.

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.
      • startingTimestamp

        KinesisStreamingSourceOptions.Builder startingTimestamp​(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").

        Parameters:
        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:
        Returns a reference to this object so that method calls can be chained together.