[
https://issues.apache.org/jira/browse/BEAM-9855?focusedWorklogId=504729&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-504729
]
ASF GitHub Bot logged work on BEAM-9855:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Oct/20 14:06
Start Date: 26/Oct/20 14:06
Worklog Time Spent: 10m
Work Description: mxm commented on a change in pull request #13116:
URL: https://github.com/apache/beam/pull/13116#discussion_r511985337
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkExecutionEnvironments.java
##########
@@ -259,28 +278,44 @@ static StreamExecutionEnvironment
createStreamExecutionEnvironment(
options.setShutdownSourcesAfterIdleMs(0L);
}
}
+ }
- applyLatencyTrackingInterval(flinkStreamEnv.getConfig(), options);
-
- if (options.getAutoWatermarkInterval() != null) {
-
flinkStreamEnv.getConfig().setAutoWatermarkInterval(options.getAutoWatermarkInterval());
- }
-
- // State backend
- if (options.getStateBackendFactory() != null) {
+ private static void configureStateBackend(
+ FlinkPipelineOptions options, StreamExecutionEnvironment env) {
+ if (options.getStateBackend() != null) {
+ final String storagePath = options.getStateBackendStoragePath();
+ Preconditions.checkArgument(
+ storagePath != null,
+ "State backend was set to '%s' but no storage path was provided.",
+ options.getStateBackend());
+
+ final StateBackend stateBackend;
+ if (options.getStateBackend().equalsIgnoreCase("rocksdb")) {
Review comment:
There is no factory method available for state backends, they all have
different constructors. We can't use the class name.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 504729)
Time Spent: 1.5h (was: 1h 20m)
> Make it easier to configure a Flink state backend
> -------------------------------------------------
>
> Key: BEAM-9855
> URL: https://issues.apache.org/jira/browse/BEAM-9855
> Project: Beam
> Issue Type: Improvement
> Components: runner-flink
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
> Priority: P3
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> We should make it easier to configure a Flink state backend. At the moment,
> users have to either (1) configure the default state backend in their Flink
> cluster, or make sure (2a) they include the dependency in their Gradle/Maven
> project (e.g.
> {{"org.apache.flink:flink-statebackend-rocksdb_2.11:$flink_version"}} for
> RocksDB) (2b) set the state backend factory in the {{FlinkPipelineOptions}.
> The drawback of option (2) is that it only works in Java due to the factory
> specification being in Java.
> We can make it easier by simple adding pipeline options for the state backend
> name and the checkpoint directory which will be enough for configuring the
> state backend. We can add the RocksDB state backend as a default dependency.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)