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/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 335cfe21d72 [hotfix][flink-runtime] Fix the task class typo
335cfe21d72 is described below

commit 335cfe21d72ecb4ab12934c6b84839e6e462bd2e
Author: liuzhuang2017 <[email protected]>
AuthorDate: Fri Aug 19 16:14:50 2022 +0800

    [hotfix][flink-runtime] Fix the task class typo
    
    This closes #20623
---
 .../org/apache/flink/runtime/taskmanager/Task.java | 36 +++++++++++-----------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java 
b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
index c501efef78b..360290c31ed 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
@@ -1623,13 +1623,13 @@ public class Task
 
         private final Logger logger;
         private final TaskInvokable invokable;
-        private final Thread executer;
+        private final Thread executor;
         private final String taskName;
 
-        TaskCanceler(Logger logger, TaskInvokable invokable, Thread executer, 
String taskName) {
+        TaskCanceler(Logger logger, TaskInvokable invokable, Thread executor, 
String taskName) {
             this.logger = logger;
             this.invokable = invokable;
-            this.executer = executer;
+            this.executor = executor;
             this.taskName = taskName;
         }
 
@@ -1656,7 +1656,7 @@ public class Task
                 failAllResultPartitions();
                 closeAllInputGates();
 
-                invokable.maybeInterruptOnCancel(executer, null, null);
+                invokable.maybeInterruptOnCancel(executor, null, null);
             } catch (Throwable t) {
                 ExceptionUtils.rethrowIfFatalError(t);
                 logger.error("Error in the task canceler for task {}.", 
taskName, t);
@@ -1674,7 +1674,7 @@ public class Task
         private final TaskInvokable task;
 
         /** The executing task thread that we wait for to terminate. */
-        private final Thread executerThread;
+        private final Thread executorThread;
 
         /** The name of the task, for logging purposes. */
         private final String taskName;
@@ -1685,13 +1685,13 @@ public class Task
         TaskInterrupter(
                 Logger log,
                 TaskInvokable task,
-                Thread executerThread,
+                Thread executorThread,
                 String taskName,
                 long interruptIntervalMillis) {
 
             this.log = log;
             this.task = task;
-            this.executerThread = executerThread;
+            this.executorThread = executorThread;
             this.taskName = taskName;
             this.interruptIntervalMillis = interruptIntervalMillis;
         }
@@ -1702,14 +1702,14 @@ public class Task
                 // we initially wait for one interval
                 // in most cases, the threads go away immediately (by the 
cancellation thread)
                 // and we need not actually do anything
-                executerThread.join(interruptIntervalMillis);
+                executorThread.join(interruptIntervalMillis);
 
                 // log stack trace where the executing thread is stuck and
                 // interrupt the running thread periodically while it is still 
alive
-                while (executerThread.isAlive()) {
-                    task.maybeInterruptOnCancel(executerThread, taskName, 
interruptIntervalMillis);
+                while (executorThread.isAlive()) {
+                    task.maybeInterruptOnCancel(executorThread, taskName, 
interruptIntervalMillis);
                     try {
-                        executerThread.join(interruptIntervalMillis);
+                        executorThread.join(interruptIntervalMillis);
                     } catch (InterruptedException e) {
                         // we ignore this and fall through the loop
                     }
@@ -1729,7 +1729,7 @@ public class Task
     private static class TaskCancelerWatchDog implements Runnable {
 
         /** The executing task thread that we wait for to terminate. */
-        private final Thread executerThread;
+        private final Thread executorThread;
 
         /** The TaskManager to notify if cancellation does not happen in time. 
*/
         private final TaskManagerActions taskManager;
@@ -1741,14 +1741,14 @@ public class Task
 
         TaskCancelerWatchDog(
                 TaskInfo taskInfo,
-                Thread executerThread,
+                Thread executorThread,
                 TaskManagerActions taskManager,
                 long timeoutMillis) {
 
             checkArgument(timeoutMillis > 0);
 
             this.taskInfo = taskInfo;
-            this.executerThread = executerThread;
+            this.executorThread = executorThread;
             this.taskManager = taskManager;
             this.timeoutMillis = timeoutMillis;
         }
@@ -1757,17 +1757,17 @@ public class Task
         public void run() {
             try {
                 Deadline timeout = 
Deadline.fromNow(Duration.ofMillis(timeoutMillis));
-                while (executerThread.isAlive() && timeout.hasTimeLeft()) {
+                while (executorThread.isAlive() && timeout.hasTimeLeft()) {
                     try {
-                        executerThread.join(Math.max(1, 
timeout.timeLeft().toMillis()));
+                        executorThread.join(Math.max(1, 
timeout.timeLeft().toMillis()));
                     } catch (InterruptedException ignored) {
                         // we don't react to interrupted exceptions, simply 
fall through the loop
                     }
                 }
 
-                if (executerThread.isAlive()) {
+                if (executorThread.isAlive()) {
                     logTaskThreadStackTrace(
-                            executerThread,
+                            executorThread,
                             taskInfo.getTaskNameWithSubtasks(),
                             timeoutMillis,
                             "notifying TM");

Reply via email to