public class TaskManagerServicesConfiguration extends Object
Constructor and Description |
---|
TaskManagerServicesConfiguration(InetAddress taskManagerAddress,
String[] tmpDirPaths,
String[] localRecoveryStateRootDirectories,
boolean localRecoveryEnabled,
NetworkEnvironmentConfiguration networkConfig,
QueryableStateConfiguration queryableStateConfig,
int numberOfSlots,
long configuredMemory,
MemoryType memoryType,
boolean preAllocateMemory,
float memoryFraction,
long timerServiceShutdownTimeout) |
Modifier and Type | Method and Description |
---|---|
protected static void |
checkNetworkBufferConfig(int pageSize,
float networkBufFraction,
long networkBufMin,
long networkBufMax)
Validates the (new) network buffer configuration.
|
protected static void |
checkNetworkConfigOld(int numNetworkBuffers)
Validates the (old) network buffer configuration.
|
static TaskManagerServicesConfiguration |
fromConfiguration(Configuration configuration,
InetAddress remoteAddress,
boolean localCommunication)
Utility method to extract TaskManager config parameters from the configuration and to
sanity check them.
|
long |
getConfiguredMemory()
Returns the size of the managed memory (in megabytes), if configured.
|
String[] |
getLocalRecoveryStateRootDirectories() |
float |
getMemoryFraction() |
MemoryType |
getMemoryType()
Returns the memory type to use.
|
NetworkEnvironmentConfiguration |
getNetworkConfig() |
int |
getNumberOfSlots() |
QueryableStateConfiguration |
getQueryableStateConfig() |
InetAddress |
getTaskManagerAddress() |
long |
getTimerServiceShutdownTimeout() |
String[] |
getTmpDirPaths() |
static boolean |
hasNewNetworkBufConf(Configuration config)
Returns whether the new network buffer memory configuration is present in the configuration
object, i.e.
|
boolean |
isLocalRecoveryEnabled() |
boolean |
isPreAllocateMemory() |
public TaskManagerServicesConfiguration(InetAddress taskManagerAddress, String[] tmpDirPaths, String[] localRecoveryStateRootDirectories, boolean localRecoveryEnabled, NetworkEnvironmentConfiguration networkConfig, QueryableStateConfiguration queryableStateConfig, int numberOfSlots, long configuredMemory, MemoryType memoryType, boolean preAllocateMemory, float memoryFraction, long timerServiceShutdownTimeout)
public InetAddress getTaskManagerAddress()
public String[] getTmpDirPaths()
public String[] getLocalRecoveryStateRootDirectories()
public boolean isLocalRecoveryEnabled()
public NetworkEnvironmentConfiguration getNetworkConfig()
public QueryableStateConfiguration getQueryableStateConfig()
public int getNumberOfSlots()
public float getMemoryFraction()
public MemoryType getMemoryType()
public long getConfiguredMemory()
TaskManagerOptions.MANAGED_MEMORY_SIZE
public boolean isPreAllocateMemory()
public long getTimerServiceShutdownTimeout()
public static TaskManagerServicesConfiguration fromConfiguration(Configuration configuration, InetAddress remoteAddress, boolean localCommunication) throws Exception
configuration
- The configuration.remoteAddress
- identifying the IP address under which the TaskManager will be accessiblelocalCommunication
- True, to skip initializing the network stack.
Use only in cases where only one task manager runs.Exception
protected static void checkNetworkConfigOld(int numNetworkBuffers)
numNetworkBuffers
- number of buffers used in the network stackIllegalConfigurationException
- if the condition does not holdprotected static void checkNetworkBufferConfig(int pageSize, float networkBufFraction, long networkBufMin, long networkBufMax) throws IllegalConfigurationException
pageSize
- size of memory buffersnetworkBufFraction
- fraction of JVM memory to use for network buffersnetworkBufMin
- minimum memory size for network buffers (in bytes)networkBufMax
- maximum memory size for network buffers (in bytes)IllegalConfigurationException
- if the condition does not holdpublic static boolean hasNewNetworkBufConf(Configuration config)
config
- configuration objectCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.