You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Joshua Fan <jo...@gmail.com> on 2019/02/19 02:54:40 UTC

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

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.

Below is instructions shown in
https://ci.apache.org/projects/flink/flink-docs-release-1.7/dev/batch/#distributed-cache
:

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