public class TorrentBroadcastFactory extends Object implements BroadcastFactory
Broadcast
implementation that uses a BitTorrent-like
protocol to do a distributed transfer of the broadcasted data to the executors. Refer to
TorrentBroadcast
for more details.Constructor and Description |
---|
TorrentBroadcastFactory() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(boolean isDriver,
SparkConf conf,
org.apache.spark.SecurityManager securityMgr) |
<T> org.apache.spark.broadcast.TorrentBroadcast<T> |
newBroadcast(T value_,
boolean isLocal,
long id,
scala.reflect.ClassTag<T> evidence$1)
Creates a new broadcast variable.
|
void |
stop() |
void |
unbroadcast(long id,
boolean removeFromDriver,
boolean blocking)
Remove all persisted state associated with the torrent broadcast with the given ID.
|
public void initialize(boolean isDriver, SparkConf conf, org.apache.spark.SecurityManager securityMgr)
initialize
in interface BroadcastFactory
public <T> org.apache.spark.broadcast.TorrentBroadcast<T> newBroadcast(T value_, boolean isLocal, long id, scala.reflect.ClassTag<T> evidence$1)
BroadcastFactory
newBroadcast
in interface BroadcastFactory
value_
- value to broadcastisLocal
- whether we are in local mode (single JVM process)id
- unique id representing this broadcast variablepublic void stop()
stop
in interface BroadcastFactory
public void unbroadcast(long id, boolean removeFromDriver, boolean blocking)
unbroadcast
in interface BroadcastFactory
removeFromDriver
- Whether to remove state from the driver.blocking
- Whether to block until unbroadcasted