public class TaskManagerServicesConfiguration extends Object
| Constructor and Description |
|---|
TaskManagerServicesConfiguration(InetAddress taskManagerAddress,
String[] tmpDirPaths,
NetworkEnvironmentConfiguration networkConfig,
QueryableStateConfiguration queryableStateConfig,
int numberOfSlots,
long configuredMemory,
boolean preAllocateMemory,
float memoryFraction,
MetricRegistryConfiguration metricRegistryConfiguration,
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.
|
float |
getMemoryFraction() |
MetricRegistryConfiguration |
getMetricRegistryConfiguration() |
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 |
isPreAllocateMemory() |
public TaskManagerServicesConfiguration(InetAddress taskManagerAddress, String[] tmpDirPaths, NetworkEnvironmentConfiguration networkConfig, QueryableStateConfiguration queryableStateConfig, int numberOfSlots, long configuredMemory, boolean preAllocateMemory, float memoryFraction, MetricRegistryConfiguration metricRegistryConfiguration, long timerServiceShutdownTimeout)
public InetAddress getTaskManagerAddress()
public String[] getTmpDirPaths()
public NetworkEnvironmentConfiguration getNetworkConfig()
public QueryableStateConfiguration getQueryableStateConfig()
public int getNumberOfSlots()
public float getMemoryFraction()
public long getConfiguredMemory()
TaskManagerOptions.MANAGED_MEMORY_SIZEpublic boolean isPreAllocateMemory()
public MetricRegistryConfiguration getMetricRegistryConfiguration()
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.Exceptionprotected 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–2017 The Apache Software Foundation. All rights reserved.