The submitting is hanging when register a hdfs file as registerCacheFile in 1.7 based on RestClusterClient

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The submitting is hanging when register a hdfs file as registerCacheFile in 1.7 based on RestClusterClient

Joshua Fan
Hi, all

As the title says, the submitting is always hanging there when the cache file is not reachable, actually because the RestClient uses a java.io.File to get the cache file.

I use RestClusterClient to submit job in Flink 1.7.


ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

// register a file from HDFS
env.registerCachedFile("hdfs:///path/to/your/file", "hdfsFile")

// register a local executable file (script, executable, ...)
env.registerCachedFile("file:///path/to/exec/file", "localExecFile", true)

Unfortunately, both the two examples can not be submitted, because either hdfs:///path/to/your/file or file:///path/to/exec/file is not reachable by the java.io.File, the http post will not finish and the submitting is hanging.
When use env.registerCachedFile("/path/to/exec/file", "localExecFile", true), the path is a regular local Path , the job can be submitted and the cache file is available.

Is there some problems in the code or should I fire a jira?

Yours
Joshua