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,
org.apache.flink.core.memory.MemoryType memoryType,
boolean preAllocateMemory,
float memoryFraction,
long timerServiceShutdownTimeout,
Optional<org.apache.flink.api.common.time.Time> systemResourceMetricsProbingInterval) |
| 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(org.apache.flink.configuration.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() |
org.apache.flink.core.memory.MemoryType |
getMemoryType()
Returns the memory type to use.
|
NetworkEnvironmentConfiguration |
getNetworkConfig() |
int |
getNumberOfSlots() |
QueryableStateConfiguration |
getQueryableStateConfig() |
Optional<org.apache.flink.api.common.time.Time> |
getSystemResourceMetricsProbingInterval() |
InetAddress |
getTaskManagerAddress() |
long |
getTimerServiceShutdownTimeout() |
String[] |
getTmpDirPaths() |
static boolean |
hasNewNetworkBufConf(org.apache.flink.configuration.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, org.apache.flink.core.memory.MemoryType memoryType, boolean preAllocateMemory, float memoryFraction, long timerServiceShutdownTimeout, Optional<org.apache.flink.api.common.time.Time> systemResourceMetricsProbingInterval)
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 org.apache.flink.core.memory.MemoryType getMemoryType()
public long getConfiguredMemory()
TaskManagerOptions.MANAGED_MEMORY_SIZEpublic boolean isPreAllocateMemory()
public long getTimerServiceShutdownTimeout()
public Optional<org.apache.flink.api.common.time.Time> getSystemResourceMetricsProbingInterval()
public static TaskManagerServicesConfiguration fromConfiguration(org.apache.flink.configuration.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.Exceptionprotected static void checkNetworkConfigOld(int numNetworkBuffers)
numNetworkBuffers - number of buffers used in the network stackorg.apache.flink.configuration.IllegalConfigurationException - if the condition does not holdprotected static void checkNetworkBufferConfig(int pageSize,
float networkBufFraction,
long networkBufMin,
long networkBufMax)
throws org.apache.flink.configuration.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)org.apache.flink.configuration.IllegalConfigurationException - if the condition does not holdpublic static boolean hasNewNetworkBufConf(org.apache.flink.configuration.Configuration config)
config - configuration objectCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.