Skip to content

Commit 7076301

Browse files
weiqingyrxin
authored andcommitted
[SPARK-17710][FOLLOW UP] Add comments to state why 'Utils.classForName' is not used
## What changes were proposed in this pull request? Add comments. ## How was this patch tested? Build passed. Author: Weiqing Yang <yangweiqing001@gmail.com> Closes #15776 from weiqingy/SPARK-17710. (cherry picked from commit 8a9ca19) Signed-off-by: Reynold Xin <rxin@databricks.com>
1 parent 491db67 commit 7076301

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,6 +2539,8 @@ private[util] object CallerContext extends Logging {
25392539
val callerContextSupported: Boolean = {
25402540
SparkHadoopUtil.get.conf.getBoolean("hadoop.caller.context.enabled", false) && {
25412541
try {
2542+
// `Utils.classForName` will make `ReplSuite` fail with `ClassCircularityError` in
2543+
// master Maven build, so do not use it before resolving SPARK-17714.
25422544
// scalastyle:off classforname
25432545
Class.forName("org.apache.hadoop.ipc.CallerContext")
25442546
Class.forName("org.apache.hadoop.ipc.CallerContext$Builder")
@@ -2604,6 +2606,8 @@ private[spark] class CallerContext(
26042606
def setCurrentContext(): Unit = {
26052607
if (CallerContext.callerContextSupported) {
26062608
try {
2609+
// `Utils.classForName` will make `ReplSuite` fail with `ClassCircularityError` in
2610+
// master Maven build, so do not use it before resolving SPARK-17714.
26072611
// scalastyle:off classforname
26082612
val callerContext = Class.forName("org.apache.hadoop.ipc.CallerContext")
26092613
val builder = Class.forName("org.apache.hadoop.ipc.CallerContext$Builder")

0 commit comments

Comments
 (0)