[ https://issues.apache.org/jira/browse/FLINK-7041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16070063#comment-16070063 ]
ASF GitHub Bot commented on FLINK-7041: --------------------------------------- Github user aljoscha commented on a diff in the pull request: https://github.com/apache/flink/pull/4232#discussion_r125034182 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraphBuilder.java --- @@ -223,19 +223,21 @@ public static ExecutionGraph buildGraph( // if specified in the application, use from there, otherwise load from configuration final StateBackend metadataBackend; - final StateBackend applicationConfiguredBackend = snapshotSettings.getDefaultStateBackend(); + final SerializedValue<StateBackend> applicationConfiguredBackend = snapshotSettings.getDefaultStateBackend(); if (applicationConfiguredBackend != null) { - metadataBackend = applicationConfiguredBackend; + try { + metadataBackend = applicationConfiguredBackend.deserializeValue(classLoader); + } catch (IOException | ClassNotFoundException e) { + throw new JobExecutionException(jobId, "Could not instantiate configured state backend.", e); + } log.info("Using application-defined state backend for checkpoint/savepoint metadata: {}.", applicationConfiguredBackend); --- End diff -- Good catch! > Deserialize StateBackend from JobCheckpointingSettings with user classloader > ---------------------------------------------------------------------------- > > Key: FLINK-7041 > URL: https://issues.apache.org/jira/browse/FLINK-7041 > Project: Flink > Issue Type: Bug > Components: DataStream API, Distributed Coordination, State > Backends, Checkpointing > Affects Versions: 1.3.0, 1.3.1 > Reporter: Aljoscha Krettek > Assignee: Aljoscha Krettek > Priority: Blocker > Fix For: 1.3.2 > > > A user ran into the problem that the {{SubmitJob}} message is not > (de)serialisable if it contains custom RocksDB options (or a custom state > backend): [1] > The problem is that {{SubmitJob}} contains a {{JobGraph}} which contains > {{JobCheckpointingSettings}} which contains a {{StateBackend}}. This > {{StateBackend}} potentially has user code and therefore can only be > deserialised with the user classloader. > This issue is mostly identical to FLINK-6531. > [1] > https://lists.apache.org/thread.html/69bb573787258ab34c3dc56ac155052f099d75e62d805f463bde5621@%3Cuser.flink.apache.org%3E -- This message was sent by Atlassian JIRA (v6.4.14#64029)