Packages

c

org.apache.spark.storage

FileBasedTopologyMapper

class FileBasedTopologyMapper extends TopologyMapper with Logging

Developer API

A simple file based topology mapper. This expects topology information provided as a java.util.Properties file. The name of the file is obtained from SparkConf property spark.storage.replication.topologyFile. To use this topology mapper, set the spark.storage.replication.topologyMapper property to org.apache.spark.storage.FileBasedTopologyMapper

Annotations
@DeveloperApi()
Source
TopologyMapper.scala
Linear Supertypes
Logging, TopologyMapper, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileBasedTopologyMapper
  2. Logging
  3. TopologyMapper
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FileBasedTopologyMapper(conf: SparkConf)

    conf

    SparkConf object

Value Members

  1. def getTopologyForHost(hostname: String): Option[String]

    Gets the topology information given the host name

    Gets the topology information given the host name

    hostname

    Hostname

    returns

    topology information for the given hostname. One can use a 'topology delimiter' to make this topology information nested. For example : ‘/myrack/myhost’, where ‘/’ is the topology delimiter, ‘myrack’ is the topology identifier, and ‘myhost’ is the individual host. This function only returns the topology information without the hostname. This information can be used when choosing executors for block replication to discern executors from a different rack than a candidate executor, for example. An implementation can choose to use empty strings or None in case topology info is not available. This would imply that all such executors belong to the same rack.

    Definition Classes
    FileBasedTopologyMapperTopologyMapper
  2. val topologyFile: Option[String]
  3. val topologyMap: Map[String, String]