Github user tgravescs commented on a diff in the pull request: https://github.com/apache/spark/pull/14659#discussion_r78767924 --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala --- @@ -2418,6 +2418,21 @@ private[spark] object Utils extends Logging { sparkJars.map(_.split(",")).map(_.filter(_.nonEmpty)).toSeq.flatten } } + + def setCallerContext(context: String): Boolean = { + var succeed = false + try { + val Builder = Utils.classForName("org.apache.hadoop.ipc.CallerContext$Builder") + val builderInst = Builder.getConstructor(classOf[String]).newInstance(context) + val ret = Builder.getMethod("build").invoke(builderInst) + val callerContext = Utils.classForName("org.apache.hadoop.ipc.CallerContext") + callerContext.getMethod("setCurrent", callerContext).invoke(null, ret) + succeed = true + } catch { + case NonFatal(e) => logDebug(s"$e", e) --- End diff -- why are you printing exception twice here. make the actual log message something like failed to set CallerContext and leave the Exception to print after ,e
--- 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