public class ConfigurationParserUtils extends Object
Configuration and to
sanity check them.| Constructor and Description |
|---|
ConfigurationParserUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkConfigParameter(boolean condition,
Object parameter,
String name,
String errorMessage)
Validates a condition for a config parameter and displays a standard exception, if the
the condition does not hold.
|
static int |
getPageSize(org.apache.flink.configuration.Configuration configuration)
Parses the configuration to get the page size and validates the value.
|
static int |
getSlot(org.apache.flink.configuration.Configuration configuration)
Parses the configuration to get the number of slots and validates the value.
|
public static int getSlot(org.apache.flink.configuration.Configuration configuration)
configuration - configuration objectpublic static void checkConfigParameter(boolean condition,
Object parameter,
String name,
String errorMessage)
throws org.apache.flink.configuration.IllegalConfigurationException
condition - The condition that must hold. If the condition is false, an exception is thrown.parameter - The parameter value. Will be shown in the exception message.name - The name of the config parameter. Will be shown in the exception message.errorMessage - The optional custom error message to append to the exception message.org.apache.flink.configuration.IllegalConfigurationException - if the condition does not holdpublic static int getPageSize(org.apache.flink.configuration.Configuration configuration)
configuration - configuration objectCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.