Hi,除了DistributedCache机制。flink on yarn还有什么方法可以解决 在TaskManager中读取配置文件路径的办法吗?
在2019年4月3日 16:39,Biao Liu<[email protected]> 写道:
Hi, 该 issue 中 Till 已经进行了说明,看起来是 detached job-mode 的 bug,目前社区版确实对 job-mode
支持的不太好,坑比较多,建议不要使用

天边的云 <[email protected]> 于2019年4月3日周三 下午4:28写道:

我看社区已经有人反馈了此问题,看上去像是1.6对BlobServer做了改动导致的?

https://issues.apache.org/jira/browse/FLINK-10370?jql=project%20%3D%20FLINK%20AND%20text%20~%20%22registerCachedFile%22


在2019年4月3日 16:26,Biao Liu<[email protected]> 写道:
Hi, 按照你给出的部分代码,看不出问题所在,按道理是不应该的
建议给出更详细的信息,可以考虑以下几个方面
1. 完整可复现的代码(可以放到附件中),方便其他同学复现问题
2. 具体使用版本

PS: 如果你确认不是你测试环境/代码的问题,甚至可以直接建 jira issue 来反馈 bug,参见
https://flink.apache.org/how-to-contribute.html#file-a-bug-report


天边的云 <[email protected]> 于2019年4月3日周三 下午3:24写道:

如题,按照官方例子
env9.registerCachedFile("hdfs://xxx/key", "key");


...
.map(
new RichMapFunction<String, String>() {
@Override
public String map(String value) throws Exception {
return value;
}
@Override
public void open(Configuration parameters) {
File file =
getRuntimeContext().getDistributedCache().getFile("key");
System.out.println(file.getAbsolutePath());
}


});
...
之前1.5版本没有任何问题,相同的代码更换到1.7.1版本之后报如下错误:
java.lang.IllegalArgumentException: File with name 'key' is not available.
Did you forget to register the file?


有谁遇到相同的问题或对这块代码有研究的吗?

回复