WencongLiu commented on code in PR #23905:
URL: https://github.com/apache/flink/pull/23905#discussion_r1440107425
##########
flink-core/src/main/java/org/apache/flink/api/connector/source/SourceReaderContext.java:
##########
@@ -68,8 +79,24 @@ public interface SourceReaderContext {
* Get the current parallelism of this Source.
*
* @return the parallelism of the Source.
+ * @deprecated This method is deprecated since Flink 1.19. All metadata
about the task should be
+ * provided uniformly by {@link #getTaskInfo()}.
+ * @see <a
+ *
href="https://cwiki.apache.org/confluence/display/FLINK/FLIP-382%3A+Unify+the+Provision+of+Diverse+Metadata+for+Context-like+APIs">
+ * FLIP-382: Unify the Provision of Diverse Metadata for Context-like
APIs </a>
*/
+ @Deprecated
default int currentParallelism() {
throw new UnsupportedOperationException();
}
+
+ /**
+ * Get the meta information of current task.
+ *
+ * @return the task meta information.
+ */
+ @PublicEvolving
+ default TaskInfo getTaskInfo() {
+ return null;
Review Comment:
I've changed the default methods including `getJobInfo()` and
`getTaskInfo()` to be abstract.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]