public class TaskManagerServicesConfiguration extends Object
构造器和说明 |
---|
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) |
限定符和类型 | 方法和说明 |
---|---|
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() |
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. at least one new parameter is given or the old one is not present.
|
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)
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_SIZE
public boolean isPreAllocateMemory()
public long getTimerServiceShutdownTimeout()
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.Exception
protected 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.