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-37502][docs] Translate documentation for Disaggregated State Management into Chinese #26312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fredia
Copy link
Contributor

@fredia fredia commented Mar 18, 2025

What is the purpose of the change

Chinese documents for Disaggregate State and new State APIs

Brief change log

  • Documents for State API V2
  • Documents for ForSt State Backend
  • Documents for Disaggregated State

Verifying this change

This change is a docs work without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Mar 18, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@@ -497,6 +497,8 @@ In a typical stateful Flink Application you don't need operators state. It is
mostly a special type of state that is used in source/sink implementations and
scenarios where you don't have a key by which state can be partitioned.

**Notes:** Operator state is still not supported in Python DataStream API.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: in Python -> in the Python

This is called the 'disaggregated state management'. For more information about this,
please see [Disaggregated State Management]({{< ref "docs/ops/state/disaggregated_state" >}}).
新的 state API 比以前的 API 更灵活,用户可以通过新的 API 使用异步状态操作,这使得新的 API 更加强大有效。
异步 state 访问对“存算分离”来说是必要的,即令状态后端支持大状态和在必要时将文件溢出到远程文件系统的能力。更多关于
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
异步 state 访问对“存算分离”来说是必要的,即令状态后端支持大状态和在必要时将文件溢出到远程文件系统的能力。更多关于
异步 state 访问对存算分离来说是必要的,即令状态后端支持大状态时将文件溢出到远程文件系统的能力。更多关于

和之前的 state API 不同,新的 state API 允许用户使用异步状态访问。每种类型的状态都提供了两种版本的 API:同步和异步。
同步 API 是一个阻塞等待状态访问完成的 API。异步 API 是非阻塞的,它会返回一个 `StateFuture`,这个 `StateFuture` 会在状态访问完成时完成。
在 `StateFuture` 完成时,callback 或者 后续逻辑将会被调用(如果有的话)。异步 API 比同步 API 更加高效,更推荐使用异步 API。
注意,**不建议**在同一个用户函数中混合使用同步和异步状态访问。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
注意**不建议**在同一个用户函数中混合使用同步和异步状态访问。
需要注意**不建议**在同一个用户函数中混合使用同步和异步状态访问。

但两个`asyncGet`的完成顺序不能保证。因此,无法保证两个 `StateFuture` 后续步骤的执行顺序,即无法确定元素 A 和 元素 B 的
`asyncClear` 和 `asyncUpdate` 的调用顺序。

尽管状态访问方法可能会乱序执行,这也不意味着所有用户代码会串行执行。在 `processElement`, `flatMap` 或者 `thenXXxx`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
尽管状态访问方法可能会乱序执行,这也不意味着所有用户代码会串行执行。在 `processElement`, `flatMap` 或者 `thenXXxx`
尽管状态访问方法可能会乱序执行,这也不意味着所有用户代码会并行执行。在 `processElement`, `flatMap` 或者 `thenXXxx`


通常,您无需担心状态访问方法的执行顺序问题,但 Flink 仍确保一些规则:
* 同 key 的元素的执行顺序严格按照元素到达 `flatMap` 的顺序执行的。
* 传递给 `thenXXxx` 方法的函数会按照调用链的顺序执行。如果它们不属于调用链,或者同时有多个调用链,则无法保证执行顺序。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* 传递给 `thenXXxx` 方法的函数会按照调用链的顺序执行。如果它们不属于调用链,或者同时有多个调用链,则无法保证执行顺序。
* 传递给 `thenXXxx` 方法的函数会按照调用链的顺序执行。如果同时有多个调用链,则无法保证执行顺序。

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