[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Job jumbo jar can't be extracted on Windows

Can you provide us with instructions for reproducing this error? Please also include the versions for the jdk/tools/build-system etc.

I frequently submit jobs on windows and haven't ran into this issue.

On 03.07.2018 20:05, Ted Yu wrote:
Looking at javadoc of separatorChar :

      * The system-dependent default name-separator character.  This field is

      * initialized to contain the first character of the value of the system

      * property <code>file.separator</code>.  On UNIX systems the value of

      * field is <code>'/'</code>; on Microsoft Windows systems it is <code>

Looks like the code you quoted should get the correct separator.

On Tue, Jul 3, 2018 at 10:43 AM, NEKRASSOV, ALEXEI <an4828@xxxxxxx> wrote:

When I try to "flink run" a job jar that includes dependent jar's - it
fails on Windows with the following Exception:

org.apache.flink.client.program.ProgramInvocationException: Unknown I/O
error while extracting contained jar files.
         at org.apache.flink.client.program.PackagedProgram.
         at org.apache.flink.client.program.PackagedProgram.<init>
         at org.apache.flink.client.cli.CliFrontend.buildProgram(
         at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.
         at org.apache.flink.client.cli.CliFrontend.parseParameters(
         at org.apache.flink.client.cli.CliFrontend.lambda$main$9(
         at org.apache.flink.runtime.security.NoOpSecurityContext.
         at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.
Caused by: org.apache.flink.client.program.ProgramInvocationException: An
I/O error occurred while creating temporary file to extract nested library
         at org.apache.flink.client.program.PackagedProgram.
         ... 7 more
Caused by: java.io.IOException: Unable to create temporary file,
         at java.io.File$TempDirectory.generateFile(Unknown Source)
         at java.io.File.createTempFile(Unknown Source)
         at java.io.File.createTempFile(Unknown Source)
         at org.apache.flink.client.program.PackagedProgram.
         ... 7 more

I think we have a problem in PackagedProgram.java - it fails to extract
contained jar's on Windows, because on Windows File.separatorChar is '\',
but JarEntry.getName() returns '/' as file separator.
Line 699 of https://github.com/apache/flink/blob/master/flink-
is no-op on Windows.

I think we need to replace line 699 with
             name = name.replace('/', '_');
as I don't see a way to have JarEntry use platform-specific file
separator, and ZIP spec dictates the use of forward-slashes anyway.
Line 680 already uses hard-coded '/'.

Alex Nekrassov