org.apache.spark
Class SparkEnv

Object
  extended by org.apache.spark.SparkEnv
All Implemented Interfaces:
Logging

public class SparkEnv
extends Object
implements Logging

:: DeveloperApi :: Holds all the runtime environment objects for a running Spark instance (either master or worker), including the serializer, Akka actor system, block manager, map output tracker, etc. Currently Spark code finds the SparkEnv through a global variable, so all the threads can access the same SparkEnv. It can be accessed by SparkEnv.get (e.g. after creating a SparkContext).

NOTE: This is not intended for external use. This is exposed for Shark and may be made private in a future release.


Constructor Summary
SparkEnv(String executorId, org.apache.spark.rpc.RpcEnv rpcEnv, Serializer serializer, Serializer closureSerializer, org.apache.spark.CacheManager cacheManager, org.apache.spark.MapOutputTracker mapOutputTracker, org.apache.spark.shuffle.ShuffleManager shuffleManager, org.apache.spark.broadcast.BroadcastManager broadcastManager, org.apache.spark.network.BlockTransferService blockTransferService, org.apache.spark.storage.BlockManager blockManager, org.apache.spark.SecurityManager securityManager, org.apache.spark.HttpFileServer httpFileServer, String sparkFilesDir, org.apache.spark.metrics.MetricsSystem metricsSystem, org.apache.spark.shuffle.ShuffleMemoryManager shuffleMemoryManager, org.apache.spark.unsafe.memory.ExecutorMemoryManager executorMemoryManager, org.apache.spark.scheduler.OutputCommitCoordinator outputCommitCoordinator, SparkConf conf)
           
 
Method Summary
 akka.actor.ActorSystem actorSystem()
           
 org.apache.spark.storage.BlockManager blockManager()
           
 org.apache.spark.network.BlockTransferService blockTransferService()
           
 org.apache.spark.broadcast.BroadcastManager broadcastManager()
           
 org.apache.spark.CacheManager cacheManager()
           
 Serializer closureSerializer()
           
 SparkConf conf()
           
static String driverActorSystemName()
           
static String executorActorSystemName()
           
 String executorId()
           
 org.apache.spark.unsafe.memory.ExecutorMemoryManager executorMemoryManager()
           
static SparkEnv get()
          Returns the SparkEnv.
static SparkEnv getThreadLocal()
          Returns the ThreadLocal SparkEnv.
 java.util.concurrent.ConcurrentMap<String,Object> hadoopJobMetadata()
           
 org.apache.spark.HttpFileServer httpFileServer()
           
 boolean isStopped()
           
 org.apache.spark.MapOutputTracker mapOutputTracker()
           
 org.apache.spark.metrics.MetricsSystem metricsSystem()
           
 org.apache.spark.scheduler.OutputCommitCoordinator outputCommitCoordinator()
           
 org.apache.spark.rpc.RpcEnv rpcEnv()
           
 org.apache.spark.SecurityManager securityManager()
           
 Serializer serializer()
           
static void set(SparkEnv e)
           
 org.apache.spark.shuffle.ShuffleManager shuffleManager()
           
 org.apache.spark.shuffle.ShuffleMemoryManager shuffleMemoryManager()
           
 String sparkFilesDir()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.spark.Logging
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
 

Constructor Detail

SparkEnv

public SparkEnv(String executorId,
                org.apache.spark.rpc.RpcEnv rpcEnv,
                Serializer serializer,
                Serializer closureSerializer,
                org.apache.spark.CacheManager cacheManager,
                org.apache.spark.MapOutputTracker mapOutputTracker,
                org.apache.spark.shuffle.ShuffleManager shuffleManager,
                org.apache.spark.broadcast.BroadcastManager broadcastManager,
                org.apache.spark.network.BlockTransferService blockTransferService,
                org.apache.spark.storage.BlockManager blockManager,
                org.apache.spark.SecurityManager securityManager,
                org.apache.spark.HttpFileServer httpFileServer,
                String sparkFilesDir,
                org.apache.spark.metrics.MetricsSystem metricsSystem,
                org.apache.spark.shuffle.ShuffleMemoryManager shuffleMemoryManager,
                org.apache.spark.unsafe.memory.ExecutorMemoryManager executorMemoryManager,
                org.apache.spark.scheduler.OutputCommitCoordinator outputCommitCoordinator,
                SparkConf conf)
Method Detail

driverActorSystemName

public static String driverActorSystemName()

executorActorSystemName

public static String executorActorSystemName()

set

public static void set(SparkEnv e)

get

public static SparkEnv get()
Returns the SparkEnv.

Returns:
(undocumented)

getThreadLocal

public static SparkEnv getThreadLocal()
Returns the ThreadLocal SparkEnv.

Returns:
(undocumented)

executorId

public String executorId()

rpcEnv

public org.apache.spark.rpc.RpcEnv rpcEnv()

serializer

public Serializer serializer()

closureSerializer

public Serializer closureSerializer()

cacheManager

public org.apache.spark.CacheManager cacheManager()

mapOutputTracker

public org.apache.spark.MapOutputTracker mapOutputTracker()

shuffleManager

public org.apache.spark.shuffle.ShuffleManager shuffleManager()

broadcastManager

public org.apache.spark.broadcast.BroadcastManager broadcastManager()

blockTransferService

public org.apache.spark.network.BlockTransferService blockTransferService()

blockManager

public org.apache.spark.storage.BlockManager blockManager()

securityManager

public org.apache.spark.SecurityManager securityManager()

httpFileServer

public org.apache.spark.HttpFileServer httpFileServer()

sparkFilesDir

public String sparkFilesDir()

metricsSystem

public org.apache.spark.metrics.MetricsSystem metricsSystem()

shuffleMemoryManager

public org.apache.spark.shuffle.ShuffleMemoryManager shuffleMemoryManager()

executorMemoryManager

public org.apache.spark.unsafe.memory.ExecutorMemoryManager executorMemoryManager()

outputCommitCoordinator

public org.apache.spark.scheduler.OutputCommitCoordinator outputCommitCoordinator()

conf

public SparkConf conf()

actorSystem

public akka.actor.ActorSystem actorSystem()

isStopped

public boolean isStopped()

hadoopJobMetadata

public java.util.concurrent.ConcurrentMap<String,Object> hadoopJobMetadata()