@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.| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,Collection<String>> |
data |
DEFAULT_UNDEFINED, defaultData, NO_VALUE_KEY, unrequestedParameters| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 org.apache.flink.api.common.ExecutionConfig.GlobalJobParameterspublic int hashCode()
hashCode 在类中 org.apache.flink.api.common.ExecutionConfig.GlobalJobParameterspublic int getNumberOfParameters()
ParameterTool.public 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 在类中 AbstractParameterToolpublic boolean has(String value)
has 在类中 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 在类中 AbstractParameterToolCloneNotSupportedExceptionpublic MultipleParameterTool mergeWith(MultipleParameterTool other)
MultipleParameterTool.other - Other MultipleParameterTool objectMultipleParameterToolpublic Map<String,String> toMap()
toMap 在类中 AbstractParameterToolCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.