This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 3c73106933f [SPARK-38936][SQL] Script transform feed thread should 
have name
3c73106933f is described below

commit 3c73106933f83343ada5a455116d1a2537e7831a
Author: sychen <[email protected]>
AuthorDate: Thu Apr 21 11:34:39 2022 +0900

    [SPARK-38936][SQL] Script transform feed thread should have name
    
    ### What changes were proposed in this pull request?
    re-add thread name(`Thread-ScriptTransformation-Feed`).
    
    ### Why are the changes needed?
    Lost feed thread name after 
[SPARK-32105](https://issues.apache.org/jira/browse/SPARK-32105) refactoring.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    exist UT
    
    Closes #36245 from cxzl25/SPARK-38936.
    
    Authored-by: sychen <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
    (cherry picked from commit 4dc12eb54544a12ff7ddf078ca8bcec9471212c3)
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .../org/apache/spark/sql/execution/BaseScriptTransformationExec.scala  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/BaseScriptTransformationExec.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/BaseScriptTransformationExec.scala
index 74e5aa716ad..e13be8076ea 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/BaseScriptTransformationExec.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/BaseScriptTransformationExec.scala
@@ -247,6 +247,7 @@ abstract class BaseScriptTransformationWriterThread extends 
Thread with Logging
   def taskContext: TaskContext
   def conf: Configuration
 
+  setName(s"Thread-${this.getClass.getSimpleName}-Feed")
   setDaemon(true)
 
   @volatile protected var _exception: Throwable = null
@@ -295,7 +296,7 @@ abstract class BaseScriptTransformationWriterThread extends 
Thread with Logging
         // Javadoc this call will not throw an exception:
         _exception = t
         proc.destroy()
-        logError("Thread-ScriptTransformation-Feed exit cause by: ", t)
+        logError(s"Thread-${this.getClass.getSimpleName}-Feed exit cause by: 
", t)
     } finally {
       try {
         Utils.tryLogNonFatalError(outputStream.close())


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to