Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/14659#discussion_r78767418
--- 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")
--- End diff --
It might be nice to do this first outside of this try block and it the
class isn't found we just skip the rest of this and assume its before hadoop
2.8.0
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]