[
https://issues.apache.org/jira/browse/BEAM-6460?focusedWorklogId=186964&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-186964
]
ASF GitHub Bot logged work on BEAM-6460:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Jan/19 17:02
Start Date: 18/Jan/19 17:02
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #7552: [BEAM-6460] Remove
cached class references upon start/shutdown
URL: https://github.com/apache/beam/pull/7552#discussion_r249116582
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/FlinkDoFnFunction.java
##########
@@ -133,13 +135,23 @@ public void mapPartition(
@Override
public void open(Configuration parameters) throws Exception {
+ // Clear cache to get rid of any references to the Flink Classloader
+ // See https://jira.apache.org/jira/browse/BEAM-6460
+ PipelineOptionsFactory.resetCache();
Review comment:
After some more investigation, I don't think this is necessary. The static
cache will be removed automatically after the Beam job shuts down by unloading
the PipelineOptionsFactory class.
The real problem here seems to be that the user code uses Flink's Jackson
instance.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 186964)
Time Spent: 1h (was: 50m)
> PipelineOptionsFactory may hold on to Classloader after pipeline restart
> ------------------------------------------------------------------------
>
> Key: BEAM-6460
> URL: https://issues.apache.org/jira/browse/BEAM-6460
> Project: Beam
> Issue Type: Bug
> Components: runner-flink
> Affects Versions: 2.7.0
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
> Priority: Blocker
> Fix For: 2.10.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> It looks like Jackson has an internal cache which may continue to hold the
> Flink application classloader through its {{TypeFactory}} class. When the
> pipeline is restarted due to a failure, a new classloader is created which
> can result in too many classes being loaded.
> Reported on the user mailing list:
> https://lists.apache.org/thread.html/e201891684ef3dcffce48d20d1f9be0e19fc2294334362cc7092c0ff@%3Cuser.beam.apache.org%3E
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)