@Internal public final class ConstantFunctionContext extends FunctionContext
FunctionContext for constant expression reduction. It is used when a function is called
with constant expressions or constant expressions can be derived from the given statement.
Since constant expression reduction happens during planning, methods that reference Flink's runtime context are not available.
FunctionDefinition.isDeterministic()| Constructor and Description |
|---|
ConstantFunctionContext(org.apache.flink.configuration.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
File |
getCachedFile(String name)
Gets the local temporary file copy of a distributed cache files.
|
Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> |
getExternalResourceInfos(String resourceName)
Get the external resource information.
|
String |
getJobParameter(String key,
String defaultValue)
Gets the global job parameter value associated with the given key as a string.
|
org.apache.flink.metrics.MetricGroup |
getMetricGroup()
Returns the metric group for this parallel subtask.
|
public ConstantFunctionContext(org.apache.flink.configuration.Configuration configuration)
public org.apache.flink.metrics.MetricGroup getMetricGroup()
FunctionContextgetMetricGroup in class FunctionContextpublic File getCachedFile(String name)
FunctionContextgetCachedFile in class FunctionContextname - distributed cache file namepublic String getJobParameter(String key, String defaultValue)
FunctionContextgetJobParameter in class FunctionContextkey - 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 keypublic Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> getExternalResourceInfos(String resourceName)
FunctionContextgetExternalResourceInfos in class FunctionContextCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.