public class StatefulFunctionsConfig
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static org.apache.flink.configuration.ConfigOption<java.lang.Integer> |
ASYNC_MAX_OPERATIONS_PER_TASK |
static org.apache.flink.configuration.ConfigOption<java.lang.String> |
FLINK_JOB_NAME |
static java.lang.String |
MODULE_CONFIG_PREFIX |
static org.apache.flink.configuration.ConfigOption<java.lang.String> |
MODULE_GLOBAL_DEFAULT |
static org.apache.flink.configuration.ConfigOption<java.lang.String> |
REMOTE_MODULE_NAME |
static org.apache.flink.configuration.ConfigOption<org.apache.flink.configuration.MemorySize> |
TOTAL_MEMORY_USED_FOR_FEEDBACK_CHECKPOINTING |
static org.apache.flink.configuration.ConfigOption<java.lang.String> |
USER_MESSAGE_CUSTOM_PAYLOAD_SERIALIZER_CLASS |
static org.apache.flink.configuration.ConfigOption<MessageFactoryType> |
USER_MESSAGE_SERIALIZER |
Modifier and Type | Method and Description |
---|---|
void |
addAllGlobalConfigurations(java.util.Map<java.lang.String,java.lang.String> globalConfigurations)
Adds all entries in this to the global configuration.
|
static StatefulFunctionsConfig |
fromEnvironment(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env)
Creates a new
StatefulFunctionsConfig based on the default configurations in the
current environment set via the flink-conf.yaml . |
static StatefulFunctionsConfig |
fromFlinkConfiguration(org.apache.flink.configuration.Configuration flinkConfiguration) |
java.lang.String |
getCustomPayloadSerializerClassName()
Returns the custom payload serializer class name, when factory type is WITH_CUSTOM_PAYLOADS *
|
MessageFactoryKey |
getFactoryKey()
Returns the factory key *
|
MessageFactoryType |
getFactoryType()
Returns the factory type used to serialize messages.
|
org.apache.flink.configuration.MemorySize |
getFeedbackBufferSize()
Returns the number of bytes to use for in memory buffering of the feedback channel.
|
java.lang.String |
getFlinkJobName()
Returns the Flink job name that appears in the Web UI.
|
java.util.Map<java.lang.String,java.lang.String> |
getGlobalConfigurations()
Returns the global configurations passed to
StatefulFunctionModule.configure(Map,
StatefulFunctionModule.Binder) . |
int |
getMaxAsyncOperationsPerTask()
Returns the max async operations allowed per task.
|
StatefulFunctionsUniverseProvider |
getProvider(java.lang.ClassLoader cl)
Retrieves the universe provider for loading modules.
|
java.lang.String |
getRemoteModuleName()
Returns the remote module name.
|
void |
setCustomPayloadSerializerClassName(java.lang.String customPayloadSerializerClassName)
Sets the custom payload serializer class name *
|
void |
setFactoryType(MessageFactoryType factoryType)
Sets the factory type used to serialize messages.
|
void |
setFeedbackBufferSize(org.apache.flink.configuration.MemorySize size)
Sets the number of bytes to use for in memory buffering of the feedback channel.
|
void |
setFlinkJobName(java.lang.String flinkJobName)
Set the Flink job name that appears in the Web UI.
|
void |
setGlobalConfiguration(java.lang.String key,
java.lang.String value)
Adds the given key/value pair to the global configuration.
|
void |
setMaxAsyncOperationsPerTask(int maxAsyncOperationsPerTask)
Sets the max async operations allowed per task.
|
void |
setProvider(StatefulFunctionsUniverseProvider provider)
Sets the universe provider used to load modules.
|
void |
setRemoteModuleName(java.lang.String remoteModuleName)
Sets a template for the remote module name.
|
public static final java.lang.String MODULE_CONFIG_PREFIX
public static final org.apache.flink.configuration.ConfigOption<java.lang.String> MODULE_GLOBAL_DEFAULT
public static final org.apache.flink.configuration.ConfigOption<MessageFactoryType> USER_MESSAGE_SERIALIZER
public static final org.apache.flink.configuration.ConfigOption<java.lang.String> USER_MESSAGE_CUSTOM_PAYLOAD_SERIALIZER_CLASS
public static final org.apache.flink.configuration.ConfigOption<java.lang.String> FLINK_JOB_NAME
public static final org.apache.flink.configuration.ConfigOption<org.apache.flink.configuration.MemorySize> TOTAL_MEMORY_USED_FOR_FEEDBACK_CHECKPOINTING
public static final org.apache.flink.configuration.ConfigOption<java.lang.Integer> ASYNC_MAX_OPERATIONS_PER_TASK
public static final org.apache.flink.configuration.ConfigOption<java.lang.String> REMOTE_MODULE_NAME
public static StatefulFunctionsConfig fromEnvironment(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env)
StatefulFunctionsConfig
based on the default configurations in the
current environment set via the flink-conf.yaml
.public static StatefulFunctionsConfig fromFlinkConfiguration(org.apache.flink.configuration.Configuration flinkConfiguration)
public MessageFactoryType getFactoryType()
public java.lang.String getCustomPayloadSerializerClassName()
public MessageFactoryKey getFactoryKey()
public void setFactoryType(MessageFactoryType factoryType)
public void setCustomPayloadSerializerClassName(java.lang.String customPayloadSerializerClassName)
public java.lang.String getFlinkJobName()
public void setFlinkJobName(java.lang.String flinkJobName)
public org.apache.flink.configuration.MemorySize getFeedbackBufferSize()
public void setFeedbackBufferSize(org.apache.flink.configuration.MemorySize size)
public int getMaxAsyncOperationsPerTask()
public void setMaxAsyncOperationsPerTask(int maxAsyncOperationsPerTask)
public java.lang.String getRemoteModuleName()
public void setRemoteModuleName(java.lang.String remoteModuleName)
By default the system will look for module.yaml in the classapth, to override that use either a configuration parameter (see REMOTE_MODULE_NAME) or this getter.
The supported formats are either a file path, a file path prefixed with a file:
schema, or a name prefixed by classpath:
public StatefulFunctionsUniverseProvider getProvider(java.lang.ClassLoader cl)
cl
- The classloader on which the provider class is located.StatefulFunctionsUniverseProvider
.public void setProvider(StatefulFunctionsUniverseProvider provider)
public java.util.Map<java.lang.String,java.lang.String> getGlobalConfigurations()
StatefulFunctionModule.configure(Map,
StatefulFunctionModule.Binder)
.public void addAllGlobalConfigurations(java.util.Map<java.lang.String,java.lang.String> globalConfigurations)
public void setGlobalConfiguration(java.lang.String key, java.lang.String value)
key
- the key of the key/value pair to be addedvalue
- the value of the key/value pair to be addedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.