WencongLiu commented on code in PR #23905:
URL: https://github.com/apache/flink/pull/23905#discussion_r1440107273


##########
flink-runtime/src/main/java/org/apache/flink/runtime/execution/Environment.java:
##########
@@ -119,7 +120,14 @@ public interface Environment {
     Configuration getJobConfiguration();
 
     /**
-     * Returns the {@link TaskInfo} object associated with this subtask
+     * Returns the {@link JobInfo} object associated with current job.
+     *
+     * @return JobInfo for current job
+     */
+    JobInfo getJobInfo();

Review Comment:
   These code changes are prerequisite for the FLIP-380. I've moved these code 
changes to the commit `[FLINK-33905][core] Add getJobInfo() method to 
Environment`.



##########
flink-core/src/main/java/org/apache/flink/api/connector/source/SourceReaderContext.java:
##########
@@ -39,7 +41,16 @@ public interface SourceReaderContext {
      */
     String getLocalHostName();
 
-    /** @return The index of this subtask. */
+    /**
+     * Get the index of this subtask.
+     *
+     * @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
     int getIndexOfSubtask();

Review Comment:
   For these deprecated methods in the modified interfaces, I've changed them 
from abstract to default and provide default implementations.



-- 
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]

Reply via email to