Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-31989][docs] Update english docs for KinesisStreamsSource and DynamoDbStreamsSource #179

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

hlteoh37
Copy link
Contributor

@hlteoh37 hlteoh37 commented Nov 4, 2024

Purpose of the change

Updates English docs for KinesisStreamsSource and DynamoDbStreamsSource

Verifying this change

This change is a docs change without any test coverage.

Significant changes

(Please check any boxes [x] if the answer is "yes". You can first publish the PR and check them afterwards, for convenience.)

  • Dependencies have been added or upgraded
  • Public API has been changed (Public API is any class annotated with @Public(Evolving))
  • Serializers have been changed
  • New feature has been introduced
    • If yes, how is this documented? (not applicable / docs / JavaDocs / not documented)

@hlteoh37 hlteoh37 changed the title [FLINK-31989][docs] Update english docs for KinesisStreamsSource [FLINK-31989][docs] Update english docs for KinesisStreamsSource and DynamoDbStreamsSource Nov 6, 2024
Copy link

@nicusX nicusX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments on DDB connector docs

docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
Copy link

@foxus foxus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the updated docs, I've added comments inline.

docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/dynamodb.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/datastream/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/table/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/table/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/table/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/table/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/table/kinesis.md Outdated Show resolved Hide resolved
docs/content/docs/connectors/table/kinesis.md Show resolved Hide resolved
<td>yes</td>
<td style="word-wrap: break-word;">16</td>
<td>Integer</td>
<td>Request threshold for uncompleted requests by <code>KinesisAsyncClient</code>before blocking new write requests and applying backpressure.</td>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually something that should be explained in DataStream too.
Also, explaining that a "request" is a batch

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, the batching mechanism would deserve a dedicated chapter, possibly in DataStream docs, and linked from here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's focus the changes for this PR to the source docs.

Kinesis data streams consist of one or more shards, and the `sink.partitioner` option allows you to control how records written into a multi-shard Kinesis-backed table will be partitioned between its shards.
Valid values are:

* `fixed`: Kinesis `PartitionKey` values derived from the Flink subtask index, so each Flink partition ends up in at most one Kinesis partition (assuming that no re-sharding takes place at runtime).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be clearer putting this are mutually exclusive options.

Partitioning is defined by either using PARTITION BY in the table definition or by specifying specify sink.partitioner. Using both will result in a configuration error.

Valid values for sink.partitioner:

  • fixed ...
  • random ...
  • Custom FixedKinesisPartitioner subclass...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's focus the changes for this PR to the source docs.


{{< hint info >}}
Records written into tables defining a `PARTITION BY` clause will always be partitioned based on a concatenated projection of the `PARTITION BY` fields.
In this case, the `sink.partitioner` field cannot be used to modify this behavior (attempting to do this results in a configuration error).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If alternative options are explained above, this line becomes redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's focus the changes for this PR to the source docs.


# Data Type Mapping

Kinesis stores records as Base64-encoded binary data objects, so it doesn't have a notion of internal record structure.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text formats, such as json or csv are written to Kinesis without modifications. Binary formats such as avro are Base64-encoded and then written to Kinesis as text.

(is this right?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure actually!

Let's focus the changes for this PR to the source docs.

Copy link

@nicusX nicusX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the source docs

<td>no</td>
<td style="word-wrap: break-word;">JOB_MANAGED</td>
<td>String</td>
<td>Only applicable to EFO <code>ReaderType</code>. Determine if the EFO consumer is managed by the Flink job <code>JOB_MANAGED|SELF_MANAGED</code>.</td>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I copied&pasted the deleted title from the other docs.
It was "EFO Stream Consumer Lifecycle Management".
But we can skip linking across docs for now

@hlteoh37 hlteoh37 merged commit 3abc1c5 into apache:main Nov 8, 2024
9 checks passed
@hlteoh37 hlteoh37 deleted the FLINK-31989 branch November 8, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants