Github user Sherry302 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14659#discussion_r79692475
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -2420,6 +2420,44 @@ private[spark] object Utils extends Logging {
       }
     }
     
    +private[spark] class CallerContext(
    +   appName: Option[String] = None,
    +   appID: Option[String] = None,
    +   appAttemptID: Option[String] = None,
    +   jobID: Option[Int] = None,
    +   stageID: Option[Int] = None,
    +   stageAttemptId: Option[Int] = None,
    +   taskId: Option[Long] = None,
    +   taskAttemptNumber: Option[Int] = None) extends Logging {
    +
    +   val AppName = if (appName.isDefined) s"_AppName_${appName.get}" else ""
    +   val AppID = if (appID.isDefined) s"_AppID_${appID.get}" else ""
    +   val AppAttemptID = if (appAttemptID.isDefined) s"_${appAttemptID.get}" 
else ""
    +   val JobID = if (jobID.isDefined) s"_JobID_${jobID.get}" else ""
    +   val StageID = if (stageID.isDefined) s"_StageID_${stageID.get}" else ""
    +   val StageAttemptId = if (stageAttemptId.isDefined) 
s"_${stageAttemptId.get}" else ""
    +   val TaskId = if (taskId.isDefined) s"_TaskId_${taskId.get}" else ""
    +   val TaskAttemptNumber = if (taskAttemptNumber.isDefined) 
s"_${taskAttemptNumber.get}" else ""
    +
    +   val context = "SPARK" + AppName + AppID + AppAttemptID +
    +     JobID + StageID + StageAttemptId + TaskId + TaskAttemptNumber
    +
    +  def set(): Boolean = {
    +    var succeed = false
    +    try {
    +      val callerContext = 
Utils.classForName("org.apache.hadoop.ipc.CallerContext")
    --- End diff --
    
    Yes. I have updated the PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to