public class FunctionContext extends Object
param: context the runtime context in which the Flink Function is executed
Constructor and Description |
---|
FunctionContext(RuntimeContext context) |
Modifier and Type | Method and Description |
---|---|
File |
getCachedFile(String name)
Gets the local temporary file copy of a distributed cache files.
|
String |
getJobParameter(String key,
String defaultValue)
Gets the global job parameter value associated with the given key as a string.
|
MetricGroup |
getMetricGroup()
Returns the metric group for this parallel subtask.
|
public FunctionContext(RuntimeContext context)
public MetricGroup getMetricGroup()
public File getCachedFile(String name)
name
- distributed cache file namepublic String getJobParameter(String key, String defaultValue)
key
- key pointing to the associated valuedefaultValue
- default value which is returned in case global job parameter is null
or there is no value associated with the given keyCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.