[ 
https://issues.apache.org/jira/browse/FLINK-35376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17847168#comment-17847168
 ] 

Biao Geng commented on FLINK-35376:
-----------------------------------

hi [~18380428...@163.com], in the implementation of the 
`extractContainerdLibraries()`, it would call `tempFile.deleteOnExit();`. So 
when the job exits, these temp files should be cleared. (See 
https://github.com/apache/flink/blob/f1ecb9e4701d612050da54589a8f561857debf34/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java#L585
 for details)
Have you encountered any residual jars when the job exits?

> When flink submits the job by calling the rest api, the dependent jar package 
> generated to the tmp is not removed
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-35376
>                 URL: https://issues.apache.org/jira/browse/FLINK-35376
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / REST
>    Affects Versions: 1.14.4
>            Reporter: 中国无锡周良
>            Priority: Major
>
> When org. Apache. Flink. Runtime. Webmonitor. Handlers. JarRunHandler# 
> handleRequest receives job submission request,
> {code:java}
> final JarHandlerContext context = JarHandlerContext.fromRequest(request, 
> jarDir, log);
> context.applyToConfiguration(effectiveConfiguration); {code}
> The toPackagedProgram(configuration) method generates a dependency jar to the 
> tmp directory;
> Then,
> final PackagedProgram program = 
> context.toPackagedProgram(effectiveConfiguration);
> Will generate a dependent jars, and org. Apache. The flink. Client. The 
> program. The PackagedProgram# PackagedProgram method inside
> {code:java}
> this.extractedTempLibraries =
>                 this.jarFile == null
>                         ? Collections.emptyList()
>                         : extractContainedLibraries(this.jarFile); {code}
> Will be overwritten by the second generation;
>  
> As a result, the dependent jar package generated for the first time cannot be 
> deleted when close. If the job status detection is done and the rest api is 
> automatically invoked to pull up, the jar file will always be generated in 
> tmp.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to