@PublicEvolving public class MultipleParameterTool extends AbstractParameterTool
MultipleParameterTool object is used for
GlobalJobParameters, the last one of multiple values will be used. Navigate to toMap()
for more information.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Collection<String>> |
data |
DEFAULT_UNDEFINED, defaultData, NO_VALUE_KEY, unrequestedParameters| Modifier and Type | Method and Description |
|---|---|
protected Object |
clone() |
boolean |
equals(Object o) |
static MultipleParameterTool |
fromArgs(String[] args)
Returns
MultipleParameterTool for the given arguments. |
static MultipleParameterTool |
fromMultiMap(Map<String,Collection<String>> multiMap)
Returns
MultipleParameterTool for the given multi map. |
String |
get(String key)
Returns the String value for the given key.
|
Collection<String> |
getMultiParameter(String key)
Returns the Collection of String values for the given key.
|
Collection<String> |
getMultiParameterRequired(String key)
Returns the Collection of String values for the given key.
|
int |
getNumberOfParameters()
Returns number of parameters in
ParameterTool. |
boolean |
has(String value)
Check if value is set.
|
int |
hashCode() |
MultipleParameterTool |
mergeWith(MultipleParameterTool other)
Merges two
MultipleParameterTool. |
Map<String,String> |
toMap() |
Map<String,Collection<String>> |
toMultiMap()
Return MultiMap of all the parameters processed by
MultipleParameterTool. |
addToDefaults, get, getBoolean, getBoolean, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRequired, getShort, getShort, getUnrequestedParametersprotected final Map<String,Collection<String>> data
public static MultipleParameterTool fromArgs(String[] args)
MultipleParameterTool for the given arguments. The arguments are keys
followed by values. Keys have to start with '-' or '--'
Example arguments: --key1 value1 --key2 value2 -key3 value3 --multi multiValue1 --multi multiValue2
args - Input array argumentsMultipleParameterToolpublic static MultipleParameterTool fromMultiMap(Map<String,Collection<String>> multiMap)
MultipleParameterTool for the given multi map.multiMap - A map of arguments. Key is String and value is a Collection.MultipleParameterToolpublic boolean equals(Object o)
equals in class org.apache.flink.api.common.ExecutionConfig.GlobalJobParameterspublic int hashCode()
hashCode in class org.apache.flink.api.common.ExecutionConfig.GlobalJobParameterspublic int getNumberOfParameters()
ParameterTool.getNumberOfParameters in class AbstractParameterToolpublic String get(String key)
getMultiParameter(String) instead if want to get multiple values parameter. If the key does
not exist it will return null.get in class AbstractParameterToolpublic boolean has(String value)
has in class AbstractParameterToolpublic Collection<String> getMultiParameter(String key)
public Collection<String> getMultiParameterRequired(String key)
RuntimeException.public Map<String,Collection<String>> toMultiMap()
MultipleParameterTool.MultipleParameterTool. Key is String and Value is a
Collection of String.protected Object clone() throws CloneNotSupportedException
clone in class AbstractParameterToolCloneNotSupportedExceptionpublic MultipleParameterTool mergeWith(MultipleParameterTool other)
MultipleParameterTool.other - Other MultipleParameterTool objectMultipleParameterToolpublic Map<String,String> toMap()
toMap in class AbstractParameterToolCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.