Skip to content

Commit c71d823

Browse files
committed
[flink] Use RuntimeContextUtils to keep compatible
1 parent 83410b8 commit c71d823

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/CommitterOperator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ public void initializeState(StateInitializationContext context) throws Exception
129129
commitUser =
130130
StateUtils.getSingleValueFromState(
131131
context, "commit_user_state", String.class, initialCommitUser);
132-
// parallelism of commit operator is always 1, so commitUser will never be null
133-
int parallelism = getRuntimeContext().getNumberOfParallelSubtasks();
134-
int index = getRuntimeContext().getIndexOfThisSubtask();
132+
int parallelism = RuntimeContextUtils.getNumberOfParallelSubtasks(getRuntimeContext());
133+
int index = RuntimeContextUtils.getIndexOfThisSubtask(getRuntimeContext());
135134

135+
// parallelism of commit operator is always 1, so commitUser will never be null
136136
committer =
137137
committerFactory.create(
138138
Committer.createContext(

0 commit comments

Comments
 (0)