Hi, wanglei

You could use the flink distributed cache to register some config
files and then access them in your task.

1. Register a cached file

StreamExecutionEnvironment.registerCachedFile(inputFile.toString(),
"test_data", false);

2. Access the file in your task

final Path testFile =
getRuntimeContext().getDistributedCache().getFile("test_data").toPath();


wangl...@geekplus.com.cn <wangl...@geekplus.com.cn> 于2019年5月26日周日 上午12:06写道:

>
> When starting  a single node java application, I can add some config file
> to it.
>
> How can i implenment it when submitting a flink job? The config file need
> to be read from taskMgr node and used to initialize some classess.
>
>
>
> ------------------------------
> wangl...@geekplus.com.cn
>

Reply via email to