Skip to content

Commit

Permalink
Remove an unused method with its outdated comment (#4212)
Browse files Browse the repository at this point in the history
Minor cleanup in ShimLoader.scala
- unused method `setSparkShimProviderClass` that used to power the shim override option
- unnecessary self-reference in `newExplainPlan`

Fixes #4213 

Signed-off-by: Gera Shegalov <gera@apache.org>
  • Loading branch information
gerashegalov authored Nov 24, 2021
1 parent 8d4d88f commit 18875c8
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,6 @@ object ShimLoader extends Logging {
SPARK_BUILD_DATE
)

// TODO broken right now, check if this can be supported with parallel worlds
// it implies the prerequisite of having such a class in the conventional root jar entry
// - or the necessity of an additional parameter for specifying the shim subdirectory
// - or enforcing the convention the class file parent directory is the shimId that is also
// a top entry e.g. /spark301/com/nvidia/test/shim/spark301/Spark301Shims.class
def setSparkShimProviderClass(classname: String): Unit = {
shimProviderClass = classname
}

def loadClass(className: String): Class[_] = {
val loader = getShimClassLoader()
logDebug(s"Loading $className using $loader with the parent loader ${loader.getParent}")
Expand Down Expand Up @@ -428,6 +419,6 @@ object ShimLoader extends Logging {
}

def newExplainPlan(): ExplainPlanBase = {
ShimLoader.newInstanceOf[ExplainPlanBase]("com.nvidia.spark.rapids.ExplainPlanImpl")
newInstanceOf[ExplainPlanBase]("com.nvidia.spark.rapids.ExplainPlanImpl")
}
}

0 comments on commit 18875c8

Please sign in to comment.