Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Dec 24, 2024
1 parent 9329a0c commit 5cf681c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object BroadcastFactoryUnsafeAccess {
}
}

def inject(factory: BroadcastFactory): Unit = {
def set(factory: BroadcastFactory): Unit = {
require(SparkEnv.get != null, "No SparkEnv instance founded")
val bm = SparkEnv.get.broadcastManager
bm.synchronized {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BroadcastFactoryUnsafeAccessSuite extends SharedSparkSession {
BroadcastFactoryUnsafeAccess.get().stop()
val factory = new DummyBroadcastFactory()
assert(!factory.initialized)
BroadcastFactoryUnsafeAccess.inject(factory)
BroadcastFactoryUnsafeAccess.set(factory)
assert(BroadcastFactoryUnsafeAccess.get() eq factory)
assert(factory.initialized)
val text: String = "DUMMY"
Expand Down

0 comments on commit 5cf681c

Please sign in to comment.