You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2025/03/03 03:55:01 UTC
(paimon) branch master updated: [flink] Use RuntimeContextUtils to keep compatible (#5192)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new ef5ed00111 [flink] Use RuntimeContextUtils to keep compatible (#5192)
ef5ed00111 is described below
commit ef5ed00111fda1e203dcd728f003c74591d79038
Author: YeJunHao <41...@users.noreply.github.com>
AuthorDate: Mon Mar 3 11:54:55 2025 +0800
[flink] Use RuntimeContextUtils to keep compatible (#5192)
---
.../main/java/org/apache/paimon/flink/sink/CommitterOperator.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java
index 4db63b4411..6354c0ecd0 100644
--- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java
+++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java
@@ -129,10 +129,10 @@ public class CommitterOperator<CommitT, GlobalCommitT> extends AbstractStreamOpe
commitUser =
StateUtils.getSingleValueFromState(
context, "commit_user_state", String.class, initialCommitUser);
- // parallelism of commit operator is always 1, so commitUser will never be null
- int parallelism = getRuntimeContext().getNumberOfParallelSubtasks();
- int index = getRuntimeContext().getIndexOfThisSubtask();
+ int parallelism = RuntimeContextUtils.getNumberOfParallelSubtasks(getRuntimeContext());
+ int index = RuntimeContextUtils.getIndexOfThisSubtask(getRuntimeContext());
+ // parallelism of commit operator is always 1, so commitUser will never be null
committer =
committerFactory.create(
Committer.createContext(