@PublicEvolving public class FunctionContext extends Object
FunctionContextallows to obtain global runtime information about the context in which the user-defined function is executed.
The information includes the metric group, distributed cache files, and global job parameters.
|Constructor and Description|
Wraps the underlying
|Modifier and Type||Method and Description|
Gets the local temporary file copy of a distributed cache files.
Gets the global job parameter value associated with the given key as a string.
Returns the metric group for this parallel subtask.
public FunctionContext(RuntimeContext context)
context- the runtime context in which Flink's
public MetricGroup getMetricGroup()
public File getCachedFile(String name)
name- distributed cache file name
public String getJobParameter(String key, String defaultValue)
key- key pointing to the associated value
defaultValue- default value which is returned in case global job parameter is null or there is no value associated with the given key
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.